mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-18 03:26:15 +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;
|
pcmDevice_ = pcmDevice;
|
||||||
latency_ = latency;
|
latency_ = latency;
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Controller : public MessageReceiver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Controller();
|
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();
|
void stop();
|
||||||
|
|
||||||
/// Implementation of MessageReceiver.
|
/// Implementation of MessageReceiver.
|
||||||
|
@ -64,7 +64,7 @@ private:
|
||||||
std::thread controllerThread_;
|
std::thread controllerThread_;
|
||||||
SampleFormat sampleFormat_;
|
SampleFormat sampleFormat_;
|
||||||
PcmDevice pcmDevice_;
|
PcmDevice pcmDevice_;
|
||||||
size_t latency_;
|
int latency_;
|
||||||
std::unique_ptr<ClientConnection> clientConnection_;
|
std::unique_ptr<ClientConnection> clientConnection_;
|
||||||
std::unique_ptr<Stream> stream_;
|
std::unique_ptr<Stream> stream_;
|
||||||
std::unique_ptr<Decoder> decoder_;
|
std::unique_ptr<Decoder> decoder_;
|
||||||
|
|
|
@ -72,7 +72,7 @@ int main (int argc, char **argv)
|
||||||
string soundcard("default");
|
string soundcard("default");
|
||||||
string host("");
|
string host("");
|
||||||
size_t port(1704);
|
size_t port(1704);
|
||||||
size_t latency(0);
|
int latency(0);
|
||||||
int processPriority(-3);
|
int processPriority(-3);
|
||||||
|
|
||||||
Switch helpSwitch("", "help", "produce help message");
|
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<size_t> portValue("p", "port", "server port", 1704, &port);
|
||||||
Value<string> soundcardValue("s", "soundcard", "index or name of the soundcard", "default", &soundcard);
|
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);
|
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");
|
OptionParser op("Allowed options");
|
||||||
op.add(helpSwitch)
|
op.add(helpSwitch)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue