Merge pull request #71906 from reduz/simplify-polyphonic-stream-player
Simplify AudioStreamPolyphonic
This commit is contained in:
commit
809bd94394
5 changed files with 16 additions and 37 deletions
|
|
@ -784,10 +784,8 @@ bool AudioStreamPlayer3D::get_stream_paused() const {
|
|||
}
|
||||
|
||||
Ref<AudioStreamPlayback> AudioStreamPlayer3D::get_stream_playback() {
|
||||
if (!stream_playbacks.is_empty()) {
|
||||
return stream_playbacks[stream_playbacks.size() - 1];
|
||||
}
|
||||
return nullptr;
|
||||
ERR_FAIL_COND_V_MSG(stream_playbacks.is_empty(), Ref<AudioStreamPlayback>(), "Player is inactive. Call play() before requesting get_stream_playback().");
|
||||
return stream_playbacks[stream_playbacks.size() - 1];
|
||||
}
|
||||
|
||||
void AudioStreamPlayer3D::set_max_polyphony(int p_max_polyphony) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue