我正在尝试从我之前保存在那里的目录路径中播放 wav 文件,但我无法播放,我希望有人可以帮助我
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *directoryPath = [paths objectAtIndex:0];
directoryPath =[NSString stringWithFormat:@"%@/%@",directoryPath,@"path1.wav",nil];
audioPath1 = [[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:directoryPath] error:NULL];
[audioPath1 play];