> On Dec 28, 2014, at 12:05 PM, Raglan T. Tiger <r...@crusaderrabbit.net> wrote:
> 
> Is it possible with Cocoa to generate a tone of a specified frequency and 
> duration to play synchronously?

You might be able to do this with AVFoundation, or you may need to descend to 
the C-based CoreAudio APIs.

I don't think there's any built-in frequency generator component  … and in any 
case you haven't specified what waveform you want — sine? square? sawtooth? 
triangle? You'll probably want to create a "wavetable" (an array of samples 
that contains one complete cycle of the waveform), import that as an audio 
source, and then play it as a loop.

In any case, fasten your seat belt and prepare for some turbulence. I've found 
Apple's audio APIs to be the second most difficult and frustrating ones to work 
with on the platform (after crypto/security.)

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to