Hey,
so what I am trying to do is to download an mp3 file from the web and then play it for the user.
I have been able to do this using
Code:
+ (id)dataWithContentsOfURL:(NSURL *)aURL
and playing the NSData using AVAudioPlayer, but the problem is that
when I start downloading the program freezes until the file has downloaded and then plays.
Is there a way to stop the program from freezing, and read the amount of bytes it has loaded out of the total amount of bytes the file has?
Also, is it possible to play the audio file as it is being downloaded (aka streaming) without using an audio streaming server? Just to use the URL straight to the file and stream from there?
Thanks!