implementing network sync of jack_transports

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

implementing network sync of jack_transports


hi all..

i am trying to implement transport_sync into the netjack software.

for those who dont know yet:

netjack consists of a jack_driver and a jack_client. on the Master machine the
client emits a network packet on each process() and tries to receive one
packet of data.

on the Slave Machine the Driver is waiting for an incoming Packet (like
the Alsa_Driver is waiting for an audio Interrupt) and emits a Packet.

so with this software you get two sample synchronous jackds. no need for
dynamic samplerate conversion and other hassle. there is one period of
roundtrip latency. this works very reliable on a LAN.

the thing which is missing is transport synchronisation.

i am currently trying to implement this but have a Problem with

when a transport_locate() occurs it is clear that the "UnifiedTransport"
has to wait for all slow-sync clients on all computers to be ready.
while waiting the jacknet clients (a driver is/contains also a client)
have to report FALSE on slow sync, to hold the transport.

(add missing step here)

now when all clients are ready and the exchanged packet headers contain
the flag which indicates that all clients are ready to roll. both
clients may return TRUE to sync_calback() in the equvalent process
cycles. so that both transports start to roll.

the missing step is detecting that we are the only client returning
FALSE to slow sync.

this could be done with a function like:

get_remaining_sync_clients( jack_client_t *c )
    return c->engine->sync_remain

but this would not scale to 2 slaves connected to the master jackd.
so the quest is still on :(

currently in my mind is TransportPaused or Waiting
which is the transport state when all slow sync clients have returned
true and the engine is waiting for a transport_roll() call or something.

or is this all possible with stoping transport; locate_transport;
start_transport ?

hmmm... oh no... this looks like a can of worms.

torben Hohn -- The graphical Audio language

This email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
Jackit-devel mailing list
[hidden email]