diff options
| -rw-r--r-- | src/synth.c | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/src/synth.c b/src/synth.c index 9c974e5..41522a6 100644 --- a/src/synth.c +++ b/src/synth.c @@ -94,8 +94,14 @@ static ssize_t synth_fill(xas_synth *synth,                            xas_audio_stream *stream) {      size_t i; -    for (i=0; i<count; i++) { -        samples[i] = synth->sample(synth); +    if (synth->frequency > 0) { +        for (i=0; i<count; i++) { +            samples[i] = synth->sample(synth); +        } +    } else { +        for (i=0; i<count; i++) { +            samples[i] = 0; +        }      }      return count; | 
 
    