public class DTMF
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char[][] |
DTMF_CHARACTERS
The list of valid DTMF characters.
|
static double[] |
DTMF_FREQUENCIES
The list of valid DTMF frequencies.
|
Constructor and Description |
---|
DTMF() |
Modifier and Type | Method and Description |
---|---|
static float[] |
audioBufferDTMF(double f0,
double f1,
int size)
Creates an audio buffer in a float array of the defined size.
|
static float[] |
generateDTMFTone(char character)
Generate a DTMF - tone for a valid DTMF character.
|
static boolean |
isDTMFCharacter(char character)
Checks if the given character is present in DTMF_CHARACTERS.
|
public static final double[] DTMF_FREQUENCIES
public static final char[][] DTMF_CHARACTERS
public static float[] generateDTMFTone(char character)
character
- a valid DTMF character (present in DTMF_CHARACTERS}public static boolean isDTMFCharacter(char character)
character
- the character to check.public static float[] audioBufferDTMF(double f0, double f1, int size)
f0
- The first fundamental frequency.f1
- The second fundamental frequency.size
- The size of the float array (sample rate is 44.1kHz).