瀏覽代碼

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

Aksel 3 年之前
父節點
當前提交
34a809273f
共有 1 個文件被更改,包括 1 次插入1 次删除
  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