mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Merge pull request #282 from GullCode/proc_am_tv_warning_fix
Quoted unused vars and voided one
This commit is contained in:
commit
d59b0d44d3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user