Skip to content

Commit

Permalink
CMS: Simplify code a tiny bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Aug 9, 2011
1 parent b95bbb2 commit 3635efd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions audio/softsynth/cms.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 3635efd

Please sign in to comment.