Version 4 (modified by https://www.google.com/accounts/o8/id?id=aitoawmlotcrwqsatcmrrdngmdoycuf6o1lzvgq, 3 years ago)

--

This page has examples to help you get started with adding LADI and jackdbus support to your app.

QT/c++ from qjackctl

by Rui Nuno Capela

This will check for jackdbus and if it is found will connect to the org.jackaudio service.

#include <QDBusConnection>

	//QDBusConnection dbusc = QDBusConnection::sessionBus(); -- default
	QDBusInterface dbusi(
		"org.jackaudio.service",	// Service
		"/org/jackaudio/Controller",	// Path
		"org.jackaudio.JackControl");	// Interface
		//dbusc);			// Connection

	if (dbusi.call("IsStarted").type() == QDBusMessage::ReplyMessage) {
		//
		// jackdbus is available and/or already started:
		// - use jackdbus control and configure interfaces...
		//
	} else {
		// QDBusMessage::ErrorMessage?
		//
		// jackdbus is not available, not started or not even installed:
		// - use classic jackd, business as usual...
		//
	}