Browse Source

Merge pull request #101097 from adamscott/fix-stopping-active-audio-playback

Stop AudioStreamPlayback only if it's not playing
Rémi Verschelde 7 months ago
parent
commit
e169842dd5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      servers/audio_server.cpp

+ 3 - 1
servers/audio_server.cpp

@@ -1272,7 +1272,9 @@ void AudioServer::stop_playback_stream(Ref<AudioStreamPlayback> p_playback) {
 		return;
 	}
 
-	p_playback->stop();
+	if (!p_playback->is_playing()) {
+		p_playback->stop();
+	}
 
 	AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
 	if (!playback_node) {