Skip to content

Commit ff8de2d

Browse files
Reflexelukas-w
authored andcommitted
AudioSDL -> SDL2: Fix a crash from calling a SDL1 function instead of
SDL2's.
1 parent ec28a65 commit ff8de2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/audio/AudioSdl.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ void AudioSdl::startProcessing()
159159

160160
void AudioSdl::stopProcessing()
161161
{
162+
#ifdef LMMS_HAVE_SDL2
163+
if( SDL_GetAudioDeviceStatus(m_outputDevice) == SDL_AUDIO_PLAYING )
164+
#else
162165
if( SDL_GetAudioStatus() == SDL_AUDIO_PLAYING )
166+
#endif
163167
{
164168
#ifdef LMMS_HAVE_SDL2
165169
SDL_LockAudioDevice (m_inputDevice);

0 commit comments

Comments
 (0)