Re: Beep ( duration, frequency )
Re: Beep ( duration, frequency )
- Subject: Re: Beep ( duration, frequency )
- From: Quincey Morris <email@hidden>
- Date: Wed, 23 Sep 2015 17:55:23 -0700
- Feedback-id: 167118m:167118agrif8a:167118s8RTAG9mCo:SMTPCORP
On Sep 23, 2015, at 17:40 , Jens Alfke <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden