Version 8 (modified by http://nedko.arnaudov.name/, 3 years ago)

--

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

Level 1 app examples

Example level 1 app in Python

jackdbus examples

Qt/C++

From qjackctl by Rui Nuno Capela. You need Qt >= 4.2 to use this example (DBus support was not there before).

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...
                //
        }