diff --git a/client/controller.cpp b/client/controller.cpp index 4352d3f7..eb31bf02 100644 --- a/client/controller.cpp +++ b/client/controller.cpp @@ -146,7 +146,7 @@ bool Controller::sendTimeSyncMessage(long after) } -void Controller::start(const PcmDevice& pcmDevice, const std::string& host, size_t port, size_t latency) +void Controller::start(const PcmDevice& pcmDevice, const std::string& host, size_t port, int latency) { pcmDevice_ = pcmDevice; latency_ = latency; diff --git a/client/controller.h b/client/controller.h index 8680abed..aa3f3007 100644 --- a/client/controller.h +++ b/client/controller.h @@ -46,7 +46,7 @@ class Controller : public MessageReceiver { public: Controller(); - void start(const PcmDevice& pcmDevice, const std::string& host, size_t port, size_t latency); + void start(const PcmDevice& pcmDevice, const std::string& host, size_t port, int latency); void stop(); /// Implementation of MessageReceiver. @@ -64,7 +64,7 @@ private: std::thread controllerThread_; SampleFormat sampleFormat_; PcmDevice pcmDevice_; - size_t latency_; + int latency_; std::unique_ptr clientConnection_; std::unique_ptr stream_; std::unique_ptr decoder_; diff --git a/client/snapClient.cpp b/client/snapClient.cpp index 12beab8c..edcbb027 100644 --- a/client/snapClient.cpp +++ b/client/snapClient.cpp @@ -72,7 +72,7 @@ int main (int argc, char **argv) string soundcard("default"); string host(""); size_t port(1704); - size_t latency(0); + int latency(0); int processPriority(-3); Switch helpSwitch("", "help", "produce help message"); @@ -82,7 +82,7 @@ int main (int argc, char **argv) Value portValue("p", "port", "server port", 1704, &port); Value soundcardValue("s", "soundcard", "index or name of the soundcard", "default", &soundcard); Implicit daemonOption("d", "daemon", "daemonize, optional process priority [-20..19]", -3, &processPriority); - Value latencyValue("", "latency", "latency of the soundcard", 0, &latency); + Value latencyValue("y", "latency", "latency of the soundcard", 0, &latency); OptionParser op("Allowed options"); op.add(helpSwitch)