audio callback does not stop after playing sound |
slash
|
Hi,
I just tried to play a sound file using SDL_OpenAudio. I used sample code from a tutorial: http://www.spieleprogrammierer.de/27-tutorials/7210-simple-directmedia-layer-sdl-tutorial/ and only replaced the sound file and used memset() instead of ZeroMemory in my implementation. When I try to play the sound, playing does not end when the soundfile is processed fully. I modified my callback function to monitor the variables:
The sound is played continously until the following SDL_Delay() is finished:
I would have expected, that playing ends when audio_len reaches 0. Am I wrong? If so, what would be the correct way to play a sound file? I'm using SDL2 on o Ubuntu 12.04 box. Thanks in advance for any hint. Cheers, slash |
|||||||||||||||
|