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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user