mattgallagher / AudioStreamer

A streaming audio player class (AudioStreamer) for Mac OS X and iPhone.
http://cocoawithlove.com
1.93k stars 553 forks source link

No Audio data found..... Yet it's an MP3 file!?!? #43

Open aderrington opened 12 years ago

aderrington commented 12 years ago

Hi, I'm trying to play an mp3 stream from the internet however it's just not working at the moment, i keep getting the error message "No audio data found" Can someone else try this stream and see if it plays for them? The address is: http://csmedia.serverroom.us:8720/;stream.mp3 I've tried a lot of different url variations but none of them work, however if i used MPMoviePlayer it will work fine with that, but i need the stream to play in the background and while the user is doing other things within the app.

I Hope someone else out there has an idea why this doesn't seem to work for me.

Many thanks,

Andrew

simoa commented 12 years ago

Someone have a solution for this issue?

whsecurity commented 12 years ago

I suppose if you use http://csmedia.serverroom.us:8720 and you hard code if it is necessary at line 1299 of AudioStreamer.m the file-type you will be ok. Change AudioFileTypeID fileTypeHint = [AudioStreamer hintForFileExtension:[[url path] pathExtension]]; With: AudioFileTypeID fileTypeHint = kAudioFileMP3Type; I hope this helps...

a363211861 commented 11 years ago

@whsecurity Thank you very much,谢谢你,方法非常有用~