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
lukas-w committed Jun 11, 2018
1 parent 3d98b0a commit ad4c4f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/audio/AudioSdl.cpp
Original file line number Diff line number Diff line change
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 ad4c4f0

Please sign in to comment.