diff options
author | Johannes Schickel | 2011-08-09 23:59:31 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-08-10 00:00:12 +0200 |
commit | 3635efd92cdc48661abd23780520626a12be09d4 (patch) | |
tree | 5b10554b95206b440767edec19b835dc59f837cb /audio/softsynth | |
parent | b95bbb2ace6a240da8b6ee54ceb66c6ab2484ab7 (diff) | |
download | scummvm-rg350-3635efd92cdc48661abd23780520626a12be09d4.tar.gz scummvm-rg350-3635efd92cdc48661abd23780520626a12be09d4.tar.bz2 scummvm-rg350-3635efd92cdc48661abd23780520626a12be09d4.zip |
CMS: Simplify code a tiny bit.
Diffstat (limited to 'audio/softsynth')
-rw-r--r-- | audio/softsynth/cms.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/audio/softsynth/cms.cpp b/audio/softsynth/cms.cpp index 889f19a6f9..a675da3f03 100644 --- a/audio/softsynth/cms.cpp +++ b/audio/softsynth/cms.cpp @@ -163,19 +163,15 @@ void CMSEmulator::update(int chip, int16 *buffer, int length) { struct SAA1099 *saa = &_saa1099[chip]; int j, ch; + if (chip == 0) { + memset(buffer, 0, sizeof(int16)*length*2); + } + /* if the channels are disabled we're done */ if (!saa->all_ch_enable) { - /* init output data */ - if (chip == 0) { - memset(buffer, 0, sizeof(int16)*length*2); - } return; } - if (chip == 0) { - memset(buffer, 0, sizeof(int16)*length*2); - } - for (ch = 0; ch < 2; ch++) { switch (saa->noise_params[ch]) { case 0: saa->noise[ch].freq = 31250.0 * 2; break; |