removed const from smoothing_value

I wanted to make this const to prevent changes, but since the smoothing_value needs to be calculated based on the samplerate which
is a member of jack this does not work, I dont know how to do this. Any hints welcome.
main
Georg Krause 2018-07-11 21:51:42 +02:00
parent 21e53c391d
commit 210a08f418
2 changed files with 3 additions and 4 deletions

View File

@ -78,15 +78,14 @@ Jack::Jack( std::string name ) :
client( jack_client_open ( name.c_str(), JackNullOption, 0, 0 ) ),
state( new State() ),
controllerUpdater( new ControllerUpdater() ),
clientActive(false),
smoothing_value(SMOOTHING_CONST * (44100.f / samplerate))
clientActive(false)
{
jack = this;
lastnframes=0;
samplerate = jack_get_sample_rate( client );
// calculate smoothing value for current sample rate
//smoothing_value = SMOOTHING_CONST * (44100.f / samplerate);
smoothing_value = SMOOTHING_CONST * (44100.f / samplerate);
// construct Observer classes here, not in the initializer list as the Jack*
// will be 0x0 until then.

View File

@ -137,7 +137,7 @@ public:
JackSendReturn *getJackSendReturn(int t);
const float smoothing_value;
float smoothing_value;
private:
int lastnframes;
jack_client_t* client;