Skip to content

Commit e2a7587

Browse files
Reflexelukas-w
authored andcommitted
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.
1 parent ff8de2d commit e2a7587

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/audio/AudioSdl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ AudioSdl::AudioSdl( bool & _success_ful, Mixer* _mixer ) :
7575
SDL_AudioSpec actual;
7676

7777
#ifdef LMMS_HAVE_SDL2
78-
m_outputDevice = SDL_OpenAudioDevice (SDL_GetAudioDeviceName(0, 2),
78+
m_outputDevice = SDL_OpenAudioDevice (NULL,
7979
0,
8080
&m_audioHandle,
8181
&actual,
@@ -102,7 +102,7 @@ AudioSdl::AudioSdl( bool & _success_ful, Mixer* _mixer ) :
102102
m_inputAudioHandle = m_audioHandle;
103103
m_inputAudioHandle.callback = sdlInputAudioCallback;
104104

105-
m_inputDevice = SDL_OpenAudioDevice (SDL_GetAudioDeviceName(0, 1),
105+
m_inputDevice = SDL_OpenAudioDevice (NULL,
106106
1,
107107
&m_inputAudioHandle,
108108
&actual,

0 commit comments

Comments
 (0)