mirror of https://github.com/encounter/SDL.git
fix assertion failure in sndio audio caused by the recent hotplugging support
This commit is contained in:
parent
8927d73b1c
commit
2b6b69fb12
|
@ -350,6 +350,13 @@ SNDIO_Deinitialize(void)
|
|||
UnloadSNDIOLibrary();
|
||||
}
|
||||
|
||||
static void
|
||||
SNDIO_DetectDevices(void)
|
||||
{
|
||||
SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *) 0x1);
|
||||
SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *) 0x2);
|
||||
}
|
||||
|
||||
static int
|
||||
SNDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
|
@ -366,6 +373,7 @@ SNDIO_Init(SDL_AudioDriverImpl * impl)
|
|||
impl->CaptureFromDevice = SNDIO_CaptureFromDevice;
|
||||
impl->FlushCapture = SNDIO_FlushCapture;
|
||||
impl->Deinitialize = SNDIO_Deinitialize;
|
||||
impl->DetectDevices = SNDIO_DetectDevices;
|
||||
|
||||
impl->AllowsArbitraryDeviceNames = 1;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
|
Loading…
Reference in New Issue