ioctl(ixj1, IXJCTL_INIT_TONE, pTone)
Return Value
Returns the value sent in freq0 if the tone definition was accepted.
Parameters
pTone - A pointer to an IXJ_TONE structure.typedef struct { int tone_index; int freq0; int gain0; int freq1; int gain1; } IXJ_TONE;
Remarks
Allows tone table elements to be changed by passing a pointer to an IXJ_TONE structure with the desired values. The tone_index element of the structure indicates which entry in the tone table to change. Only entries 13 - 27 are allowed to be changed to prevent disrupting standard DTMF tones. Unused frequency and gain elements in the structure should be set to 0.
The default tone table is listed in the 8020/8021/8022 DSP documents. It is reproduced here for convenience.
See Also:
PHONE_SET_TONE_ON_TIME, PHONE_SET_TONE_OFF_TIME, PHONE_GET_TONE_ON_TIME, PHONE_GET_TONE_OFF_TIME, PHONE_PLAY_TONE, PHONE_CPT_STOP, PHONE_GET_TONE_STATE
Example:
IXJ_TONE *pTone; pTone.tone_index = 13; pTone.freq0 = hz440; pTone.gain0 = 1; pTone.freq1 = 0; pTone.gain1 = 0; result = ioctl(ixj1, IXJCTL_INIT_TONE); if(result == pTone.freq0) printf("tone updated"); else printf("tone update failed");
©1996-2001 Quicknet Technologies, Inc.