Browse Source

pausing and setting position of audio seems to work now (#1039)

Aksel 3 năm trước cách đây
mục cha
commit
34a809273f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      hxd/snd/Manager.hx

+ 1 - 1
hxd/snd/Manager.hx

@@ -362,7 +362,7 @@ class Manager {
 				#end
 				playedSamples = 0;
 			}
-			c.position = playedSamples / s.buffers[0].sampleRate;
+			c.position = s.start / targetRate + playedSamples / s.buffers[0].sampleRate;
 			c.positionChanged = false;
 
 			// enqueue next buffers