Merge pull request #282 from GullCode/proc_am_tv_warning_fix

Quoted unused vars and voided one
This commit is contained in:
Erwin Ried 2021-02-03 22:09:06 +01:00 committed by GitHub
commit d59b0d44d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,14 +43,15 @@ void WidebandFMAudio::execute(const buffer_c8_t& buffer) {
const buffer_c16_t buffer_c16 {spectrum.data(),spectrum.size(),buffer.sampling_rate};
channel_spectrum.feed(buffer_c16);
int8_t re, im;
int8_t mag;
int8_t re ;
//int8_t im;
//int8_t mag;
for (size_t i = 0; i < 128; i++)
{
re = buffer.p[i].real();
im = buffer.p[i].imag();
mag = __builtin_sqrtf((re * re) + (im * im)) ;
//im = buffer.p[i].imag();
//mag = __builtin_sqrtf((re * re) + (im * im)) ;
const unsigned int v = re + 127.0f; //timescope
audio_spectrum.db[i] = std::max(0U, std::min(255U, v));
}
@ -75,6 +76,7 @@ void WidebandFMAudio::on_message(const Message* const message) {
}
void WidebandFMAudio::configure(const WFMConfigureMessage& message) {
(void)message; // avoid warning
configured = true;
}