On Dec 28, 2014, at 12:05 PM, Raglan T. Tiger <[email protected]> wrote:
> 
> Is it possible with Cocoa to generate a tone of a specified frequency and 
> duration to play synchronously?
> 
> 
> -rags
> 

You can use Audio Unit Framework from Objective-C or Swift to generate sound on 
the fly. For example, a sine wave of a specific frequency and duration. There 
used to be a really good example (sample code) of this in the developer 
library, but it seems to have been removed, and some supporting functions 
deprecated in favor of doing things the iOS way. There is a much more 
complicated example in the developer library now but it’s not clear how this 
would be used in a stand-alone program (i.e., not an AU plug-in).

I’ve created an application for both iOS and OS X that uses Audio Unit 
Framework to generate sounds. If I can find the time to rip out the essentials 
in a stand-alone demo (I cannot give away proprietary code), then I’ll pass it 
along. In the meantime this link is what the working code is based on:

https://developer.apple.com/library/mac/documentation/AudioUnit/Reference/AudioUnit_Framework/_index.html

Paul

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to