mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-13 11:44:31 +00:00
dsp.modulelate.cpp compiler warning fix
This commit is contained in:
parent
2ab4ed591d
commit
a2e4a15229
@ -114,7 +114,7 @@ AM::AM() {
|
||||
|
||||
void AM::execute(const buffer_s16_t& audio, const buffer_c8_t& buffer) {
|
||||
int32_t sample = 0;
|
||||
int8_t re, im;
|
||||
int8_t re = 0, im = 0;
|
||||
float q = 0.0;
|
||||
|
||||
for (size_t counter = 0; counter < buffer.count; counter++) {
|
||||
@ -125,8 +125,8 @@ void AM::execute(const buffer_s16_t& audio, const buffer_c8_t& buffer) {
|
||||
q = sample / 32768.0f;
|
||||
q *= 64.0f;
|
||||
switch (mode) {
|
||||
case Mode::AM: re = q + 20; im = q + 20;
|
||||
case Mode::DSB: re = q; im = q;
|
||||
case Mode::AM: re = q + 20; im = q + 20; break;
|
||||
case Mode::DSB: re = q; im = q; break;
|
||||
default: break;
|
||||
}
|
||||
buffer.p[counter] = { re, im };
|
||||
|
Loading…
Reference in New Issue
Block a user