Skip to content

Commit

Permalink
AudioStreamPolyphonic: Implement stopping with sample playback
Browse files Browse the repository at this point in the history
Fixes #94724.
  • Loading branch information
akien-mga committed Aug 9, 2024
1 parent c73ac74 commit 2edf9b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scene/resources/audio_stream_polyphonic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ int AudioStreamPlaybackPolyphonic::mix(AudioFrame *p_buffer, float p_rate_scale,
}

if (s.stream_playback->get_is_sample()) {
if (s.finish_request.is_set()) {
s.active.clear();
AudioServer::get_singleton()->stop_sample_playback(s.stream_playback->get_sample_playback());
}
continue;
}

Expand Down

0 comments on commit 2edf9b9

Please sign in to comment.