iphone - Is there an alternative to using an NSTimer to display remaining time of audio file with AVAudioPlayer? -
i play music avaudioplayer
, want display remaining time. seems many suggest nstimer fires every second afraid inefficient , prone error. since nstimer
not precise timing (i have heard) can timer fires twice within same second of audio, , countdown jumps on 1 second. pull model.
is there more savvy way avaudioplayer
call countdown every time second ticks away?
while nstimer semi-inaccurate, can still have call every second or , information currenttime
property of song, , compare duration
property. can calculate remaining time etc.
Comments
Post a Comment