mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-17 19:16:14 +02:00
allow negative latency
This commit is contained in:
parent
d196441f7c
commit
43e3daaf9b
3 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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> clientConnection_;
|
||||
std::unique_ptr<Stream> stream_;
|
||||
std::unique_ptr<Decoder> decoder_;
|
||||
|
|
|
@ -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<size_t> portValue("p", "port", "server port", 1704, &port);
|
||||
Value<string> soundcardValue("s", "soundcard", "index or name of the soundcard", "default", &soundcard);
|
||||
Implicit<int> daemonOption("d", "daemon", "daemonize, optional process priority [-20..19]", -3, &processPriority);
|
||||
Value<size_t> latencyValue("", "latency", "latency of the soundcard", 0, &latency);
|
||||
Value<int> latencyValue("y", "latency", "latency of the soundcard", 0, &latency);
|
||||
|
||||
OptionParser op("Allowed options");
|
||||
op.add(helpSwitch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue