diff --git a/core/src/zero1hd/rhythmbullet/audio/RhythmBulletAudioThread.java b/core/src/zero1hd/rhythmbullet/audio/RhythmBulletAudioThread.java index 13b85c1..e056c98 100755 --- a/core/src/zero1hd/rhythmbullet/audio/RhythmBulletAudioThread.java +++ b/core/src/zero1hd/rhythmbullet/audio/RhythmBulletAudioThread.java @@ -15,6 +15,8 @@ public class RhythmBulletAudioThread extends Thread { private short[] pcm; private volatile boolean terminated; private volatile boolean playing; + private volatile long framesPlayed; + private volatile float framesToSkip; public RhythmBulletAudioThread(int windowSize, VisualizableMusic vm) { music = vm; @@ -39,6 +41,7 @@ public class RhythmBulletAudioThread extends Thread { ocl.onCompletion(music); } + super.run(); } @@ -77,4 +80,10 @@ public class RhythmBulletAudioThread extends Thread { public void setOnCompletionListener(OnCompletionListener ocl) { this.ocl = ocl; } + + public void jumpToFrame(long frame) { + if (framesPlayed > frame) { + + } + } } \ No newline at end of file diff --git a/core/src/zero1hd/rhythmbullet/audio/processor/PCMProcessor.java b/core/src/zero1hd/rhythmbullet/audio/processor/PCMProcessor.java index 65e24e9..f725267 100755 --- a/core/src/zero1hd/rhythmbullet/audio/processor/PCMProcessor.java +++ b/core/src/zero1hd/rhythmbullet/audio/processor/PCMProcessor.java @@ -59,4 +59,17 @@ public interface PCMProcessor extends Disposable { * @return the pan value. */ public float getPan(); + + /** + * resets the current input stream to the beginning. + * Not thread safe and should be called in the same thread as the one doing the playback. + */ + public void resetStream(); + + /** + * Skip this amount of frames. + * Not thread safe since this should be called in the same thread as the one doing the playback. + * @param framesToSkip + */ + public void skipFrames(long framesToSkip); }