On Sep 23, 2015, at 17:40 , Jens Alfke <j...@mooseyard.com> wrote:
> 
> No, there’s no simple API for this.

There’s a simple way to play an arbitrary finite-length sound (AVAudioPlayer). 
All you need is a sound file (or a couple of sound files) that can easily be 
created in an audio editor. It’s only 2 lines to play such a file — maybe only 
one, if there’s a convenience method.

This has the advantage that the sound can be tailored to the intended use. If 
you want alert “beeps” of various pitches, you can customize the sound files so 
they don’t start and stop abruptly. If you want a pure sine wave, you can do 
that.

That’s why I wish Rags had answered your earlier “what are you trying to do?” 
question with a bit less snark. If we actually knew the answer, we could likely 
give more useful advice.

_______________________________________________

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