Commit 9a72eb0c authored by Harry van Haaren's avatar Harry van Haaren

-Caching samplerate locally in Jack

parent 7408d51d
......@@ -84,6 +84,11 @@ Jack::Jack( std::string name ) :
clientActive(false)
{
jack = this;
samplerate = jack_get_sample_rate( client );
LUPPP_NOTE("Samplerate %i", samplerate );
// construct Observer classes here, not in the initializer list as the Jack*
// will be 0x0 until then.
timeManager = new TimeManager(),
......@@ -91,7 +96,6 @@ Jack::Jack( std::string name ) :
logic = new Logic();
gridLogic = new GridLogic();
// CAREFUL: setup the size by default: otherwise malloc() is called on push_back
midiIO.reserve( CONTROLLERS_PREALLOC );
......@@ -554,7 +558,7 @@ int Jack::getBuffersize()
int Jack::getSamplerate()
{
return jack_get_sample_rate( client );
return samplerate;
}
int Jack::timebase(jack_transport_state_t state,
......
......@@ -141,6 +141,7 @@ class Jack
// JACK member variables
bool clientActive;
int samplerate;
jack_port_t* masterInput;
jack_port_t* masterOutputL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment