an experiment with a 2nd shared ptr

main
Tom Early 4 years ago
parent 181839b76a
commit 5a84e03402

@ -204,14 +204,18 @@ void CController::ReadReflector()
dstar_device[devnum]->packet_queue.push(packet);
//increment the dstar vocoder index
IncrementDStarVocoder();
// encode the audio to dmr
devnum = current_dmr_vocoder / 3;
//send the audio to the corrent dmr vocoder
dmr_device[devnum]->SendAudio(current_dmr_vocoder%3, packet->GetAudio());
//push the packet onto the dmr vocoder's queue
dmr_device[devnum]->packet_queue.push(packet);
//increment the dmr vocoder index
IncrementDMRVocoder();
{
// encode the audio to dmr
// make a second shared ptr to the same packet
auto packet2 = std::make_shared<CTranscoderPacket>(packet);
devnum = current_dmr_vocoder / 3;
//send the audio to the corrent dmr vocoder
dmr_device[devnum]->SendAudio(current_dmr_vocoder%3, packet2->GetAudio());
//push the packet onto the dmr vocoder's queue
dmr_device[devnum]->packet_queue.push(packet2);
//increment the dmr vocoder index
IncrementDMRVocoder();
}
break;
case ECodecType::none:
default:

@ -87,7 +87,7 @@ void CTranscoderPacket::SetDStarData(const uint8_t *dstar)
memcpy(tcpacket.dstar, dstar, 9);
dstar_set = true;
}
void CTranscoderPacket::SetDMRData(const uint8_t *dmr )
void CTranscoderPacket::SetDMRData(const uint8_t *dmr)
{
memcpy(tcpacket.dmr, dmr, 9);
dmr_set = true;

Loading…
Cancel
Save

Powered by TurnKey Linux.