i've one ios application that plays music by streaming and using the mattgallagher AudioStreamer library it doesn't show the real playtime and never stop play at 0 secs...
Does anyone know why this happens??
Thanks a lot!
i've one ios application that plays music by streaming and using the mattgallagher AudioStreamer library it doesn't show the real playtime and never stop play at 0 secs...
Does anyone know why this happens??
Thanks a lot!
I experienced something similar. Have a look at the progress method in AudioStreamer.m
Now, the reason for the progress not being displayed correctly lies within the two if-statements. When your
AudioStreamer
is nearly finished (probably when all data is loaded), it'sisFinishing
becomes true, which makes it return the cached value for progress. Also, the streamer state becomesAS_STOPPING
, which makes the second if-statement return thelastProgress
. What you really want is to update the progress right until the streamer stops.My following modification to the code does this and it seems to work fine. HOWEVER, given the general quality of the AudioStreamer and the fact that it's developed by Matt Gallagher, those if statements might be as they are for a reason. So far, I did not experience any crashes or alike with my modified code but you should thoroughly test it in your app. Note, that, once the streamer is done, I don't query the progress anymore. If you do, test if it works :)