| 3678 | } |
| 3679 | |
| 3680 | void RadioModel::removeRxAudioStream() |
| 3681 | { |
| 3682 | if (m_rxAudio.streamId == 0) { |
| 3683 | if (m_rxAudio.createPending) { |
| 3684 | m_rxAudio.removeRequested = true; |
| 3685 | logRemoteAudioRxSummary(QStringLiteral("remove deferred: create pending")); |
| 3686 | } else { |
| 3687 | logRemoteAudioRxSummary(QStringLiteral("remove skipped: no known stream")); |
| 3688 | } |
| 3689 | return; |
| 3690 | } |
| 3691 | |
| 3692 | const quint32 streamId = m_rxAudio.streamId; |
| 3693 | // Reassert our mute preference when tearing down. If another client's |
| 3694 | // stream remains open after ours is removed, this prevents the global |
| 3695 | // mute_local_audio_when_remote from silencing hardware outputs. (#1110) |
| 3696 | sendCmd(QString("radio set mute_local_audio_when_remote=%1") |
| 3697 | .arg(m_muteLocalWhenRemote ? 1 : 0)); |
| 3698 | sendCmd(QString("stream remove %1").arg(RadioStatusOwnership::hexId(streamId))); |
| 3699 | qCDebug(lcProtocol) << "RadioModel: removed remote_audio_rx stream" |
| 3700 | << RadioStatusOwnership::hexId(streamId); |
| 3701 | m_rxAudio.streamId = 0; |
| 3702 | m_rxAudio.clientHandle = 0; |
| 3703 | m_rxAudio.statusSeen = false; |
| 3704 | m_rxAudio.removeRequested = false; |
| 3705 | m_rxAudio.compression.clear(); |
| 3706 | resetAudioStreamDiagnostics(); |
| 3707 | logRemoteAudioRxSummary(QStringLiteral("remove requested")); |
| 3708 | } |
| 3709 | |
| 3710 | void RadioModel::scheduleRxAudioStreamEnsure(const QString& reason) |
| 3711 | { |
no test coverage detected