I think this will work much faster:
if (m_pMicDucking->getMode() != 0 && dynamic_cast<EngineMicrophone>(pChannel)) {
If it is the case, we might want to replace other occurrences like this as well.