Przeglądaj źródła

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

Aksel 3 lat temu
rodzic
commit
34a809273f
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      hxd/snd/Manager.hx

+ 1 - 1
hxd/snd/Manager.hx

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