Re: [ecasound] jack transport rewind

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Tue Feb 16 2010 - 00:56:51 EET

Hi,

On Thu, 4 Feb 2010, Al Steffens wrote:

> What special considerations are required to rewind ecasound with jack?
> I start my jack client which listens for available ecasound ports. Then
> I run
>
> ecasound -c -i foo.wav -o jack,myclient
>
> My client finds ecasound and connects to its ports. I run
> 'engine-launch' at the EIAM command line. Now my client calls
> jack_transport_start(). Ecasound begins. Ecasound plays the file. Now
> EIAM 'engine-status' reports finished. My client calls
> jack_transport_reposition() with the jack_position_t 'usecs' member set
> to 0. Now EIAM 'engine-status' reports stopped. My client calls
> jack_transport_start() again. Should ecasound start playing again? Thanks.

in short, that should just work. I just tried the same thing and ecasound
started playing again. I used jack_transport as a test client to control
transport:

jack_transport> master
jack_transport> play
[ is ecasound is playing -> ok]
jack_transport> locate 20000
[ check that ecasound seeked to the new pos ->ok]
jack_transport> locate 20000000
[ that ecasound reports state 'finished' ->ok]
jack_transport> locate 0
[ ecasound now back to pos 0 and stopped ->ok]
jack_transport> play
[ ecasound playing again ->ok]

One possible catch (although I don't immediately see how this could affect
your case), is that by default ecasound both sends and receives transport
change events. So when ecasound reaches 'finished' state, it will stop the
transport for all other JACK clients.

If you want ecasound to be a plain slave, add '-G:jack,ecasound,recv' to
the command-line. Rerunning the above test, once you "locate 20000000",
ecasound will stop, but this time JACK transport will keep rolling.

PS It might be time to reevalutate whether the full-duplex 'sendrecv'
    is a good default for JACK transport support. Ecasound was one
    of the first apps supporting JACK transport API, so it was not
    obvious to see how the facility would end up used. In retrospect,
    the 'sendrecv' has confused _many_ folks during the years. But I'm
    still not fully convinced whether the default should be
    changed to 'notransport' or 'recv'. Oh well, tough choises...

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Tue Feb 16 04:15:04 2010

This archive was generated by hypermail 2.1.8 : Tue Feb 16 2010 - 04:15:04 EET