mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-28 17:57:05 +02:00
Cleanup Jack time adjust code
Remove unnecessary member var and rename variables for more clarity.
This commit is contained in:
parent
03eda48d6d
commit
ba0f9f209d
2 changed files with 3 additions and 4 deletions
|
@ -238,9 +238,9 @@ bool JackStream::openJackConnection()
|
||||||
cpt::to_string(jack_sample_rate) + ".");
|
cpt::to_string(jack_sample_rate) + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
jack_time_t connect_time = jack_get_time();
|
jack_time_t jackTime = jack_get_time();
|
||||||
jackConnectTime_ = std::chrono::steady_clock::now();
|
auto now = std::chrono::steady_clock::now();
|
||||||
jackTimeAdjust_ = chrono::duration_cast<chrono::microseconds>(jackConnectTime_.time_since_epoch()).count() - connect_time;
|
jackTimeAdjust_ = chrono::duration_cast<chrono::microseconds>(now.time_since_epoch()).count() - jackTime;
|
||||||
|
|
||||||
LOG(DEBUG, LOG_TAG) << name_ << ": Jack server time adjustment is " << jackTimeAdjust_ << "\n";
|
LOG(DEBUG, LOG_TAG) << name_ << ": Jack server time adjustment is " << jackTimeAdjust_ << "\n";
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,6 @@ protected:
|
||||||
jack_client_t* client_;
|
jack_client_t* client_;
|
||||||
std::vector<jack_port_t*> ports_;
|
std::vector<jack_port_t*> ports_;
|
||||||
jack_nframes_t jackConnectFrames_;
|
jack_nframes_t jackConnectFrames_;
|
||||||
std::chrono::time_point<std::chrono::steady_clock> jackConnectTime_;
|
|
||||||
jack_time_t jackTimeAdjust_;
|
jack_time_t jackTimeAdjust_;
|
||||||
SampleFormat jackSampleFormat_;
|
SampleFormat jackSampleFormat_;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue