Skip to content

Commit

Permalink
Merge pull request #95321 from akien-mga/audio-sample-polyphonic-stop
Browse files Browse the repository at this point in the history
AudioStreamPolyphonic: Implement stopping with sample playback
  • Loading branch information
akien-mga authored Aug 9, 2024
2 parents d0fc7f7 + 2edf9b9 commit 88f3b5f
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 88f3b5f

Please sign in to comment.