From: Dan Hitt <dan.hitt@gmail.com>
To: sox-users@lists.sourceforge.net
Subject: how to interpret tell_off, and the right way to use sox_seek
Date: Sat, 4 Nov 2017 00:26:37 -0700 [thread overview]
Message-ID: <CAOphizLnrajpe-7TGuxyp2pt8+_ZbVU9yc9oemNAtrybbRNqRw@mail.gmail.com> (raw)
I'm on a debian stretch box, using what i imagine is version 14, 4, 1
based on sox.h (SOX_LIB_VERSION(14, 4, 1)).
I need to seek back and forth in a file, ultimately reading the same
samples multiple times.
When i seek backwards, via a call to sox_seek(*,*, SOX_SEEK_SET) with
an offset less than the current position, the file pointer is moved,
according to ftell() applied to ->fp in the sox format structure.
But the ->tell_off field doesn't budge.
And then when i've hauled out a count of samples equal to what the
file holds (but nowhere near the end of the file, according to
ftell()) i get this error message about a premature end of the file,
and my reading stops.
Because of the great age of sox this can hardly be an unknown effect
but i can't find any mention of it on google.
So . . . what's the best way to handle it?
Should i go in and manhandle the ->tell_off field to match what i
think it should be?
Or should i reopen the file each time it has gone through its quota of samples?
Or maybe i'm just crazily wrong and i have to do something extra for sox_seek?
Anyhow, would appreciate any advice, especially if it sounds like i'm
just not making the call right.
TIA!!
dan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
next reply other threads:[~2017-11-04 7:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-04 7:26 Dan Hitt [this message]
2017-11-06 11:10 ` how to interpret tell_off, and the right way to use sox_seek Jan Stary
2017-11-06 18:08 ` Dan Hitt
2017-11-06 19:06 ` Jan Stary
2017-11-06 20:14 ` Dan Hitt
2017-11-06 21:09 ` Jan Stary
2017-11-06 21:47 ` Dan Hitt
2017-11-07 8:50 ` Jan Stary
2017-11-07 9:01 ` Jan Stary
2017-11-07 9:13 ` Jan Stary
2017-11-07 9:22 ` Jan Stary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-users
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOphizLnrajpe-7TGuxyp2pt8+_ZbVU9yc9oemNAtrybbRNqRw@mail.gmail.com \
--to=sox-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).