AudioStreamPolyphonic: Implement stopping with sample playback

Fixes #94724.
This commit is contained in:
Rémi Verschelde 2024-08-09 10:57:45 +02:00
parent c73ac74c4a
commit 2edf9b95b3
No known key found for this signature in database
GPG Key ID: C3336907360768E1

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