C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 02-23-2005, 12:31 PM   #1
Registered User
 
Join Date: Jan 2005
Posts: 12
Wav files and winbase.h

Hi everyone!

I'm in trouble again with my c program. I need to play wav files. I searched the old posts and all I could find was about sndPlaySound. If I use it, my compiler tells me: missing prototype. If I include windows.h, the compiler tells me there are errors in the winbase.h file. It's not a file written by me, then I guess it is correct. Should I include something else?

Thank you all in advance! This is for my job, it's very important!

Thank you again very much!

By!
ZapoTex is offline   Reply With Quote
Old 02-24-2005, 12:23 AM   #2
Registered User
 
Join Date: May 2004
Posts: 1,362
my favourite audio lib
www.fmod.org
very simple to use.
__________________
sand_man is offline   Reply With Quote
Old 02-24-2005, 06:41 AM   #3
Yes, my avatar is stolen
 
anonytmouse's Avatar
 
Join Date: Dec 2002
Posts: 2,544
Make sure you have included <windows.h> before other headers. You can also use the PlaySound function. You will need to link with Winmm.lib.
anonytmouse is offline   Reply With Quote
Old 02-24-2005, 11:55 AM   #4
Registered User
 
Join Date: Jan 2005
Posts: 12
Thank you very much everybody!!!

I have included windows.h, but it is my last header, actually! I'll try moving it up. And I'll try fmod too.

Thank you a lot again, this forum is a very welcoming place, not to mention a very useful resource! Thank you all!
ZapoTex is offline   Reply With Quote
Old 02-24-2005, 03:13 PM   #5
Registered User
 
Join Date: Jan 2005
Posts: 12
I followed your advice: with fmod everything worked perfectly. WIth windows.h as my first include, compiling was successful, but I had a "linking error": symbol sndSoundPlayA@8 undefined.

I don't know what this means. Anyway fmod is more powerful, it even lets me pre-load my samples and then quickly play them whenever I need to warn the user of my app.

Thank you very much again!

PS: i tried to edit my first post and add "SOLVED" to the title, but i couldn't. "Edit" appears on my last post only.

Thank you again, bye!
ZapoTex is offline   Reply With Quote
Old 02-24-2005, 05:17 PM   #6
Registered User
 
Join Date: May 2004
Posts: 1,362
No problem. Fmod is quite powerful and it is ported to many many OS's including Xbox and PS2 i believe.
__________________
sand_man is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
windows header files not linking correctly skorman00 Windows Programming 2 04-13-2005 11:14 AM
declaring Winbase.h ? Rune Hunter C++ Programming 4 10-23-2004 01:01 AM
winbase.h & thread programming Massive Windows Programming 3 06-18-2003 06:51 AM


All times are GMT -6. The time now is 08:38 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22