comparison src/audio/dsp/SDL_dspaudio.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 f7b03b6838cb
comparison
equal deleted inserted replaced
2937:017d4334accf 2938:2929ed239d2a
379 impl->GetDeviceBuf = DSP_GetDeviceBuf; 379 impl->GetDeviceBuf = DSP_GetDeviceBuf;
380 impl->CloseDevice = DSP_CloseDevice; 380 impl->CloseDevice = DSP_CloseDevice;
381 impl->Deinitialize = DSP_Deinitialize; 381 impl->Deinitialize = DSP_Deinitialize;
382 382
383 build_device_lists(); 383 build_device_lists();
384 return 1; 384 return (outputDeviceCount > 0) ? 2 : 1;
385 } 385 }
386 386
387 387
388 AudioBootStrap DSP_bootstrap = { 388 AudioBootStrap DSP_bootstrap = {
389 DSP_DRIVER_NAME, "OSS /dev/dsp standard audio", DSP_Init, 0 389 DSP_DRIVER_NAME, "OSS /dev/dsp standard audio", DSP_Init, 0