Merge pull request #95321 from akien-mga/audio-sample-polyphonic-stop

AudioStreamPolyphonic: Implement stopping with sample playback
This commit is contained in:
Rémi Verschelde 2024-08-09 23:25:56 +02:00 committed by GitHub
commit 88f3b5f9d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}