从资源库中读取数据 并播放
-(void)Eduqu{NSError *err=nil;NSString *str=[NSStringstringWithFormat:@"http://127.0.0.1/audio/upload/%d.aif",I];NSURL *fileUrl=[NSURL URLWithString:str];NSData *data=[NSData dataWithContentsOfURL:fileUrl];//设定后台播放[[AVAudioSessionsharedInstance]setCategory:AVAudioSessionCategoryPlaybackerror:&err];//设定激活状态[[AVAudioSession sharedInstance]setActive:YES error:&err];//播放player=[[AVAudioPlayer alloc]initWithData:data error:&err];[player play];}
补充:移动开发 , IOS ,