reset DTMF detector on default

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@547 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 19 years ago
parent 65550b96ed
commit 34b2a4a2b9

@ -194,13 +194,18 @@ void AmDtmfDetector::setInbandDetector(Dtmf::InbandDetectorType t) {
ERROR("trying to use spandsp DTMF detector without support for it"
"recompile with -D USE_SPANDSP\n");
}
if (!m_inbandDetector.get())
m_inbandDetector.reset(new AmSemsInbandDtmfDetector(this));
return;
#else
if (t != m_inband_type) {
if ((t != m_inband_type) || (!m_inbandDetector.get())) {
if (t == Dtmf::SEMSInternal) {
DBG("Setting internal DTMF detector\n");
m_inbandDetector.reset(new AmSemsInbandDtmfDetector(this));
} else { // if t == SpanDSP
DBG("Setting spandsp DTMF detector\n");
m_inbandDetector.reset(new AmSpanDSPInbandDtmfDetector(this));
}
m_inband_type = t;

Loading…
Cancel
Save