Merge pull request #118 from dforsi/fix/number-of-samples

Fix calculation of number of samples in .c2 files
pull/122/head
Guenael, VA2GKA 2021-12-26 12:08:36 -05:00 zatwierdzone przez GitHub
commit 38bac46e63
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -606,7 +606,7 @@ int32_t readC2file(float *iSamples, float *qSamples, char *filename) {
/* Get the size of the file */
fseek(fd, 0L, SEEK_END);
int32_t recsize = ftell(fd) / (2 * sizeof(float)) - 26;
int32_t recsize = (ftell(fd) - 26) / (2 * sizeof(float));
fseek(fd, 0L, SEEK_SET);
/* Limit the file/buffer to the max samples */