Exemplo n.º 1
0
//beginn jack time master
void JackOutput::initTimeMaster()
{
	if ( ! client ) return;

	Preferences* pref = Preferences::get_instance();
	if ( pref->m_bJackMasterMode == Preferences::USE_JACK_TIME_MASTER) {
		int ret = jack_set_timebase_callback(client, m_bCond, jack_timebase_callback, this);
		if (ret != 0) pref->m_bJackMasterMode = Preferences::NO_JACK_TIME_MASTER;
	} else {
		jack_release_timebase(client);
	}
}
Exemplo n.º 2
0
void JackAudioDriver::initTimeMaster()
{
	if ( ! m_pClient ) return;

	Preferences* pref = Preferences::get_instance();
	if ( pref->m_bJackMasterMode == Preferences::USE_JACK_TIME_MASTER) {
		// Defined in jack/transport.h
		// Register as timebase master for the JACK
		// subsystem.
		//
		// The timebase master registers a callback that
		// updates extended position information such as
		// beats or timecode whenever necessary.  Without
		// this extended information, there is no need for
		// this function.
		//
		// There is never more than one master at a time.
		// When a new client takes over, the former @a
		// timebase_callback is no longer called.  Taking
		// over the timebase may be done conditionally, so
		// it fails if there was a master already.
		//
		// @param client the JACK client structure.
		// @param conditional non-zero for a conditional
		// request. 
		// @param timebase_callback is a realtime function
		// that returns position information.
		// @param arg an argument for the @a timebase_callback
		// function. 
		// @return
		//   - 0 on success;
		//   - EBUSY if a conditional request fails because
		// there was already a timebase master;
		//   - other non-zero error code.
		int ret = jack_set_timebase_callback(m_pClient, m_nJackConditionalTakeOver,
						     jack_timebase_callback, this);
		if (ret != 0) pref->m_bJackMasterMode = Preferences::NO_JACK_TIME_MASTER;
	} else {
		// Called by the timebase master to release itself
		// from that responsibility (defined in
		// jack/transport.h).
		jack_release_timebase(m_pClient);
	}
}
Exemplo n.º 3
0
void JackOutput::com_release()
{
	if ( client == NULL) return;

	jack_release_timebase(client);
}
Exemplo n.º 4
0
void JackAudioDriver::com_release()
{
	if ( m_pClient == NULL) return;

	jack_release_timebase(m_pClient);
}
Exemplo n.º 5
0
static void com_release(char *arg)
{
	jack_release_timebase(client);
}