1

I am using Ubuntu 14.04. I installed Ubuntu SDK with no problems using the instructions on Ubuntu website. I created a new QML project. I want to create an app that uses Qt Audio Engine. Here is my code where I am testing for the Audio Engine:

import QtQuick 2.0
import Ubuntu.Components 0.1
import QtAudioEngine 1.0
import "ui"

MainView {
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"

// Note! applicationName needs to match the "name" field of the click manifest
applicationName: "com.ubuntu.developer..AudioEngineTest"

/*
 This property enables the application to change orientation
 when the device is rotated. The default is false.
*/
//automaticOrientation: true

width: units.gu(100)
height: units.gu(75)

AudioEngine {

}

Tabs {
    id: tabs

    HelloTab {
        objectName: "helloTab"
    }

    WorldTab {
        objectName: "worldTab"
    }
}
}

When I try to run the program, I am given an error: module "QtAudioEngine" is not installed.

The Qt Audio Engine is in the current Ubuntu QML API. Why is it not in the SDK? Should I somehow install it myself or will it be added by the development team?

1 Answer 1

1

I used this modified version of your code (small changes to tabs) to test what was missing:

import QtQuick 2.0
import Ubuntu.Components 0.1
import QtAudioEngine 1.0
import "ui"

MainView {
    // objectName for functional testing purposes (autopilot-qt5)
    objectName: "mainView"

    // Note! applicationName needs to match the "name" field of the click manifest
    applicationName: "com.ubuntu.developer.AudioEngineTest"

    /*
     This property enables the application to change orientation
     when the device is rotated. The default is false.
    */
    //automaticOrientation: true

    width: units.gu(100)
    height: units.gu(75)

    AudioEngine {

    }

    Tabs {
        id: tabs

        Tab {
            title: "helloTab"
        }

        Tab {
            title: "worldTab"
        }
    }
}

You basically need to install the following package for a Desktop target:

sudo apt-get install qtdeclarative5-qtaudioengine-plugin

For Ubuntu Touch:

sudo apt-get install qtdeclarative5-qtaudioengine-touch-plugin

Finally you can test it with qmlscene:

$ qmlscene ./audio.qml
Module 'QtAudioEngine' does not contain a module identifier directive - it cannot be protected from external registrations.
unity::action::ActionManager::ActionManager(QObject*):
    Could not determine application identifier. HUD will not work properly.
    Provide your application identifier in $APP_ID environment variable.
default openal device =  OpenAL Soft 
device list: 
     OpenAL Soft 
AudioEngine begin initialization 
creating default category 
init samples 0 
init sounds 0 
AudioEngine ready. 
1
  • The sudo apt-get install qtdeclarative5-qtaudioengine-plugin did not work for me, but the Ubuntu Touch plugin solved it! May 16, 2014 at 2:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .