how to solve run time error of The operation couldn’t be completed. (OSStatus error -43.)?
===

I am beginner of iPhone. I want to play audio.for that purpose I have used AVAudioPlayer.. but that object return null value.. and also give run time error of The operation couldn’t be completed. (OSStatus error -43.)

This is the code I used

    -(IBAction)sound
    {
       NSError *error;
       int currentsound;
        path=[[NSBundle mainBundle] pathForResource:@"Animalfile" ofType:@"plist"];
        dict=[NSDictionary dictionaryWithContentsOfFile:path];
    
        animalaudio=[dict valueForKey:@"audio"];
        NSLog(@"print:%@",dict);
        NSLog(@"printanimal%@",animalaudio);
        audiolist=[animalaudio objectAtIndex:currentsound];
        NSLog(@"audiolist:%@",audiolist);
        url=[NSURL fileURLWithPath:audiolist];
        NSLog(@"url:%@",url);
         audioplayer=[[AVAudioPlayer alloc]initWithContentsOfURL:url error:&error];
        NSLog(@"audioplayer:%@",audioplayer);
         if( audioplayer == nil ){
           
            NSLog(@"Failed with reason: %@", [error localizedDescription]);
        }
        else{
            [audioplayer play];
        }
      }

in that url also return the mp3 file but why url not pass in AVAudioPlayer because of audioplayer return the null but not return mp3 file.so, which code I write in AVAudioPlayer?give any suggestion and source code....


