Play a note of a certain 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.
精彩评论