syedhali / EZAudio

An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.
Other
4.94k stars 822 forks source link

MPMediaItem URL error #279

Closed rikola closed 8 years ago

rikola commented 8 years ago

I can't create an EZAudioFile from an MPMediaItem URL in my app. When I try to do it I get this error Error: Failed to dispose of ext audio file (-50).
Do you know how to get it to work with iTunes library URL's?

dennislysenko commented 8 years ago

One possible workaround would be to quickly copy the iTunes library URL to a file that you know EZAudioFile can work with. Here is a gist that provides a class with a single method to do just that:

https://gist.github.com/abeldomingues/fe8fa797fd55603f2f4a

I guess it would be preferable to be able to stream these MPMediaItems directly, but this should be a good enough workaround for now if it works. Also, change the audio format on line 50 to something more familiar (MP3/M4A) if it has trouble reading the PCM file, though I can't foresee that being a big issue seeing as PCM is supposedly pretty great for reading audio data.

rikola commented 8 years ago

Thanks. This looks like it will do the trick.
I'm still not sure why the ipod URL prefix breaks EZAudioFile though. Strange stuff.

bintu1234 commented 7 years ago

@rikola I am also facing same issue in objective c, How you resolve thjis issue Please help me

vickydhas commented 7 years ago

Hey friends, Anybody got hold of this issue. Still get this error

Error: Failed to dispose of ext audio file (-50) error, and suspect this happens if the playing file is recorded with very small interval of 3-4 sec.