Cleanup Jack time adjust code

Remove unnecessary member var and rename variables
for more clarity.
This commit is contained in:
Marcus Weseloh 2024-06-02 12:21:38 +02:00 committed by Johannes Pohl
parent 03eda48d6d
commit ba0f9f209d
2 changed files with 3 additions and 4 deletions

View file

@ -238,9 +238,9 @@ bool JackStream::openJackConnection()
cpt::to_string(jack_sample_rate) + ".");
}
jack_time_t connect_time = jack_get_time();
jackConnectTime_ = std::chrono::steady_clock::now();
jackTimeAdjust_ = chrono::duration_cast<chrono::microseconds>(jackConnectTime_.time_since_epoch()).count() - connect_time;
jack_time_t jackTime = jack_get_time();
auto now = std::chrono::steady_clock::now();
jackTimeAdjust_ = chrono::duration_cast<chrono::microseconds>(now.time_since_epoch()).count() - jackTime;
LOG(DEBUG, LOG_TAG) << name_ << ": Jack server time adjustment is " << jackTimeAdjust_ << "\n";

View file

@ -66,7 +66,6 @@ protected:
jack_client_t* client_;
std::vector<jack_port_t*> ports_;
jack_nframes_t jackConnectFrames_;
std::chrono::time_point<std::chrono::steady_clock> jackConnectTime_;
jack_time_t jackTimeAdjust_;
SampleFormat jackSampleFormat_;