From 498ce65db7d789b9639b96240555e48ab3a910b6 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sun, 17 Aug 2008 00:44:06 -0500 Subject: [PATCH] cleaned up process_command --- softsynth.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/softsynth.c b/softsynth.c index 50ec96b..627d021 100644 --- a/softsynth.c +++ b/softsynth.c @@ -64,21 +64,18 @@ static int process_command(struct synth_t *s, char *buf, int start) switch (*cp) { case 'f': cmd = CMD_SET_FREQUENCY; - cp++; break; case 'p': cmd = CMD_SET_PITCH; - cp++; break; case 's': cmd = CMD_SET_RATE; - cp++; break; case 'v': cmd = CMD_SET_VOLUME; - cp++; break; } + cp++; break; case 24: cmd = CMD_FLUSH; @@ -91,8 +88,10 @@ static int process_command(struct synth_t *s, char *buf, int start) cp++; break; } + if (cmd != CMD_FLUSH && cmd != CMD_UNKNOWN) queue_add_cmd(cmd, adj, value); + return cp - (buf + start); }