comparison src/audio/SDL_audio.c @ 262:ba5363e21df8

Don't allow multiple audio opens to succeed (until SDL 1.3)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 09 Jan 2002 16:04:58 +0000
parents e8157fcb3114
children f6ffac90895c
comparison
equal deleted inserted replaced
261:1c5f68da5fc2 262:ba5363e21df8
334 return(-1); 334 return(-1);
335 } 335 }
336 } 336 }
337 audio = current_audio; 337 audio = current_audio;
338 338
339 if (audio->opened) {
340 SDL_SetError("Audio device is already opened");
341 return(-1);
342 }
343
339 /* Verify some parameters */ 344 /* Verify some parameters */
340 if ( desired->callback == NULL ) { 345 if ( desired->callback == NULL ) {
341 SDL_SetError("SDL_OpenAudio() passed a NULL callback"); 346 SDL_SetError("SDL_OpenAudio() passed a NULL callback");
342 return(-1); 347 return(-1);
343 } 348 }