¿AVAudioPlayer recibe un error?

AVAudioPlayer getting error like this:

The operation couldn’t be completed. (OSStatus error 1954115647.)

I download audio mp3 file from some url using NSURLConnection y es downloading 100% and save to DB as BLOB.

And then I am trying to play that file from AVAudioPlayer Me gusta esto:

AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:data error:&error];
if (player == nil) 
    NSLog(@"AudioPlayer did not load properly: %@", [error localizedDescription]);
    [player play];

What I am doing wrong in this?

preguntado el 08 de noviembre de 11 a las 12:11

Consulte nuestra página stackoverflow.com/questions/4901709/… -

1 Respuestas

Did you try using initializing AVAudioPlay with URL and pointing the URL to the blob file ?

(id)initWithContentsOfURL:(NSURL *)url error:(NSError **)outError

It worked for me with the local URL setting.

Respondido 01 Feb 12, 11:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.