From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3561 216.34.176.0/20 X-Spam-Status: No, score=-2.4 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS, T_DKIM_INVALID shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A2E3E20281 for ; Sat, 4 Nov 2017 07:26:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1eAsqs-00067I-0O; Sat, 04 Nov 2017 07:26:46 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.89) (envelope-from ) id 1eAsqq-000679-RV for sox-users@lists.sourceforge.net; Sat, 04 Nov 2017 07:26:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From:MIME-Version; bh=DTT40X0De38WSYlSM0lME8uN9SQFUMtWM8yW302sIWw=; b=LZ342oWKgLp0lF1gu1HPiMSLZMekVFvcAylZfuudjXUKvz+sbMpNSxDJH7o5AAAa7io03OTbZvfls9BI6df7Kx+k0Y+XmmcnTY5CJlPv8SjazyLdtUbrDfrqLji3vSftkTYKUI3Cw8SkuNRpohWIRXZ6nPK1Gd2h8Io1GTUBjTw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From:MIME-Version; bh=DTT40X0De38WSYlSM0lME8uN9SQFUMtWM8yW302sIWw=; b=elbAV5aStVp6nRsoJl/+YcOqWTpjGxVQJqWnONQXhEbGuq8wq4o/3gYaBZRyHpEH0e+nVB6lcMXv9YRDHV+melATXQBdU2bmuw9xaXldZ5KfjFGmLGPa6xncdiE74Q39UkovLYbqNcAmMS0NCnrPbWr+rCionFwIiRnhHG9i3CE=; Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.176 as permitted sender) client-ip=74.125.82.176; envelope-from=dan.hitt@gmail.com; helo=mail-ot0-f176.google.com; Received: from mail-ot0-f176.google.com ([74.125.82.176]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1eAsqq-0006lK-0w for sox-users@lists.sourceforge.net; Sat, 04 Nov 2017 07:26:44 +0000 Received: by mail-ot0-f176.google.com with SMTP id h37so4492224otd.3 for ; Sat, 04 Nov 2017 00:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DTT40X0De38WSYlSM0lME8uN9SQFUMtWM8yW302sIWw=; b=Bg3DYrECL2H1wWzxl+APC/Tf2v+7uxvBQK5uv4rk/jQFDefuqloPuJ6kXjtJt4patu 44gNbXGDXPTmQsaMfKXuEZDWnOX4s2cb68phgsBu/rJVNftoasNw45w3dNgm9ZHIN67D MEnNwOoI4IAUTH9wAjP9hYa/EauHBlI49Em5lgDaj9CsrwY1luqeAHcg/mF1k6CHb0eg 0cOVmZaewXDdYO8WnQBt6jvoabaGMrBV2zllj7FhJnZwqAUbvN3p+w/xVqPKW42xwags uMVvlrvqDKzWHJ2mWviJoIrM9VrWCQlN0WC7S/K2FCqHP/j2WVFqfxToal9y+f96qW+n srPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DTT40X0De38WSYlSM0lME8uN9SQFUMtWM8yW302sIWw=; b=kG297i0jlrqP8gaI6ygd2oSQmqrNQGgrScOHtO7QItXdIR52PrV5UAe+9X/65tlFKc d9Ikm620qS1RxLVl56hse1jMp1faGSzSmoKYVOC6Uint+qcD2ri/W1ePTYcG748Q/NIw 4mKJGxD5gu4yJPSD/BxsQV/M6KO6co2wJf+PmkWJv72GXgKjWt7Bt4XZcmqYK9JpmUv+ dBzV/SjMVBKklZ8qsIyzsuVlUI4vM90kVwQll2TOgbOmsEZHSe1keKQiHVOKKGZ7g5pF DpUQbBh+5WwKCfWYbTMbllYqbU0ynauSAxd4E2A1XcmanZFYs1OAu/p3VaXmGV8DYvgZ UsMg== X-Gm-Message-State: AJaThX5pHArE5J1mIVWW7N2o15/oTq8turjEOAxbMWhJibBDnUODx3Lm bFpa+ZURKHSZS3vK98xNY0YOGYddwYQcdmmmdzg= X-Google-Smtp-Source: ABhQp+RNVJuUEVLj2kCvla9jYAy8s6wYb01r7B20ijZbiFYd9P8M+M0b/essNTDyhYk56g5U1IelP2f+8enZ4ogAB0c= X-Received: by 10.157.53.77 with SMTP id l13mr5579655ote.403.1509780398378; Sat, 04 Nov 2017 00:26:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.162.36 with HTTP; Sat, 4 Nov 2017 00:26:37 -0700 (PDT) From: Dan Hitt Date: Sat, 4 Nov 2017 00:26:37 -0700 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1eAsqq-0006lK-0w Subject: how to interpret tell_off, and the right way to use sox_seek X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: sox-users-bounces@lists.sourceforge.net 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