AVAudioPlayer getting error like this:
The operation couldn’t be completed. (OSStatus error 1954115647.)
I download audio mp3 file from some url using NSURLConnection and it is downloading 100% and save to DB as BLOB.
And then I am trying to play that file from AVAudioPlayer like this:
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:data error:&error];
if (player == nil)
{
NSLog(@"AudioPlayer did not load properly: %@", [error localizedDescription]);
}
else
{
[player play];
}
What I am doing wrong in this?
Did you try using initializing
AVAudioPlaywith URL and pointing the URL to the blob file ?It worked for me with the local URL setting.