fix .au start position

This commit is contained in:
Alexandre Ratchov 2015-01-07 13:56:38 +01:00
parent d33d443b3a
commit 901675b4f2
2 changed files with 9 additions and 4 deletions

View File

@ -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;
}

View File

@ -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");
}