renamed a few things

main
Tom Early 4 years ago
parent ab80b55219
commit ca057dd185

@ -52,7 +52,7 @@ void CController::Stop()
reader.Close();
dstar_device.CloseDevice();
dmr_device.CloseDevice();
dmrsf_device.CloseDevice();
}
bool CController::CheckTCModules() const
@ -157,13 +157,13 @@ bool CController::InitDevices()
{
dstar_device.OpenDevice(deviceset.front().first, deviceset.front().second, 921600);
deviceset.pop_front();
dmr_device.OpenDevice(deviceset.front().first, deviceset.front().second, 921600);
dmrsf_device.OpenDevice(deviceset.front().first, deviceset.front().second, 921600);
deviceset.pop_front();
}
// and start them up!
dstar_device.Start();
dmr_device.Start();
dmrsf_device.Start();
deviceset.clear();
@ -190,7 +190,7 @@ void CController::ReadReflectorThread()
dstar_device.AddPacket(packet);
break;
case ECodecType::dmr:
dmr_device.AddPacket(packet);
dmrsf_device.AddPacket(packet);
break;
case ECodecType::c2_1600:
case ECodecType::c2_3200:
@ -284,7 +284,7 @@ void CController::Codec2toAudio(std::shared_ptr<CTranscoderPacket> packet)
}
// the only thing left is to encode the two ambe, so push the packet onto both AMBE queues
dstar_device.AddPacket(packet);
dmr_device.AddPacket(packet);
dmrsf_device.AddPacket(packet);
}
void CController::ProcessC2Thread()
@ -329,7 +329,7 @@ void CController::RouteDstPacket(std::shared_ptr<CTranscoderPacket> packet)
{
// codec_in is dstar, the audio has just completed, so now calc the M17 and DMR
codec2_queue.push(packet);
dmr_device.AddPacket(packet);
dmrsf_device.AddPacket(packet);
}
else if (packet->AllCodecsAreSet())
{

@ -29,12 +29,10 @@
#include "UnixDgramSocket.h"
#include "configure.h"
enum class EAmbeType { dstar, dmr };
class CController
{
public:
std::mutex dstar_mux, dmr_mux;
std::mutex dstar_mux, dmrsf_mux;
CController();
bool Start();
@ -52,7 +50,7 @@ protected:
CUnixDgramWriter writer;
std::unordered_map<char, std::unique_ptr<CCodec2>> c2_16, c2_32;
CDV3003 dstar_device{Encoding::dstar};
CDV3003 dmr_device{Encoding::dmr};
CDV3003 dmrsf_device{Encoding::dmrsf};
CPacketQueue codec2_queue;
std::mutex send_mux;

@ -201,7 +201,7 @@ bool CDV3003::OpenDevice(const std::string &serialno, const std::string &desc, i
}
}
status = FT_SetBaudRate(ftHandle, baudrate );
status = FT_SetBaudRate(ftHandle, baudrate);
if (status != FT_OK)
{
FTDI_Error("FT_SetBaudRate", status);
@ -221,7 +221,7 @@ bool CDV3003::OpenDevice(const std::string &serialno, const std::string &desc, i
return true;
}
status = FT_SetTimeouts(ftHandle, 200, 200 );
status = FT_SetTimeouts(ftHandle, 200, 200);
if (status != FT_OK)
{
FTDI_Error("FT_SetTimeouts", status);
@ -229,7 +229,7 @@ bool CDV3003::OpenDevice(const std::string &serialno, const std::string &desc, i
}
description.assign(desc);
description.append(": ");
description.append(":");
description.append(serialno);
std::cout << "Opened " << description << std::endl;
@ -610,9 +610,9 @@ void CDV3003::ReadDevice()
}
else
{
Controller.dmr_mux.lock();
Controller.dmrsf_mux.lock();
Controller.RouteDmrPacket(packet);
Controller.dmr_mux.unlock();
Controller.dmrsf_mux.unlock();
}
}
}

@ -98,7 +98,7 @@ struct dv3003_packet {
using SDV3003_Packet = struct dv3003_packet;
enum class Encoding { dstar, dmr };
enum class Encoding { dstar, dmrsf };
class CDV3003 {
public:

@ -8,9 +8,9 @@ This will build a new kind of hybrid transcoder that uses AMBE DVSI-based hardwa
This is the only transcoder that will work with the [URF reflector](https://github.com/n7tae/urfd).
This software is loosely based on LX3JL's **ambed**, but is easily different enough to be considered an entirely original work. Here are some major differences:
This software is loosely based on LX3JL's **ambed**, but is easily different enough to be considered an entirely original work. Here are some major differences with ambed:
- tcd mixes both hardware-based and software-based vocoders, providing a bridge between the closed source vocoders used in DStar, DMR and YSF and open-source vocoders used in M17.
- tcd uses both hardware-based and software-based vocoders, providing a bridge between the closed source vocoders used in DStar, DMR and YSF and open-source vocoders used in M17.
- **UNIX Sockets** are used to communicate between the reflector and this transcoder. This greatly simplifies the code and *significantly* improves transcoding performance.
- AMBE vocoders are dedicated to an assigned reflector channel. This prevents overloading when processing multiple voice streams and provides the best possible performance for the reflector's clients.

Loading…
Cancel
Save

Powered by TurnKey Linux.