如题,AVFoundation.framework中多了一组类,AVPlayer,AVPlayerItem等。有没有什么巧办法通过这些类取得采样数据?
貌似,AVAudioPlayer可以。
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:fileUrl error:&error];
float sampleRate = [[player.settings valueForKey:AVSampleRateKey] floatValue];
正文完