no timeout for ProcessC2Thread

main
Tom Early 4 years ago
parent 65d0c7702c
commit ab80b55219

@ -292,25 +292,22 @@ void CController::ProcessC2Thread()
while (keep_running) while (keep_running)
{ {
auto packet = codec2_queue.pop(); auto packet = codec2_queue.pop();
if (packet)
switch (packet->GetCodecIn())
{ {
switch (packet->GetCodecIn()) case ECodecType::c2_1600:
{ case ECodecType::c2_3200:
case ECodecType::c2_1600: // this is an original M17 packet, so decode it to audio
case ECodecType::c2_3200: // Codec2toAudio will send it on for AMBE processing
// this is an original M17 packet, so decode it to audio Codec2toAudio(packet);
// Codec2toAudio will send it on for AMBE processing break;
Codec2toAudio(packet);
break; case ECodecType::dstar:
case ECodecType::dstar: case ECodecType::dmr:
case ECodecType::dmr: // codec_in was AMBE, so we need to calculate the the M17 data
// codec_in was AMBE, so we need to calculate the the M17 data AudiotoCodec2(packet);
AudiotoCodec2(packet); break;
break;
}
} }
else
std::this_thread::sleep_for(std::chrono::milliseconds(5));
} }
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.