Skip to content

Commit 3dd03fb

Browse files
committed
Merge pull request #105952 from JulianHeuser/AudioStreamRandomizer_return_length
Return the length of the playing stream for AudioStreamRandomizer
2 parents c80bb1b + b6a3054 commit 3dd03fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

servers/audio/audio_stream.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,10 @@ String AudioStreamRandomizer::get_stream_name() const {
736736
}
737737

738738
double AudioStreamRandomizer::get_length() const {
739-
return 0;
739+
if (!last_playback.is_valid()) {
740+
return 0;
741+
}
742+
return last_playback->get_length();
740743
}
741744

742745
bool AudioStreamRandomizer::is_monophonic() const {

0 commit comments

Comments
 (0)