Merge pull request #674 from pinkavaj/pi-wav

Fix read_wav_header return value type
pull/677/head
Mark Jessop 2022-09-25 08:32:20 +09:30 zatwierdzone przez GitHub
commit d3076ada7e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 6 dodań i 12 usunięć

Wyświetl plik

@ -310,7 +310,7 @@ static int findstr(char *buff, char *str, int pos) {
return i;
}
float read_wav_header(pcm_t *pcm, FILE *fp) {
int read_wav_header(pcm_t *pcm, FILE *fp) {
char txt[4+1] = "\0\0\0\0";
unsigned char dat[4];
int byte, p=0;
@ -625,6 +625,7 @@ static float complex lowpass0(float complex buffer[], ui32_t sample, ui32_t taps
}
return (float complex)w;
}
static float complex lowpass(float complex buffer[], ui32_t sample, ui32_t taps, float *ws) {
ui32_t n;
ui32_t s = sample % taps;
@ -1549,7 +1550,7 @@ int find_header(dsp_t *dsp, float thres, int hdmax, int bitofs, int opt_dc) {
#else
// external FSK demod: read float32 soft symbols
float read_wav_header(pcm_t *pcm, FILE *fp) {}
int read_wav_header(pcm_t *pcm, FILE *fp) {}
int f32buf_sample(dsp_t *dsp, int inv) {}
int read_slbit(dsp_t *dsp, int *bit, int inv, int ofs, int pos, float l, int spike) {}
int read_softbit(dsp_t *dsp, hsbit_t *shb, int inv, int ofs, int pos, float l, int spike) {}
@ -1684,4 +1685,3 @@ int find_softbinhead(FILE *fp, hdb_t *hdb, float *score) {
return EOF;
}

Wyświetl plik

@ -1,5 +1,3 @@
#include <math.h>
#include <complex.h>
@ -169,7 +167,7 @@ typedef struct {
} hdb_t;
float read_wav_header(pcm_t *, FILE *);
int read_wav_header(pcm_t *, FILE *);
int f32buf_sample(dsp_t *, int);
int read_slbit(dsp_t *, int*, int, int, int, float, int);
int read_softbit(dsp_t *, hsbit_t *, int, int, int, float, int);
@ -183,5 +181,3 @@ int find_header(dsp_t *, float, int, int, int);
int f32soft_read(FILE *fp, float *s);
int find_binhead(FILE *fp, hdb_t *hdb, float *score);
int find_softbinhead(FILE *fp, hdb_t *hdb, float *score);

Wyświetl plik

@ -78,7 +78,7 @@ int findstr(char *buff, char *str, int pos) {
}
static
float read_wav_header(pcm_t *pcm, FILE *fp) {
int read_wav_header(pcm_t *pcm, FILE *fp) {
char txt[4+1] = "\0\0\0\0";
unsigned char dat[4];
int byte, p=0;
@ -1612,4 +1612,3 @@ int main(int argc, char *argv[]) {
return 0;
}

Wyświetl plik

@ -485,7 +485,7 @@ static int findstr(char *buff, char *str, int pos) {
}
static
float read_wav_header(pcm_t *pcm, FILE *fp) {
int read_wav_header(pcm_t *pcm, FILE *fp) {
char txt[4+1] = "\0\0\0\0";
unsigned char dat[4];
int byte, p=0;
@ -2404,4 +2404,3 @@ int main(int argc, char **argv) {
return 0;
}