Browse Source

Fix AudioPlayer.play() bug when music always starts from 0 pos

NNesh 8 năm trước cách đây
mục cha
commit
0edc3d7208
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      modules/stb_vorbis/audio_stream_ogg_vorbis.cpp

+ 1 - 1
modules/stb_vorbis/audio_stream_ogg_vorbis.cpp

@@ -66,8 +66,8 @@ float AudioStreamPlaybackOGGVorbis::get_stream_sampling_rate() {
 
 void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
 
-	seek_pos(p_from_pos);
 	active = true;
+	seek_pos(p_from_pos);
 	loops = 0;
 	_begin_resample();
 }