Re: [ecasound] Inaccurate reporting of length

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sat Oct 03 2009 - 17:51:34 EEST


On Fri, 2 Oct 2009, linux media 4 wrote:

> I see you may be ready for another release soon. I was hoping to have
> this squeezed in.

well, at least hoping to get one out. :)

> If you run...
> ecasound -c -f:16,1,44100 -i:jack,system -f:16,1,44100 -o:test.wav
> Then do...
> ecasound ('h' for help)> t
> ecasound ('h' for help)> s
> Then do...
> ecalength test.wav
> It shows an inaccurate length

Hmm, this is actually a feature. Duration of RIFF WAVE files is stored in
the file header. Ecasound updates this header only when the file is closed
(e.g. 'cs-disconnect' or when terminating ecasound).

So if you use an external program (e.g. ecalength) to check the file
length, the result will be incorrect until ecasound updates the header
(e.g. 'cs-disconnect').

> Again... this can be troublesome if you are writing a Front End and need
> an updated length without interrupting the chainsetup.

Couldn't you use ai-get-length/ao-get-length commands to get the file
length (these don't depend on updating the RIFF header)?

Alternatively ecasound could update all file headers anytime transport is
stopped, but this is not entirely trivial to implement (e.g. in case
ecasound is trying to chase the JACK transport position, this could result
in quite frequent header updates -- I'm sure there are other similar
cornercases that need to be considered).

Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
Ecasound-list mailing list
Received on Sat Oct 3 20:15:01 2009

This archive was generated by hypermail 2.1.8 : Sat Oct 03 2009 - 20:15:01 EEST