OpenAL alutLoadWAVFile

Started by
3 comments, last by Mybowlcut 14 years, 11 months ago
Hey. I'm trying to use OpenAL with my OpenGL app. I have downloaded the latest SDK from the OpenAL website. I compiled a program similar to the one here and got these errors:
Error	1	error C3861: 'alutLoadWAVFile': identifier not found
e:\uni\2009 01\csp2307 introduction to 3d game programming\assessments\ass2\audio_cache.cpp	95
Error	2	error C3861: 'alutUnloadWAV': identifier not found
e:\uni\2009 01\csp2307 introduction to 3d game programming\assessments\ass2\audio_cache.cpp	117


So I did some googling and realised that I may need the ALUT installation. I downloaded it from the same site and included it in my code, compiled the program again and get these errors:
Warning	1	warning C4996: 'alutLoadWAVFile' was declared deprecated
e:\uni\2009 01\csp2307 introduction to 3d game programming\assessments\ass2\audio_cache.cpp	96
Warning	2	warning C4996: 'alutUnloadWAV' was declared deprecated
e:\uni\2009 01\csp2307 introduction to 3d game programming\assessments\ass2\audio_cache.cpp	117
Error	3	error LNK2019: unresolved external symbol
__imp__alutUnloadWAV referenced in function "private: unsigned int __thiscall Audio_Cache::Load_Audio(char * const)" (?Load_Audio@Audio_Cache@@AAEIQAD@Z)	Audio_Cache.obj
Error	4	error LNK2019: unresolved external symbol
__imp__alutLoadWAVFile referenced in function "private: unsigned int __thiscall Audio_Cache::Load_Audio(char * const)" (?Load_Audio@Audio_Cache@@AAEIQAD@Z)	Audio_Cache.obj


From more googling, I read that I needed alut.lib, but it didn't come with my OpenAL SDK nor the ALUT installation. I have no idea what to do now... Does anybody know what's going on here? Cheers.

Advertisement
I'm surprised people still try to use ALut... Anyway, check this out. It's a little old, but it should still work.
Hm... while I can appreciate that you've given me a way to work around the alut issue, I'm a bit concerned that I'll have trouble finding a compatible .wav for your code... you mention that the code is crap, but I'm looking for a quick, well-known solution to loading wavs since this is a uni project. Perhaps I'll use SDL_Mixer?

Cheers.

Hey,

Yeah SDL_Mixer will be fine for what you need I imagine. It's really simple to set up and use aswell, which is a plus.

Incase you're interested; Lazyfoo has a really cool tutorial for setting up SDL_Mixer.

Good luck.
Heh
Hey.

I have used SDL_Mixer before, just not with OpenGL.

Cheers.

This topic is closed to new replies.

Advertisement