AudioSdl: Use NULL for device names in order to get the default device.

The zero index device may not be the default device.

Many thanks to @PhysSong.
This commit is contained in:
Shmuel H
2018-06-11 14:30:49 +02:00
committed by Lukas W
parent ff8de2d7eb
commit e2a7587600

View File

@@ -75,7 +75,7 @@ AudioSdl::AudioSdl( bool & _success_ful, Mixer* _mixer ) :
SDL_AudioSpec actual;
#ifdef LMMS_HAVE_SDL2
m_outputDevice = SDL_OpenAudioDevice (SDL_GetAudioDeviceName(0, 2),
m_outputDevice = SDL_OpenAudioDevice (NULL,
0,
&m_audioHandle,
&actual,
@@ -102,7 +102,7 @@ AudioSdl::AudioSdl( bool & _success_ful, Mixer* _mixer ) :
m_inputAudioHandle = m_audioHandle;
m_inputAudioHandle.callback = sdlInputAudioCallback;
m_inputDevice = SDL_OpenAudioDevice (SDL_GetAudioDeviceName(0, 1),
m_inputDevice = SDL_OpenAudioDevice (NULL,
1,
&m_inputAudioHandle,
&actual,