diff options
author | rekado <rekado@elephly.net> | 2013-01-16 08:18:35 +0800 |
---|---|---|
committer | rekado <rekado@elephly.net> | 2013-01-16 08:18:35 +0800 |
commit | 3bae19eb9196300b9ad89becabaff72313dd0d82 (patch) | |
tree | b31fbafe8ecda02fccb9756c185423ad4c206173 /src | |
parent | e21d94d5ec2e15bd5d2ce60cf55ea962a1c951eb (diff) |
move cmax constant to where it is used
Diffstat (limited to 'src')
-rw-r--r-- | src/mdaPiano.cpp | 2 | ||||
-rw-r--r-- | src/mdaPiano.h | 1 | ||||
-rw-r--r-- | src/mdaPianoVoice.cpp | 2 |
3 files changed, 1 insertions, 4 deletions
diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp index fbd0665..a47e912 100644 --- a/src/mdaPiano.cpp +++ b/src/mdaPiano.cpp @@ -27,8 +27,6 @@ static const char* sample_file = "samples.raw"; mdaPiano::mdaPiano(double rate) : LV2::Synth<mdaPianoVoice, mdaPiano>(p_n_ports, p_midi) { - cmax = 0x7F; //just in case... - load_samples(&waves); load_kgrp(kgrp); diff --git a/src/mdaPiano.h b/src/mdaPiano.h index cebb777..42fe736 100644 --- a/src/mdaPiano.h +++ b/src/mdaPiano.h @@ -41,7 +41,6 @@ private: mdaPianoVoice *voices[NVOICES]; uint32_t activevoices; short *waves; - uint32_t cmax; uint32_t sustain; }; diff --git a/src/mdaPianoVoice.cpp b/src/mdaPianoVoice.cpp index 19e944f..b2fba28 100644 --- a/src/mdaPianoVoice.cpp +++ b/src/mdaPianoVoice.cpp @@ -191,7 +191,7 @@ if(!(r > -2.0f) || !(r < 2.0f)) ///////////////////// } comb[cpos] = l + r; - ++cpos &= cmax; + ++cpos &= 0x7F; x = cdep * comb[cpos]; //stereo simulator // TODO: processReplacing simply assigned instead of adding |