delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/03/16/07:43:55

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=YITxzBfiZ1nQCDNFK9AFE3IMDNnE04022TmDG67jrAi3nWxkEfXqS
rd8HXeEEh8MkiUhEWjX/qaqDXcQi3VmyGin2TMKAGO/w2VX1ys04p0vI5sea0SrR
JyqRlLIslurzze7Cs6HJiwCoG/iu2LuNn7idG0zHiH+CRZfsQgZ3cM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=DO72wi2WOzm51mC+oaUwc+PEw+c=; b=TquhzDXuT4cgU4vbdByFBsw5WYDD
LB28UbWxvoW91eKIuY9STbVDA6+P2euhDqikbbm6mh1RIL9yN9BMfiBj+qK4qFOe
cSq99UiMdeiAhU4I+KiuwmWMNUuY2vqHKLAe/u4dA9Y9bCVSlicq3GxQcbTMtgaH
jIWWfL62N1ijva4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Sun, 16 Mar 2014 12:43:32 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: sox - package is broken
Message-ID: <20140316114332.GB400@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <b0f9be09644f90eadb0a5d479b74ad56 DOT squirrel AT www DOT physik DOT tu-berlin DOT de> <20140310111427 DOT GE2828 AT calimero DOT vinschen DOT de> <5324E98D DOT 2090806 AT tiscali DOT co DOT uk>
MIME-Version: 1.0
In-Reply-To: <5324E98D.2090806@tiscali.co.uk>
User-Agent: Mutt/1.5.21 (2010-09-15)

--0F1p//8PRICkK4MW
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mar 16 00:00, David Stacey wrote:
> On 10/03/2014 11:14, Corinna Vinschen wrote:
> >Does anybody feel up to the task to debug this issue in the Cygwin DLL?
> >The DSP code is practically only in a single file called fhandler_dsp.cc.
>=20
> I've started looking at this, but it is at the very bottom of my
> priority queue so progress might be slow. Thus far, I've determined
> that the last 1.5s are missing from *all* wav files piped to
> /dev/dsp. If your wav file happens to be less that 1.5s then you get
> nothing. This hasn't been noticed to date because most audio files
> (e.g. songs) contain an amount of silence at the end of the file to
> separate the tracks.
>=20
> The code mentioned above maintains a circular buffer that holds 1.5s
> worth of sample data, so it is probable that this buffer isn't
> getting flushed properly. I've spent an evening debugging the code,
> but haven't turned up anything yet. It doesn't help that the code is
> rather sparsely commented.
>=20
> I'll post again if I learn more.

Cool, many thanks for looking into this.

If there are always samples at the end missing, maybe there's just some
"flush audio queue" call missing in fhandler_dev_dsp::close_audio_out?

I'm just glancing at this part of the code and what makes me a bit wary
is the call

  audio_out_->stop (immediately);

This is called from fhandler_dev_dsp::close, just a few lines later
like this:

  close_audio_out (exit_state !=3D ES_NOT_EXITING);

Doesn't that mean that, if the application calls exit without calling
close implicitely, the buffer will not be flushed?  That sounds wrong to
me.

OTOH, I don't know if that's really the case here.  I'm just musing.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--0F1p//8PRICkK4MW
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTJY5kAAoJEPU2Bp2uRE+gsg4P/12xd9uEYLngbRap7bdRih54
vL5J86UIrIf005cWK5nR6QV3h5WL+TDJeq6AHN28PG+VPi0MNjRq6cUO96Ckm1fF
DPhlVG7VYPj5y/tD+0VWeswVjI4UFfWrLmkKd3Ogbzba5VzfDOHjObyXS84nU3AJ
FcTgxqt0m7GD3D9s0f3uneb3p4Y0A05vmWTlNgJ3bCUeM9xu0pGeV3ES1v0LkIPM
B8yjmHFAor8pvmbAHkust0oCbjNjwUC/iWe1j+vlOzpeR2Is85jpzkpCu7PmAU2t
iPdJnzFaGa4YUppX4ZVKa82zJm7JSv6zijEs5m3Xknd9lRPQfxkqGjfjjESUZLst
ihMXFS5YisDS3lS7D2nX/uzp7srwuubLwOFjNtzY0xtVHSw64zGuw0RSKJ+sJgp3
DvHvpTJnJjqXQo5sYlLNvd69Ty0JhPCDSvq8evCgAB1LDPR4f+PVAVOa80oFX/uQ
1nOFoLdd8jtSMt8/Y1iFm3kS0liVqYWwGRseRigh5oE8C+IlUMxSHvZmi/FCOPzj
3b8hqkIok+5ZlmH3n93eeELcy25yO6WTwIbjfzHqjMTA07pX6+AiSd6sW4lOANmw
OpqzIvRc4jnSeQyyWleLRUExZ4Kqml3yYwppcKHT9S3Ez20jg60sQ76rq6qy1Ot8
s5hMbO2DeEWV4Ubcn0/w
=htUb
-----END PGP SIGNATURE-----

--0F1p//8PRICkK4MW--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019