Search code examples
raspberry-piraspbianalljoyn

AllJoyn Audio service compilation problems


I want to run an audio streaming server based on AllJoyn and the AllJoyn audio service doesn't seem to be buildable from the alljoyn/multimedia/audio folder (running scons in this folder always ends up in compilation errors). I'm building AllJoyn version 14.06.

Anybody successfully built the AllJoyn audio service on a Raspberry Pi (Raspbian)?

Thx a lot.


Solution

  • In order to compile the audio service you need to do it from the folder alljoyn/core/alljoyn/services/audio This is an example compilation command (targetting a Raspberry Pi) that also builds the audio samples:

    scons OS=linux CPU=arm WS=fix BR=on SERVICES=about,audio BUILD_SERVICES_SAMPLES=on VARIANT=release BINDINGS=core,cpp OE_BASE=/usr
    

    You'll have to install the packages libasound2 and libasound2-dev before compiling though. You can test if it works by running the file SinkService from the samples and streaming music to it from the Android app doubleTwist. If the music plays too fast make sure you modify the SConscript in alljoyn/multimedia/audio to include the asound library in the environment:

    if audio_env['OS'] == 'linux':
            audio_env.AppendUnique(LIBS = [ 'asound' ])
    

    If trying to build the audio service but for Android you should check this page. If you can't connect to the SinkService from doubleTwist after building see this page. If you can connect but SinkService hangs see this page.

    If your intention is to build all AllJoyn services and bindings switch to alljoyn/core/alljoyn folder and try something like this:

    scons OS=linux CPU=arm WS=fix BR=on SERVICES=about,audio,config,controlpanel,notification,onboarding BUILD_SERVICES_SAMPLES=on VARIANT=release BINDINGS=core,cpp,c,java,js,objc,unity OE_BASE=/usr
    

    HTH