Re: [ecasound] pre4 for 2.5.0

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sat Jul 12 2008 - 16:17:42 EEST

Hi,

On Fri, 11 Jul 2008, Linux Media wrote:

> Any processing of time ('-t' 'select' 'file.wav') with alsa... stops
> short...

now this is actually an age-old "feature" of ecasound. I'm not using the
blocking variant of stopping ALSA devices (snd_pcm_drain()), but instead
just stop devices immediately (snd_pcm_drop()). This might result in some
samples written to the sound device not to be played out.

In many cases dropping is what you want:
   - if process is terminated and/or chainsetup is disconnected, you
     really want to stop all activity and free any used resources
     as soon as possible
   - if you are performing seeks (which involves stopping real-time devices
     and then restarting them), you don't want to wait until old samples
     have been played but instead start playing samples from the new
     position as soon as possible
   - .. and so on ..

Then you have cases where you'ld like to play every last sample out:
   - playing out a single file without any seeks (processing is terminated
     because of end-of-stream)

So ideally these would be treated differently, but in practise as there
are so many possible use-scenarios (and combinations of them), the current
implementation plays safe and just drops samples in all cases. To support
the above two scenarios, I'd have to reliably detect which scenario is in
question (and not always an obvious thing, for instance, what if you first
start to flush out samples due to end-of-stream and then immediately
after, you get a seek request to a new position and ecasound should cease
the drain operation).

On code level, adding support for the two cases would require touching
many core engine parts (basicly adding a ALSA-type separate "draining"
state to the engine between "running" add "finished"). And modifying the
engine always leads a huge testing effort, as you need make sure there are
no regressions. So far I've avoided starting this work, but, but never say
never...

PS And on a motivational point of view, it doesn't help that this is
    a complete non-issue with JACK... ;)

-- 
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sun Jul 13 00:15:15 2008

This archive was generated by hypermail 2.1.8 : Sun Jul 13 2008 - 00:15:15 EEST