【发布时间】:2009-04-18 22:12:26
【问题描述】:
我找不到任何关于这个主题的文献。
【问题讨论】:
-
不,它不完全是 gina.dll,但上下文肯定是与拨号应用程序相关的编程。
我找不到任何关于这个主题的文献。
【问题讨论】:
下面的函数将在 Java 中生成一个 16 位、有符号、线性 PCM、DTMF 音调。
public byte[] generateTone(float a, float b)
{
byte samples[] = new byte[16000]; // Tone data buffer.
int frames = samples.length / 2; // Number of frames that fit in the buffer.
/* Fill the buffer with the tone data. */
for(int i = 0; i < frames; i++)
{
/* The 8000 value is the sample rate. */
short value = (short)(32768 + 63 * Math.sin(i * 2 * Math.PI * a / 8000) + 63 * Math.sin(i * 2 * Math.PI * b / 8000));
samples[i + i] = (byte)(value >>> 8);
samples[i + (i + 1)] = (byte)value;
}
return samples;
}
我希望这会有所帮助...只需将两个频率作为参数 a 和 b 插入,然后你就会得到一个音调。例如,第一个将生成为:
byte tone[] = generateTone(697, 1209);
【讨论】:
DTMF 仅涵盖数字 0 到 9 以及字母 #, *, A, B, C, 和 D。所以如果你的问题是在 D 之后是否存在任何支持字母的东西,那么答案是否定的。
【讨论】:
“DTMF“触摸”音在 CCITT 第 VI 卷中定义:关于电话交换和信令的一般建议建议 Q.23:按钮电话机的技术特性。”。本文档及其相关标准文档将告诉您比您想知道的更多有关 DTMF 音调的信息。 "
这句话来自here。该网页涵盖了所有基础知识。
【讨论】: