소스 검색

Return the length of the playing stream for AudioStreamRandomizer

Julian 4 달 전
부모
커밋
b6a3054323
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      servers/audio/audio_stream.cpp

+ 4 - 1
servers/audio/audio_stream.cpp

@@ -729,7 +729,10 @@ String AudioStreamRandomizer::get_stream_name() const {
 }
 
 double AudioStreamRandomizer::get_length() const {
-	return 0;
+	if (!last_playback.is_valid()) {
+		return 0;
+	}
+	return last_playback->get_length();
 }
 
 bool AudioStreamRandomizer::is_monophonic() const {