![]() |
| | #1 |
| Registered User Join Date: Jan 2005
Posts: 12
| Wav files and winbase.h 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 | |
| | #2 |
| Registered User Join Date: May 2004
Posts: 1,362
|
__________________ |
| sand_man is offline | |
| | #3 |
| Yes, my avatar is stolen 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 | |
| | #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 | |
| | #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 | |
| | #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 | |
![]() |
| Thread Tools | |
| Display Modes | |
|
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 |