Skip to content

Commit

Permalink
AudioSdl: Use NULL for device names in order to get the default device.
Browse files Browse the repository at this point in the history
The zero index device may not be the default device.

Many thanks to @PhysSong.
  • Loading branch information
Reflexe authored and lukas-w committed Jul 7, 2018
1 parent ff8de2d commit e2a7587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/audio/AudioSdl.cpp
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit e2a7587

Please sign in to comment.