more checking

main
Tom Early 4 years ago
parent dbea2774e7
commit c2c6a5808f

@ -437,15 +437,6 @@ void CDV3003::FeedDevice()
} }
else // no packet is in the input queue else // no packet is in the input queue
{ {
#ifdef DEBUG
static unsigned int maxsize = 0;
unsigned int s = inq.size();
if (s > maxsize)
{
std::cout << "inq size=" << s << std::endl;
maxsize = s;
}
#endif
std::this_thread::sleep_for(std::chrono::milliseconds(5)); std::this_thread::sleep_for(std::chrono::milliseconds(5));
} }
} }
@ -530,6 +521,15 @@ void CDV3003::ReadDevice()
void CDV3003::AddPacket(const std::shared_ptr<CTranscoderPacket> packet) void CDV3003::AddPacket(const std::shared_ptr<CTranscoderPacket> packet)
{ {
inq.push(packet); inq.push(packet);
#ifdef DEBUG
static unsigned int maxsize = 0;
unsigned int s = inq.size();
if (s > maxsize)
{
std::cout << "inq size=" << s << std::endl;
maxsize = s;
}
#endif
} }
bool CDV3003::SendAudio(const uint8_t channel, const int16_t *audio) const bool CDV3003::SendAudio(const uint8_t channel, const int16_t *audio) const

@ -118,9 +118,7 @@ private:
std::atomic<unsigned int> ch_depth, sp_depth; std::atomic<unsigned int> ch_depth, sp_depth;
std::atomic<bool> keep_running; std::atomic<bool> keep_running;
CPacketQueue vocq[3]; // we need a queue for each vocoder CPacketQueue vocq[3]; // we need a queue for each vocoder
std::mutex voc_mux[3];
CPacketQueue inq; // and input queue CPacketQueue inq; // and input queue
std::mutex in_mux;
std::future<void> feedFuture, readFuture; std::future<void> feedFuture, readFuture;
std::string devicepath, productid, version; std::string devicepath, productid, version;

Loading…
Cancel
Save

Powered by TurnKey Linux.