Skip to content

Commit b6a3054

Browse files
committed
Return the length of the playing stream for AudioStreamRandomizer
1 parent 32eafc1 commit b6a3054

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
@@ -729,7 +729,10 @@ String AudioStreamRandomizer::get_stream_name() const {
729729
}
730730

731731
double AudioStreamRandomizer::get_length() const {
732-
return 0;
732+
if (!last_playback.is_valid()) {
733+
return 0;
734+
}
735+
return last_playback->get_length();
733736
}
734737

735738
bool AudioStreamRandomizer::is_monophonic() const {

0 commit comments

Comments
 (0)