mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-03 03:56:44 -04:00
Reduce type size for int16_t squared values.
This commit is contained in:
parent
ef37bbd851
commit
9fb22dfd1f
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue