summaryrefslogtreecommitdiff
path: root/synth/programs.cpp
diff options
context:
space:
mode:
authorFlorian Jung <florian.a.jung@web.de>2012-04-11 16:36:45 +0200
committerFlorian Jung <florian.a.jung@web.de>2012-04-11 16:36:45 +0200
commit7c875a14b73d844f4f3b8390e4463610262d9415 (patch)
tree915e0023706f3f5a3a81c1707415989dde472bad /synth/programs.cpp
parentaec14a264cdb19ccbd9e53596c58da9b60308909 (diff)
added FM-list (brings between 0% and 15% performance improvement)
cast-optimisation programs gets a better operator= commented out segfaulting cleanup()
Diffstat (limited to 'synth/programs.cpp')
-rw-r--r--synth/programs.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/synth/programs.cpp b/synth/programs.cpp
index 5dae4ed..63078c0 100644
--- a/synth/programs.cpp
+++ b/synth/programs.cpp
@@ -26,15 +26,27 @@ oscillator_t& oscillator_t::operator=(const oscillator_t &that)
{
if (this!=&that)
{
+ this->output=that.output;
+ this->waveform=that.waveform;
+ this->factor=that.factor;
+ this->freq_env_amount=that.freq_env_amount;
+ this->freq_env=that.freq_env;
+ this->phase=that.phase;
+ this->tremolo_depth=that.tremolo_depth;
+ this->tremolo_lfo=that.tremolo_lfo;
+ this->vibrato_depth=that.vibrato_depth;
+ this->vibrato_lfo=that.vibrato_lfo;
+ this->custom_wave=that.custom_wave;
+ this->n_osc=that.n_osc;
+ this->ksl=that.ksl;
+ this->ksr=that.ksr;
+ this->sync=that.sync;
+
if (this->fm_strength)
delete [] this->fm_strength;
- memcpy(this, &that, sizeof(*this));
-
this->fm_strength=new fixed_t[n_osc];
memcpy(this->fm_strength, that.fm_strength, sizeof(*that.fm_strength)*n_osc);
-
- this->custom_wave=that.custom_wave;
return *this;
}