AVAudioPlayer currentTime problem

Posted by StrAbZ on Stack Overflow See other posts from Stack Overflow or by StrAbZ
Published on 2009-05-19T13:28:08Z Indexed on 2010/05/26 20:11 UTC
Read the original article Hit count: 331

Filed under:
|
|

Hi, I'm trying to use the audioplayer with a slider in order to seek into a track (nothing complicated).

But I have a weird behavior... for some value of currentTime (between 0 and trackDuration), the player stop playing the track, and goes into "audioPlayerDidFinishPlaying:successfully:" with successfully to NO. And it did not go into "audioPlayerDecodeErrorDidOccur:error:"

It's like it can't read the time i'm giving to it.

For exemple the duration of the track is: 295.784424 seconds i set the currentTime to 55.0s (ie: 54.963878 or 54.963900 or 54.987755, etc... when printed as %f). The "crashes" always happen when the currentTime is 54.987755... and I really don't understand why...

So if you have any idea... ^^

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk