Settings AVAudioTimePitchAlgorithmVarispeed for AVFoundationAudioSettings

后端 未结 1 526
忘掉有多难
忘掉有多难 2021-01-22 21:31

According to these docs, I can change certain settings for AVAudioPlayer, including AVAudioTimePitchAlgorithmVarispeed setting. How would I set this value? Do I nee

相关标签:
1条回答
  • 2021-01-22 21:54

    If no required use of AVAudioPlayer, you can use AVPlayer

    AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:url];
    playerItem.audioTimePitchAlgorithm = AVAudioTimePitchAlgorithmTimeDomain;
    AVPlayer *player = [AVPlayer playerWithPlayerItem:playerItem];
    [player play];
    
    0 讨论(0)
提交回复
热议问题