pull/28/head^2
Zilog80 2020-12-10 23:27:50 +01:00
rodzic be6bc50542
commit 1d92e9e782
3 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -257,11 +257,13 @@ float read_wav_header(pcm_t *pcm, FILE *fp) {
int sample_rate = 0, bits_sample = 0, channels = 0;
if (fread(txt, 1, 4, fp) < 4) return -1;
if (strncmp(txt, "RIFF", 4)) return -1;
if (strncmp(txt, "RIFF", 4) && strncmp(txt, "RF64", 4)) return -1;
if (fread(txt, 1, 4, fp) < 4) return -1;
// pos_WAVE = 8L
if (fread(txt, 1, 4, fp) < 4) return -1;
if (strncmp(txt, "WAVE", 4)) return -1;
if (strncmp(txt, "WAVE", 4)) return -1;
// pos_fmt = 12L
for ( ; ; ) {
if ( (byte=fgetc(fp)) == EOF ) return -1;

Wyświetl plik

@ -256,11 +256,13 @@ float read_wav_header(pcm_t *pcm) {
int sample_rate = 0, bits_sample = 0, channels = 0;
if (fread(txt, 1, 4, fp) < 4) return -1;
if (strncmp(txt, "RIFF", 4)) return -1;
if (strncmp(txt, "RIFF", 4) && strncmp(txt, "RF64", 4)) return -1;
if (fread(txt, 1, 4, fp) < 4) return -1;
// pos_WAVE = 8L
if (fread(txt, 1, 4, fp) < 4) return -1;
if (strncmp(txt, "WAVE", 4)) return -1;
if (strncmp(txt, "WAVE", 4)) return -1;
// pos_fmt = 12L
for ( ; ; ) {
if ( (byte=fgetc(fp)) == EOF ) return -1;

Wyświetl plik

@ -386,11 +386,13 @@ static int read_wav_header(FILE *fp, int wav_channel) {
int byte, p=0;
if (fread(txt, 1, 4, fp) < 4) return -1;
if (strncmp(txt, "RIFF", 4)) return -1;
if (strncmp(txt, "RIFF", 4) && strncmp(txt, "RF64", 4)) return -1;
if (fread(txt, 1, 4, fp) < 4) return -1;
// pos_WAVE = 8L
if (fread(txt, 1, 4, fp) < 4) return -1;
if (strncmp(txt, "WAVE", 4)) return -1;
if (strncmp(txt, "WAVE", 4)) return -1;
// pos_fmt = 12L
for ( ; ; ) {
if ( (byte=fgetc(fp)) == EOF ) return -1;