PDA

View Full Version : OpenAL problem



bojkar
01-20-2005, 06:30 AM
Hello. I have 'small' problem with openAL. When I play music in main loop in my program, for example:


void Init()
{
Load_Wav("some_wav.wav");
}
void DrawScene()
{
if(key_down_is_down)
{
play_my_wav();
}
}
An when i do that windows give me error :/ What is wrong?

Lurker_pas
01-20-2005, 07:30 AM
1) It's OpenGL coding forum, not OpenAL.
I guess you will find answers to your audio questions on OpenAL mailing list (seek it at www.openal.org) (http://www.openal.org)) or www.gamedev.net (http://www.gamedev.net) forums
2) The posted code has nothing to do with OpenAL - the functions you use are higher level. OpenAL functions are just like alSourcePlay(ALuint source), not play_my_wav()...
If you use some wrapper library, ask questions about it, not OpenAL.
3)As far as I remember OpenAL requires initialization - and so it should be needed by any wrapper library. I don't see it in your Init()
4)Please, don't post here about OpenAL if it is not related with OpenGL...

bojkar
01-20-2005, 07:37 AM
ad1) ok sorry
ad2) i know that was pseudo code!
ad3) all is in Init