Jump to content
  • Advertisement
Sign in to follow this  
Matrinix

Beginner Needing Help with OpenAL

This topic is 3081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have written a Window class that handles creating the window, graphics and audio contexts, etc. I am using OpenAL to do the audio. When I exit the window, or drag the window, or resize it, it was causing a Visual C++ runtime error to occur which I believe was happening due to OpenAL, as such I added the following code segments to my window message handler:
case WM_ENTERSIZEMOVE:
{
	this->soundManager.Pause();
	break;
}
case WM_EXITSIZEMOVE:
{
	this->soundManager.Play();
	break;
}
case WM_CLOSE:
{
	PostQuitMessage(0);
	this->soundManager.Stop();
	return 0;
}

Where soundManager is an object that is a collection of sound/music entities and Pause/Play/Stop performs the appropriate OpenAL commands for each sound/music entity. However, even with this, sometimes I will still get a Visual C++ runtime error while resizing/moving the window, sometimes after resizing/moving the window, music won't continue playing, and everytime when I close the window, I get an AL_INVALID_OPERATION error from OpenAL. [Edited by - Matrinix on April 16, 2010 4:51:29 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!