Skip to content

Commit

Permalink
AudioStreamPolyphonic: Implement stopping with sample playback
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored and maidopi-usagi committed Sep 11, 2024
1 parent c443397 commit d459cf1
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 d459cf1

Please sign in to comment.