Explorar o código

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

Aksel %!s(int64=3) %!d(string=hai) anos
pai
achega
34a809273f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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