Reputation: 16603
as far as I know, there is no simple way in Android to generate a beep (equivalent to Console.Beep(int frequency, int length) in .NET). The only one that looked promising - ToneGenerator
class, can generate only a limited selection of tones.
Do I have to generate a waveform by hand, push its data to AudioTrack and play it or is there a library or open source code that does it?
Upvotes: 2
Views: 3316
Reputation: 6794
Take a look at Playing an arbitrary tone with Android and Generate And Play A Tone In Android.
Upvotes: 1
Reputation: 11
I've been looking for the same. Found on this very site an answer:
That's a good start.
I don't have the URL but you will find the code easily in FAQ looking for someone asking for "...arbitrary frequency"
Upvotes: 1