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. > > 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. > > 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. > > 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 != 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgp2acpHOr6EK.pgp
Description: PGP signature