Mercurial > sdl-ios-xcode
comparison src/audio/nas/SDL_nasaudio.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 |
---|---|
396 impl->GetDeviceBuf = NAS_GetDeviceBuf; | 396 impl->GetDeviceBuf = NAS_GetDeviceBuf; |
397 impl->CloseDevice = NAS_CloseDevice; | 397 impl->CloseDevice = NAS_CloseDevice; |
398 impl->Deinitialize = NAS_Deinitialize; | 398 impl->Deinitialize = NAS_Deinitialize; |
399 impl->OnlyHasDefaultOutputDevice = 1; /* !!! FIXME: is this true? */ | 399 impl->OnlyHasDefaultOutputDevice = 1; /* !!! FIXME: is this true? */ |
400 | 400 |
401 return 1; | 401 return 2; /* 2 == definitely has an audio device. */ |
402 } | 402 } |
403 | 403 |
404 AudioBootStrap NAS_bootstrap = { | 404 AudioBootStrap NAS_bootstrap = { |
405 NAS_DRIVER_NAME, "Network Audio System", NAS_Init, 0 | 405 NAS_DRIVER_NAME, "Network Audio System", NAS_Init, 0 |
406 }; | 406 }; |