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=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID shortcircuit=no autolearn=ham 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 95C4520281 for ; Tue, 7 Nov 2017 09:01:52 +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 1eBzlX-0006il-7B; Tue, 07 Nov 2017 09:01:51 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eBzlW-0006iS-08 for sox-users@lists.sourceforge.net; Tue, 07 Nov 2017 09:01:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=URRuu1IRZ1tKaK4X7Fb5be300/2/snR1zpvtz5wCW5s=; b=Hd7f+um+j4DvkAG77D/AIty3o9 /NWOY3j3BzlBU58Z84HPUVpMxoW9bk5XiE8CBX8+kK2do+ak6Vccf9r+BKR6dS0ATc8F1EvkGxk/o OP+nCEjUHZgGHPuB0FJzMef4D8Im5hsRjEHcN6r8JN58Furr5jjwLVj3k2LkrtIc6raw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To: From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=URRuu1IRZ1tKaK4X7Fb5be300/2/snR1zpvtz5wCW5s=; b=FF2V6YX9R2gKZsKWv+APB3pTTm 4HlhnNRCWIIZx5KTbZiXnqS2SEprJJ1qganpLC9L7BL1KcFG6EHEDmijrkuV7B7LYsfQGvlHUDQTe UYSOOsgjhoc9lCXl0RmULe87gS5a0Ey8ADWCTpMUy1zk/FAeAsEjzf30hmK8YG/kTqT0=; Received: from mx.stare.cz ([79.98.77.229]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) id 1eBzlU-0002Vk-Qm for sox-users@lists.sourceforge.net; Tue, 07 Nov 2017 09:01:49 +0000 Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id 0cabb54c for ; Tue, 7 Nov 2017 10:01:41 +0100 (CET) Date: Tue, 7 Nov 2017 10:01:41 +0100 From: Jan Stary To: sox-users@lists.sourceforge.net Message-ID: <20171107090140.GA10645@www.stare.cz> Mail-Followup-To: sox-users@lists.sourceforge.net References: <20171106111001.GA80730@www.stare.cz> <20171106190645.GA61378@www.stare.cz> <20171106210932.GA41280@www.stare.cz> <20171107085036.GA34760@www.stare.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171107085036.GA34760@www.stare.cz> User-Agent: Mutt/1.7.1 (2016-10-04) X-Headers-End: 1eBzlU-0002Vk-Qm Subject: Re: 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 On Nov 07 09:50:36, hans@stare.cz 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 _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users