mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-05-08 06:06:50 +00:00
Reduce type size for int16_t squared values.
This commit is contained in:
parent
ef37bbd851
commit
9fb22dfd1f
@ -33,9 +33,9 @@ bool FMSquelch::execute(buffer_s16_t audio) {
|
|||||||
};
|
};
|
||||||
non_audio_hpf.execute(audio, squelch_energy);
|
non_audio_hpf.execute(audio, squelch_energy);
|
||||||
|
|
||||||
uint64_t max_squared = 0;
|
uint32_t max_squared = 0;
|
||||||
for(const auto sample : squelch_energy_buffer) {
|
for(const auto sample : squelch_energy_buffer) {
|
||||||
const uint64_t sample_squared = sample * sample;
|
const uint32_t sample_squared = sample * sample;
|
||||||
if( sample_squared > max_squared ) {
|
if( sample_squared > max_squared ) {
|
||||||
max_squared = sample_squared;
|
max_squared = sample_squared;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user