Original Post
Hello!
I am trying to finish up a school project using SDL 1.2, but I have hit a snag that I can't get by.
The game has several game state modules, each with a function
int Run(SDL_Surface *screen);
In each module, Run() initializes audio, runs through its loop, then closes audio before returning.
all of the modules use Mix_OpenAudio() and Mix_CloseAudio() to init/deinit the sound, and work fine together.
The only exception is the cinematic movie module where I have used SDL_FFMpeg to show a movie. This module forces me to use SDL_OpenAudio() instead.
SDL_OpenAudio fails the first time with the error "Audio device is already open", but then works the second time.
Once I have run the movie module, all the sound in the other modules stops working even though all their functions return 0 for success.
anyone have any idea whats going on? I am lost on this one =/
thanks for any help,
Nick
I am trying to finish up a school project using SDL 1.2, but I have hit a snag that I can't get by.
The game has several game state modules, each with a function
int Run(SDL_Surface *screen);
In each module, Run() initializes audio, runs through its loop, then closes audio before returning.
all of the modules use Mix_OpenAudio() and Mix_CloseAudio() to init/deinit the sound, and work fine together.
The only exception is the cinematic movie module where I have used SDL_FFMpeg to show a movie. This module forces me to use SDL_OpenAudio() instead.
SDL_OpenAudio fails the first time with the error "Audio device is already open", but then works the second time.
Once I have run the movie module, all the sound in the other modules stops working even though all their functions return 0 for success.
anyone have any idea whats going on? I am lost on this one =/
thanks for any help,
Nick