zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit dae36026f7c419189ae048e3003cba508e3b89ce
parent 35e63af5d17e04ea994c2d981ec1298f16bd84b7
Author: michiboo <chanmickyyun@gmail.com>
Date:   Tue, 23 Jul 2019 00:11:24 +0300

fix trigger test

Diffstat:
Msrc/Synth/WatchPoint.cpp | 16+++++-----------
Msrc/Tests/TriggerTest.h | 4++--
2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/Synth/WatchPoint.cpp b/src/Synth/WatchPoint.cpp @@ -152,15 +152,9 @@ bool WatchManager::active(const char *id) const bool WatchManager::trigger_active(const char *id) const { - for(int i=0; i<MAX_WATCH; ++i){ - //printf("\n current watch id :%s and id : %s\n",active_list[i], id); - if(!strcmp(active_list[i], id)){ - //printf("\n testing trigger %s\n",active_list[i]); - if(trigger[i]) - return true; - } - } - return false; + for(int i=0; i<MAX_WATCH; ++i) + if(!strcmp(active_list[i], id)) + return trigger[i]; } int WatchManager::samples(const char *id) const @@ -243,8 +237,8 @@ void WatchManager::satisfy(const char *id, float *f, int n) } if(trigger[selected]){ - data_list[selected][sample_list[selected]] = f[i]; - sample_list[selected]++; + data_list[selected][sample_list[selected]] = f[i]; + sample_list[selected]++; } } diff --git a/src/Tests/TriggerTest.h b/src/Tests/TriggerTest.h @@ -125,10 +125,10 @@ class TriggerTest:public CxxTest::TestSuite w->add_watch("noteout1"); note->noteout(outL, outR); sampleCount += synth->buffersize; - //w->tick(); + w->tick(); note->noteout(outL, outR); sampleCount += synth->buffersize; - //w->tick(); + w->tick(); TS_ASSERT(w->trigger_active("noteout1")); TS_ASSERT(w->trigger_active("noteout")); note->noteout(outL, outR);