views:

54

answers:

1

Hi,

I have a little problem with a loopting clip: If you have a soundfile e.g. 20000 samples long, the frame position will not reset after looping, so I get values that are "out of bounds" of the original soundfile. As I want to draw a position marker on my waveform, I'm a bit confused how to achive. At this time I just get myClip.getLongFramePosition() but this does not work as described above.

Does anyone have an idea how to fix that? Is there a possibility to count how often a clip was looped before?

Regards

A: 

If you are looping the whole audio file and not just a portion you could possibly call int getFrameLength() to find out what the length of your audio file is then check the value of getLongFramePosition() and if it is over the length of your file then use a modulus function (divide by the length and take the remainder) to find out what the actual position is.

Hiyooo