diff options
author | André Nusser <andre.nusser@googlemail.com> | 2016-04-22 10:58:40 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2016-04-22 10:58:40 +0200 |
commit | ec9f9cfe169f7fca3083b5792f9d72dbf3af7f08 (patch) | |
tree | 3f3eb56501ec7e49f4589a24a0fc0196f589ef30 /src/drumgizmo.cc | |
parent | 0571c71aa9fb91adbd246a91a27dd607effad76b (diff) |
A little refactoring for drumgizmo.cc (premium non-breaking changes)
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r-- | src/drumgizmo.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index aa6be23..85f251b 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -107,9 +107,9 @@ bool DrumGizmo::loadkit(std::string file) loader.loadKit(&kit); #ifdef WITH_RESAMPLER - for(int i = 0; i < MAX_NUM_CHANNELS; ++i) + for(auto& chresampler: resampler) { - resampler[i].setup(kit.getSamplerate(), settings.samplerate.load()); + chresampler.setup(kit.getSamplerate(), settings.samplerate.load()); } #endif/*WITH_RESAMPLER*/ @@ -602,9 +602,9 @@ void DrumGizmo::setSamplerate(int samplerate) DEBUG(dgeditor, "%s samplerate: %d\n", __PRETTY_FUNCTION__, samplerate); settings.samplerate.store(samplerate); #ifdef WITH_RESAMPLER - for(int i = 0; i < MAX_NUM_CHANNELS; ++i) + for(auto& chresampler: resampler) { - resampler[i].setup(kit.getSamplerate(), settings.samplerate.load()); + chresampler.setup(kit.getSamplerate(), settings.samplerate.load()); } if(resampler[0].getRatio() != 1) { |