开发者

Play a note of a certain frequency

开发者 https://www.devze.com 2023-02-19 10:09 出处:网络
Is it possible to set a certain frequence in the audible r开发者_开发问答ange and have the iPhone play a note at that frequency?

Is it possible to set a certain frequence in the audible r开发者_开发问答ange and have the iPhone play a note at that frequency?

I expect there might be a method like the following:

  • (void)playNote(float frequency, float volume, float duration);


There is no built-in or standard API for this. But if you know how to draw your desired waveform, you can synthesize your sound waveform at your desired frequency and amplitude into a sequence of Audio Queue or Audio Unit RemoteIO buffers.

0

精彩评论

暂无评论...
验证码 换一张
取 消