diff --git a/Controller.cpp b/Controller.cpp index b585610..b76559d 100644 --- a/Controller.cpp +++ b/Controller.cpp @@ -281,13 +281,16 @@ void CController::RouteDstPacket(std::shared_ptr packet) { if (ECodecType::dstar == packet->GetCodecIn()) { - // codec_in is dstar, the audio has just completed, so now calc the DMR + // codec_in is dstar, the audio has just completed, so now calc the M17 and DMR + c2_mux.lock(); + codec2_queue.push(packet); + c2_mux.unlock(); add_dmr_mux.lock(); dmr_device.AddPacket(packet); add_dmr_mux.unlock(); #ifdef DEBUG if (packet->IsLast()) - Dump(packet, "Routed to dmr:"); + Dump(packet, "DStar audio routed to codec2 and dmr:"); #endif } else if (packet->AllCodecsAreSet()) @@ -302,12 +305,15 @@ void CController::RouteDmrPacket(std::shared_ptr packet) { if (ECodecType::dmr == packet->GetCodecIn()) { + c2_mux.lock(); + codec2_queue.push(packet); + c2_mux.unlock(); add_dst_mux.lock(); dstar_device.AddPacket(packet); add_dst_mux.unlock(); #ifdef DEBUG if (packet->IsLast()) - Dump(packet, "Routed to dstar:"); + Dump(packet, "DMR audio routed to dstar:"); #endif } else if (packet->AllCodecsAreSet()) diff --git a/DV3003.cpp b/DV3003.cpp index 4b5211e..59538c0 100644 --- a/DV3003.cpp +++ b/DV3003.cpp @@ -405,8 +405,6 @@ void CDV3003::FeedDevice() break; } std::this_thread::sleep_for(std::chrono::milliseconds(5)); - std::cout << "depth: ch=" << ch_depth << " sp=" << sp_depth << std::endl; - std::cout.flush(); } if (keep_running)