AudioStreamer
AudioStreamer copied to clipboard
Progress doesn't update after a period of time (iPhone)
Experiencing the issue with short (and large) MP3.
The streamer progress doesn't update after a period of time, the streamer falls in AS_STOPPING_EOF.
Try to test the iPhoneStreamingPlayer example with a small MP3 like http://www.universal-soundbank.com/mp3/sounds/17412.mp3
streamer.duration is 4.3 sec but the player stops progress at 1.7 ... while playing normally until the end !!
I used the iPhone demo app and took a bunch of sounds from http://sounddogs.com/results.asp?Type=3&CategoryID=3018&SubcategoryID=1
Result: all the sounds are not correctly played. Progress stops shortly +/- randomly.
I'd like to use this class in my project but unfortunately this issue is to huge!
My MP3 file duration is 12.7 sec, but progress is stop at 9.5, but sound is hearing.
I get the same bug, the "progress" stops 3 seconds before the actual song ends (for some reason)...
I get the same bug.. watching this.
Same here. There seems to be a partial but incomplete fix available here: http://stackoverflow.com/questions/7952318/audiostreamer-doesnt-show-the-correct-play-time.
CHANGE:
if (sampleRate > 0 && ![self isFinishing])
{
if (state != AS_PLAYING && state != AS_PAUSED && state != AS_BUFFERING)
{
return lastProgress;
}
...
}
TO:
if (sampleRate > 0 && (state == AS_STOPPING || ![self isFinishing]))
{
if (state != AS_PLAYING && state != AS_PAUSED && state != AS_BUFFERING && state != AS_STOPPING)
{
return lastProgress;
}
...
}
in progress method
I've added the change as suggested by azone. I haven't tested thoroughly but it shouldn't cause any problems. I'll close this when I've tested more thoroughly.