Client uses less memory allocations

This commit is contained in:
badaix 2019-12-12 21:46:23 +01:00
parent 6999391f43
commit e9a5a36855
7 changed files with 135 additions and 44 deletions

View file

@ -178,6 +178,16 @@ void Controller::start(const PcmDevice& pcmDevice, const std::string& host, size
}
void Controller::run(const PcmDevice& pcmDevice, const std::string& host, size_t port, int latency)
{
pcmDevice_ = pcmDevice;
latency_ = latency;
clientConnection_.reset(new ClientConnection(this, host, port));
worker();
// controllerThread_ = thread(&Controller::worker, this);
}
void Controller::stop()
{
LOG(DEBUG) << "Stopping Controller" << endl;