mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
-Caching samplerate locally in Jack
This commit is contained in:
parent
7408d51d33
commit
9a72eb0cf5
2 changed files with 7 additions and 2 deletions
|
@ -84,6 +84,11 @@ Jack::Jack( std::string name ) :
|
||||||
clientActive(false)
|
clientActive(false)
|
||||||
{
|
{
|
||||||
jack = this;
|
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*
|
// construct Observer classes here, not in the initializer list as the Jack*
|
||||||
// will be 0x0 until then.
|
// will be 0x0 until then.
|
||||||
timeManager = new TimeManager(),
|
timeManager = new TimeManager(),
|
||||||
|
@ -91,7 +96,6 @@ Jack::Jack( std::string name ) :
|
||||||
logic = new Logic();
|
logic = new Logic();
|
||||||
gridLogic = new GridLogic();
|
gridLogic = new GridLogic();
|
||||||
|
|
||||||
|
|
||||||
// CAREFUL: setup the size by default: otherwise malloc() is called on push_back
|
// CAREFUL: setup the size by default: otherwise malloc() is called on push_back
|
||||||
midiIO.reserve( CONTROLLERS_PREALLOC );
|
midiIO.reserve( CONTROLLERS_PREALLOC );
|
||||||
|
|
||||||
|
@ -554,7 +558,7 @@ int Jack::getBuffersize()
|
||||||
|
|
||||||
int Jack::getSamplerate()
|
int Jack::getSamplerate()
|
||||||
{
|
{
|
||||||
return jack_get_sample_rate( client );
|
return samplerate;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Jack::timebase(jack_transport_state_t state,
|
int Jack::timebase(jack_transport_state_t state,
|
||||||
|
|
|
@ -141,6 +141,7 @@ class Jack
|
||||||
|
|
||||||
// JACK member variables
|
// JACK member variables
|
||||||
bool clientActive;
|
bool clientActive;
|
||||||
|
int samplerate;
|
||||||
|
|
||||||
jack_port_t* masterInput;
|
jack_port_t* masterInput;
|
||||||
jack_port_t* masterOutputL;
|
jack_port_t* masterOutputL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue