Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » destroy a newly loaded audio stream will cause program freeze.

This thread is locked; no one can reply to it. rss feed Print
destroy a newly loaded audio stream will cause program freeze.
xpolife
Member #12,487
January 2011

If i do the follow code:

ALLEGRO_AUDIO_STREAM* stream;
...
stream = al_load_audio_stream(filename, 4, 2048);
al_destroy_audio_stream(stream);
...

will cause the main thread freeze.

Attached file is a complete test. I tested the wav and ogg.

The main thread is waiting for join.
Here is the stack trace:

>  a.exe!_al_thread_join(_AL_THREAD * thread=0x0044c350)  Line 78 + 0x10 bytes  C
   a.exe!al_join_thread(ALLEGRO_THREAD * thread=0x0044c350, void * * ret_value=0x00000000)  Line 201 + 0x9 bytes  C
   a.exe!wav_stream_close(ALLEGRO_AUDIO_STREAM * stream=0x00448108)  Line 273 + 0x11 bytes  C
   a.exe!al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM * stream=0x00448108)  Line 128 + 0x11 bytes  C
   ogg.exe!main(int argc=0x00000002, char * * argv=0x00441ad0)  Line 24 + 0x9 bytes  C

Go to: