comparison src/audio/macosx/SDL_coreaudio.c @ 2938:2929ed239d2a

Adjusted default choice of audio driver. If a driver can definitely see available devices, it is chosen. Otherwise, we'll take the first driver that initializes but saw no devices...this might be because it can't enumerate them, or there really aren't any available. This prevents the dsp driver from hogging control when there are no /dev/dsp* nodes (for example, on a Linux box with ALSA and no OSS emulation).
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 01 Jan 2009 07:54:58 +0000
parents 99210400e8b9
children af4a5af3cd2b
comparison
equal deleted inserted replaced
2937:017d4334accf 2938:2929ed239d2a
587 impl->Deinitialize = COREAUDIO_Deinitialize; 587 impl->Deinitialize = COREAUDIO_Deinitialize;
588 impl->ProvidesOwnCallbackThread = 1; 588 impl->ProvidesOwnCallbackThread = 1;
589 589
590 build_device_lists(); /* do an initial check for devices... */ 590 build_device_lists(); /* do an initial check for devices... */
591 591
592 return 1; 592 return (outputDeviceCount > 0) ? 2 : 1;
593 } 593 }
594 594
595 AudioBootStrap COREAUDIO_bootstrap = { 595 AudioBootStrap COREAUDIO_bootstrap = {
596 "coreaudio", "Mac OS X CoreAudio", COREAUDIO_Init, 0 596 "coreaudio", "Mac OS X CoreAudio", COREAUDIO_Init, 0
597 }; 597 };