mirror of https://github.com/ericonr/sndio.git
fix .au start position
This commit is contained in:
parent
d33d443b3a
commit
901675b4f2
|
@ -163,7 +163,7 @@ char aiff_id_fl32[4] = {'f', 'l', '3', '2'};
|
|||
char aiff_id_ulaw[4] = {'u', 'l', 'a', 'w'};
|
||||
char aiff_id_alaw[4] = {'a', 'l', 'a', 'w'};
|
||||
|
||||
char au_id[4] = {0x2e, 's', 'n', 'd'};
|
||||
char au_id[4] = {'.', 's', 'n', 'd'};
|
||||
|
||||
static inline unsigned int
|
||||
le16_get(le16_t *p)
|
||||
|
@ -737,6 +737,10 @@ afile_au_readhdr(struct afile *f)
|
|||
log_puts(": unsupported number of channels in .au file\n");
|
||||
return 0;
|
||||
}
|
||||
if (lseek(f->fd, f->startpos, SEEK_SET) < 0) {
|
||||
log_puts("failed to seek to .au file payload\n");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,9 +250,10 @@ slot_new(char *path, int mode, struct aparams *par, int hdr,
|
|||
break;
|
||||
}
|
||||
if (s->mode == SIO_PLAY && s->afile.endpos >= 0) {
|
||||
log_puts(", ");
|
||||
log_puti(s->afile.endpos - s->afile.startpos);
|
||||
log_puts(" bytes");
|
||||
log_puts(", bytes ");
|
||||
log_puti(s->afile.startpos);
|
||||
log_puts("..");
|
||||
log_puti(s->afile.endpos);
|
||||
}
|
||||
log_puts("\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue