Remove the FM networking sample rate conversion.

This commit is contained in:
Jonathan Naylor
2021-04-11 19:15:23 +01:00
parent a5ee4284f2
commit cfe9e0fba4
6 changed files with 13 additions and 184 deletions

View File

@@ -21,23 +21,17 @@
#include "RingBuffer.h"
#include "UDPSocket.h"
#include "Timer.h"
#if !defined(_WIN32) && !defined(_WIN64)
#include <samplerate.h>
#endif
#include <cstdint>
#include <string>
enum FM_NETWORK_PROTOCOL {
FMNP_MMDVM,
FMNP_USRP
};
class CFMNetwork {
public:
CFMNetwork(const std::string& protocol, const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int sampleRate, bool debug);
CFMNetwork(const std::string& protocol, const std::string& myAddress, unsigned int myPort, const std::string& gatewayAddress, unsigned int gatewayPort, bool debug);
~CFMNetwork();
bool open();
@@ -61,18 +55,10 @@ private:
CUDPSocket m_socket;
sockaddr_storage m_addr;
unsigned int m_addrLen;
unsigned int m_sampleRate;
bool m_debug;
bool m_enabled;
CRingBuffer<unsigned char> m_buffer;
CTimer m_pollTimer;
unsigned int m_seqNo;
#if !defined(_WIN32) && !defined(_WIN64)
SRC_STATE* m_incoming;
SRC_STATE* m_outgoing;
#endif
void writePoll();
};
#endif