summaryrefslogtreecommitdiff
path: root/channels/chan_vpb.cc
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2008-03-26 19:05:51 +0000
committerJason Parker <jparker@digium.com>2008-03-26 19:05:51 +0000
commit6412a96e43104ccad740ff224dc616ec85b89435 (patch)
tree6370de713f623ccbd19a04fe52ccc8d1aad77288 /channels/chan_vpb.cc
parenta3d7dc89037ea8e5096228cec1b0f58e2b6e629f (diff)
Large cleanup of DSP code
Per comments from dimas: 1. The code now generates DTMF_BEGIN frames in addition to DTMF_END ones. 2. "quelching" rewritten - now each detector (MF/DTMF/generic tone) may mark fragment of a frame for suppression (squelching, muting) with a call to mute_fragment. Actual muting happens only once at the very end of ast_dsp_process where all marked fragments are zeroed. This way every detector sees original data in the frame without any piece of a frame being zeroed by a detector which was run before. 3. DTMF detector tries to "mute" one block before and one block after the block where actual tone was detected. Muting of previois block is something new for this patch. Obviously this operation is not always possible - if current frame does not contain data for previous block - it is too late. But at least we make our best. Muting of next block was already done by the old code but it only affects part of the next block which is in the frame being processed. New code keeps this information in state structures so it will mute proper number of samples in the next frame(s) too. 4. Removed ast_dsp_digitdetect and ast_dsp_getdigits APIs because these are not used. 5. DSP API extended a bit - ast_dsp_was_muted() function added which returns true if DSP code was muting any fragment in the last frame. chan_zap uses this function to decide it needs to turn on confmute on the channel. This is to replace AST_FRAME_DTMF 'm'/'u' (mute/unmute) functionality. (closes issue #11968) Reported by: dimas Patches: v2-11968-dsp.patch uploaded by dimas (license 88) v4-11968-zap.patch uploaded by dimas (license 88) Tested by: dimas, qwell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_vpb.cc')
-rw-r--r--channels/chan_vpb.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/channels/chan_vpb.cc b/channels/chan_vpb.cc
index be1ed535b..bd67ab0ec 100644
--- a/channels/chan_vpb.cc
+++ b/channels/chan_vpb.cc
@@ -2400,14 +2400,6 @@ static void *do_chanreads(void *pvt)
fr = ast_dsp_process(p->owner,p->vad,fr);
if (fr && (fr->frametype == AST_FRAME_DTMF))
ast_debug(1, "%s: chanreads: Detected DTMF '%c'\n", p->dev, fr->subclass);
- if (fr->subclass == 'm') {
- /* conf mute request */
- fr->frametype = AST_FRAME_NULL;
- fr->subclass = 0;
- } else if (fr->subclass == 'u') {
- /* Unmute */
- fr->frametype = AST_FRAME_NULL;
- fr->subclass = 0;
} else if (fr->subclass == 'f') {
}
}