diff --git a/include/AudioSdl.h b/include/AudioSdl.h index 651ed96be57..7dd7ead1c87 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -89,8 +89,6 @@ class AudioSdl : public AudioDevice size_t m_currentBufferFramePos; size_t m_currentBufferFramesCount; - bool m_stopped; - SDL_AudioDeviceID m_outputDevice; SDL_AudioSpec m_inputAudioHandle; diff --git a/src/core/AudioEngine.cpp b/src/core/AudioEngine.cpp index 42e7079b016..4093a920a21 100644 --- a/src/core/AudioEngine.cpp +++ b/src/core/AudioEngine.cpp @@ -549,15 +549,9 @@ void AudioEngine::clearInternal() void AudioEngine::changeQuality(const struct qualitySettings & qs) { - // don't delete the audio-device - stopProcessing(); - m_qualitySettings = qs; - emit sampleRateChanged(); emit qualitySettingsChanged(); - - startProcessing(); } diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 92cb2ba3051..e4f31c622c3 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -235,9 +235,6 @@ void Song::processNextBuffer() return; } - // If we have no tracks to play, there is nothing to do - if (trackList.empty()) { return; } - // If the playback position is outside of the range [begin, end), move it to // begin and inform interested parties. // Returns true if the playback position was moved, else false. diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index 8f533119c8a..c68c9280912 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -139,8 +139,6 @@ AudioSdl::~AudioSdl() void AudioSdl::startProcessing() { - m_stopped = false; - SDL_PauseAudioDevice (m_outputDevice, 0); SDL_PauseAudioDevice (m_inputDevice, 0); } @@ -150,19 +148,8 @@ void AudioSdl::startProcessing() void AudioSdl::stopProcessing() { - if( SDL_GetAudioDeviceStatus(m_outputDevice) == SDL_AUDIO_PLAYING ) - { - SDL_LockAudioDevice (m_inputDevice); - SDL_LockAudioDevice (m_outputDevice); - - m_stopped = true; - - SDL_PauseAudioDevice (m_inputDevice, 1); - SDL_PauseAudioDevice (m_outputDevice, 1); - - SDL_UnlockAudioDevice (m_inputDevice); - SDL_UnlockAudioDevice (m_outputDevice); - } + SDL_PauseAudioDevice (m_inputDevice, 1); + SDL_PauseAudioDevice (m_outputDevice, 1); } void AudioSdl::sdlAudioCallback( void * _udata, Uint8 * _buf, int _len ) @@ -177,11 +164,6 @@ void AudioSdl::sdlAudioCallback( void * _udata, Uint8 * _buf, int _len ) void AudioSdl::sdlAudioCallback( Uint8 * _buf, int _len ) { - if( m_stopped ) - { - memset( _buf, 0, _len ); - return; - } // SDL2: process float samples while( _len )