Re: how to interpret tell_off, and the right way to use sox_seek
Jan Stary <[email protected]>
| Newsgroups | gmane.comp.audio.sox |
|---|---|
| Message-ID | <[email protected]> |
On Nov 07 09:50:36, [email protected] wrote: > So I think you are right. It does seek back to the begining of the sine wave > (thus reporting 0 as the first sample value in the buffer), but it gets > exhausted at EOF anyway. I suspect now it is a bug in sox_seek() > if we are calling it right. Much as I like sox, I don't trust this code very much: int sox_seek(sox_format_t * ft, sox_uint64_t offset, int whence) { /* FIXME: Implement SOX_SEEK_CUR and SOX_SEEK_END. */ if (whence != SOX_SEEK_SET) return SOX_EOF; /* FIXME: return SOX_EINVAL */ /* If file is a seekable file and this handler supports seeking, * then invoke handler's function. */ if (ft->seekable && ft->handler.seek) return (*ft->handler.seek)(ft, offset); return SOX_EOF; /* FIXME: return SOX_EBADF */ } ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot