音频队列 kAudioQueueParam_Pitch
OS 10.6 下的音频队列服务文档现在包含音调参数:
kAudioQueueParam_Pitch 用于对音频队列的播放进行音调变换的音分数,范围为 -2400 到 2400 音分(其中 1200 音分对应于一个音乐八度音程。) 仅当启用时间/音调处理器时,此参数才可用。
同一文档的其他部分仍然说音量是唯一可用的参数,并且我找不到任何对上述时间/音调处理器的引用。
有谁知道这指的是什么?直接向参数写入值对播放没有影响(尽管不会抛出错误)。同样,写入音量设置也有效。
没有苹果的支持,一如既往的令人沮丧。
The documentation for Audio Queue Services under OS 10.6 now includes a pitch parameter:
kAudioQueueParam_Pitch
The number of cents to pitch-shift the audio queue’s playback, in the range -2400through 2400 cents (where 1200 cents corresponds to one musical octave.)
This parameter is usable only if the time/pitch processor is enabled.
Other sections of the same document still say that volume is the only available parameter, and I can't find any reference to the time/pitch processor mentioned above.
Does anyone know what this refers to? Directly writing a value to the parameter has no effect on playback (although no error is thrown). Similarly writing the volume setting does work.
Frustrating as usual with no support from Apple.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这仅在 iOS 7 之前的 OSX 上可用。如果您查看 AudioQueue.h,您会发现它仅在 iOS 7 上有条件地可用。[注意:在重读时,我发现您指的是 OS X,而不是 iOS,但是希望以下是跨平台的]
另外,您需要在设置time_pitch算法之前启用time_pitch队列,并且只有Spectral算法支持pitch(都支持rate)
This is only available on OSX until iOS 7. If you look at AudioQueue.h you'll find it is conditionally available only on iOS 7. [note: on re-reading I see you were referring to OS X, not iOS, but hopefully the following is cross-platform]
Also, you need to enable the queue for time_pitch before setting the time_pitch algorithm, and only the Spectral algorithm supports pitch (all of them support rate)