diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sdl_audio_mix.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/sdl_audio_mix.c b/tests/sdl_audio_mix.c index 6866f555..e3431e0c 100644 --- a/tests/sdl_audio_mix.c +++ b/tests/sdl_audio_mix.c @@ -17,9 +17,11 @@ void one_iter() { switch( frames ) { case 1: soundChannel = Mix_PlayChannel(-1, sound, 0); - assert(soundChannel != -1); + printf("channel = %d", soundChannel); + assert(soundChannel != -1 && soundChannel != 0); break; case 2: + printf("channel %d is playing = %d", soundChannel, Mix_Playing(soundChannel)); assert(Mix_Playing(soundChannel)); break; case 30: @@ -54,7 +56,13 @@ void one_iter() { int main(int argc, char **argv) { SDL_Init(SDL_INIT_AUDIO); - + Mix_Init(MIX_INIT_OGG); + + // This reserves channel 0 for other purposes. + // We are just going to verify that we are not + // allocated channel 0 when we call Mix_PlayChannel(-1, ...) + Mix_ReserveChannels(1); + int ret = Mix_OpenAudio(0, 0, 0, 0); // we ignore all these.. assert(ret == 0); |