![]() |
|
[a5] audio freezes on closing |
SuperEndeg
Member #12,649
March 2011
![]() |
I'm trying to add sound to my little app. Initialization part works fine. But when I get to closing part, I get jammed sound. And from this state I can only kill app. This happens only some times and it’s really annoying Here's sound init part (al_install_audio and al_init_acodec_addon was called previously): voice = al_create_voice(freq, ALLEGRO_AUDIO_DEPTH_INT16, ALLEGRO_CHANNEL_CONF_2); mixer = al_create_mixer(freq, ALLEGRO_AUDIO_DEPTH_INT16, ALLEGRO_CHANNEL_CONF_2); al_attach_mixer_to_voice(mixer, voice); al_set_default_mixer(mixer); if (!al_reserve_samples(16)) NOTICE("audio", "al_reserve_samples :(");
I’ve tried to use only al_reserve_samples(), and it’s working the same, except it freeze almost every time on closing I’ve tried to stop/destroy all samples and streams before closing app, that didn’t help either. And I also tried to call al_uninstall_audio, and it freezes on it. So is there some real absolutely correct way to close sound system? Using MinGW builds from this site. ---- |
Elias
Member #358
May 2000
|
Does ex_stream work? -- |
SuperEndeg
Member #12,649
March 2011
![]() |
Elias I've tried to remove all code that plays streaming data. It works the same. It not freezes only if al_reserve_samples not been called. Don't get any sound, thought. ---- |
Elias
Member #358
May 2000
|
Ah, yes, ex_stream_file I meant. Can you compile and run it? I'd just like to have a complete source file where someone can try and re-produce the problem and using one of the existing examples always is best as everyone already has them. -- |
SuperEndeg
Member #12,649
March 2011
![]() |
http://dl.dropbox.com/u/1899593/allegro/al_sound_test.c Here's minimal version of sound freezing app. It's not freezing every time, sometimes I thought that bug is gone. But if you comment out all mixer/voice code it's starting to freeze every time ---- |
|