Questions tagged [tone-generator]
25 questions
10
votes
3 answers
ToneGenerator slows down app very heavily
I'm writing a timer app, with a service and beeping every 30 seconds (actually there's a drop down that changes that time).
However when I make the app beep the beep lasts very long and freezes the app, eventually (after about 5 seconds) it finishes…

user2386276
- 548
- 5
- 19
5
votes
1 answer
Error generating beep using ToneGenerator class
I'm new to android development
I'm working in an android app that simply changes volume and play beep "to preview current sound level"
I use startTone in ToneGenerator class to generate this beep , like this :
ToneGenerator tg = new…

Mahmoud Farahat
- 5,364
- 4
- 43
- 59
4
votes
1 answer
Android ToneGenerator startTone() very slow on the first call
I'm calling ToneGenerator.startTone() repeatedly to issue short bursts of sound. But on the first call, it blocks for a long period of time. So the first burst is way too long. Here's an example:
Member variables:
private ToneGenerator…

Emmanuel
- 16,791
- 6
- 48
- 74
4
votes
2 answers
ToneGenerator crashes in android 6.0
In my application i am using ToneGenerator to play simple sound. When test my application by compiling the application with 6.0, my application randomy crashing due to ToneGenerator init method. Below is the exception.
java.lang.RuntimeException:…

Ashok Reddy Narra
- 577
- 10
- 27
4
votes
0 answers
Clicking in ALSA tone generator
I'm learning to use ALSA on a Raspberry Pi 2. I've written a small test program in C++ to generate a 440 Hz test tone. It makes the tone, but there is a clicking sound about twice per second in the tone.
Does anyone have an idea why this might be…

wisner
- 523
- 1
- 5
- 18
2
votes
0 answers
React native tone generator example
I am new to react-native, i am trying to integrate library of from npm but could not find proper example. I want to generate tone for both android and iOS platform in react native using frequency,volume, duration.

Yogita
- 21
- 1
2
votes
1 answer
how to know when the tonegenerator has stopped playing
I kneed to know when my tone generator has stopped playing.
I want to play the dtmf tone for 50 ms and then wait 50 to play the next tone.
i wanted to use this code.
private void playtones() {
new Thread(new Runnable() {
public void…

Poul Toftgaard
- 59
- 1
- 6
2
votes
1 answer
How to make ToneGenerator play longer than 3 seconds
I have this code
ToneGenerator tg=new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 100);
tg.startTone(ToneGenerator.TONE_CDMA_ONE_MIN_BEEP, 5000);
works fine but the playing of the beep is very shot (around 200ms)
No matter if I set 5000ms or…

Lukap
- 31,523
- 64
- 157
- 244
1
vote
0 answers
Once created, can ToneGenerator's volume be changed?
I need to replay a single tone repeatedly with the volume reducing until it is quiet.
I'm creating a ToneGenerator object with:
ToneGenerator toneGenerator;
toneGenerator = new ToneGenerator( AudioManager.STREAM_MUSIC, 100);
But, I have not found…

kralvarado
- 458
- 5
- 13
1
vote
1 answer
Creating a continuous tone in MATLAB whose frequency varies in real-time depending on user input
I am currently working on a graphing program in MATLAB that takes input and maps a point to x-y space using this input. However, the program should also output a continuous tone whose frequency varies depending on the location of the point.
I was…

user2059807
- 671
- 1
- 5
- 16
1
vote
2 answers
Converting 16-bit short to 32 bit float
In the tone generator example for iOS:http://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
I am trying to convert a short array to Float32 in iOS.
Float32 *buffer = (Float32 *)ioData->mBuffers[channel].mData;
…

ssk
- 9,045
- 26
- 96
- 169
1
vote
0 answers
How to Detect the ringback tone of an outgoing Calls in Android
I would like to know how to detect the ringback tone of an outgoing call, in order to compute the period between the detection of an outgoing call and the ringback tone.
Now, I can detect the outgoing call, but not the ringback tone.

Bess
- 11
- 1
- 5
1
vote
2 answers
Android volume of a beep generated by ToneGenerator
I am using the ToneGenarator in order to play a continuous beep.
The problem is that the volume is far too low!
We can't hear anything when the volume is lower than 8.
And with the maximum volume, it is not loud at all...
Is it a limitation of the…

Tiralka
- 41
- 1
- 6
0
votes
1 answer
Play 2 different frequencies one Left and one Right
I am using Basic4Android (B4A).
I created a sub that plays 2 different frequencies,
Let's call them FreqLeft and FreqRight.
Both of them is playing in one channel (Mono).
I want to play FreqLeft in the Left Channel (Left Ear Audio Speaker)
and…

Hedi
- 21
- 5
0
votes
0 answers
Tone Generator With SoundFonts in Xcode, Is It Possible?
I am creating a musical app which needs to generate musical notes. The app needs the ability to produce pitches that sound like realistic instrument based on changing input from the user. These pitches could also be between note (ex. Ab 5 cents…

Jake
- 9
- 3