lin
2025-08-01 633231e833e21d5b8b1c00cb15aedb62b3b78e8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Portable C version of peakval
 * Copyright 2004 Phil Karn, KA9Q
 */
#include <stdlib.h>
#include "fec.h"
int peakval_port(signed short *b,int len){
  int peak = 0;
  int a,i;
 
  for(i=0;i<len;i++){
    a = abs(b[i]);
    if(a > peak)
      peak = a;
  }
  return peak;
}