summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlara Modin <klarasmodin@gmail.com>2020-08-30 20:13:19 +0200
committerKlara Modin <klarasmodin@gmail.com>2020-08-30 20:13:19 +0200
commitbd93b48cc8bf1998a85f7b9e33737466ca73b7db (patch)
tree67bae7b21e512d5167498e491ceecd5ca293de16
parent0c02af1732e7680282118d0cac043c4cff21acb6 (diff)
fix bug in modfm
-rw-r--r--genwav.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/genwav.c b/genwav.c
index fa39ad8..c9d030c 100644
--- a/genwav.c
+++ b/genwav.c
@@ -125,7 +125,7 @@ void mod_fm(struct wav_header *header, int16_t data[], double(*func)(double), do
} else if ((data[i] < 0 && data[i] + val > val) || (val < 0 && data[i] + val > data[i])) {
data[i] = 0xffff;
} else {
- data[i] += val;
+ data[i] = val;
}
}
}