Mercurial > sdl-ios-xcode
comparison src/audio/alsa/SDL_alsa_audio.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 |
---|---|
605 impl->PlayDevice = ALSA_PlayDevice; | 605 impl->PlayDevice = ALSA_PlayDevice; |
606 impl->CloseDevice = ALSA_CloseDevice; | 606 impl->CloseDevice = ALSA_CloseDevice; |
607 impl->Deinitialize = ALSA_Deinitialize; | 607 impl->Deinitialize = ALSA_Deinitialize; |
608 impl->OnlyHasDefaultOutputDevice = 1; /* !!! FIXME: Add device enum! */ | 608 impl->OnlyHasDefaultOutputDevice = 1; /* !!! FIXME: Add device enum! */ |
609 | 609 |
610 return 1; | 610 return 1; /* !!! FIXME: return 2 once device enum is implemented. */ |
611 } | 611 } |
612 | 612 |
613 | 613 |
614 AudioBootStrap ALSA_bootstrap = { | 614 AudioBootStrap ALSA_bootstrap = { |
615 DRIVER_NAME, "ALSA 0.9 PCM audio", ALSA_Init, 0 | 615 DRIVER_NAME, "ALSA 0.9 PCM audio", ALSA_Init, 0 |