comparison src/audio/esd/SDL_esdaudio.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 1e431c2631ee
comparison
equal deleted inserted replaced
2937:017d4334accf 2938:2929ed239d2a
339 impl->GetDeviceBuf = ESD_GetDeviceBuf; 339 impl->GetDeviceBuf = ESD_GetDeviceBuf;
340 impl->CloseDevice = ESD_CloseDevice; 340 impl->CloseDevice = ESD_CloseDevice;
341 impl->Deinitialize = ESD_Deinitialize; 341 impl->Deinitialize = ESD_Deinitialize;
342 impl->OnlyHasDefaultOutputDevice = 1; 342 impl->OnlyHasDefaultOutputDevice = 1;
343 343
344 return 1; 344 return 2; /* return 2 (definitely have a "device"). */
345 } 345 }
346 346
347 347
348 AudioBootStrap ESD_bootstrap = { 348 AudioBootStrap ESD_bootstrap = {
349 ESD_DRIVER_NAME, "Enlightened Sound Daemon", ESD_Init, 0 349 ESD_DRIVER_NAME, "Enlightened Sound Daemon", ESD_Init, 0