# Can't get started with FMOD studio API

**URL:** https://qa.fmod.com/t/cant-get-started-with-fmod-studio-api/12590
**Category:** FMOD Studio
**Created:** [July 12, 2016, 3:58pm UTC](https://qa.fmod.com/t/cant-get-started-with-fmod-studio-api/12590 "2016-07-12T15:58:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ycardaillac](https://avatars.discourse-cdn.com/v4/letter/y/a698b9/32.png) [@ycardaillac](https://qa.fmod.com/u/ycardaillac)
#### Post date: [July 12, 2016, 3:58pm UTC](https://qa.fmod.com/t/cant-get-started-with-fmod-studio-api/12590/1 "2016-07-12T15:58:44Z")

</div>

Hello,

I’am currently facing problem using FMOD Studio API with Raspberry pi, I have downloaded fmodstudioapi10807linux/ , but I just don’t find how to use it… I have FMOD error 51 - Error initializing output device…  
In the end I just want to use FMOD library to make a time accurate drummachine…

Please help me, I’m realy desperate…

Thank you for all your help…

YCN-

EDIT:

Hi thank you for your fast answer and sorry for my mail provider…

So here are my log when I redirect the stderr, I make the file by this way : make CPU=armhf CONFIG=Debug and then just ./play\_sound 2\>\>log.txt and here is what I get :

```
[LOG] SystemI::init : FMOD Studio Version: 00010807 (77241)
[LOG] SystemI::init : maxchannels = 32, flags = 00000000, extradriverdata = (nil)
[LOG] SystemI::close : 
[LOG] SystemI::close : Stop all sounds
[LOG] SystemI::close : done.

[LOG] FMOD_OS_Init : Detected Neon instruction support, will use Neon optimized mixing and resampling.
[LOG] OutputALSA::registerLib : Loaded ALSA version 1.0.28.
[LOG] OutputALSA::enumerate : Found device NAME:null IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:pulse IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:sysdefault:CARD=ALSA IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:dmix:CARD=ALSA,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:dmix:CARD=ALSA,DEV=1 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:dsnoop:CARD=ALSA,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:dsnoop:CARD=ALSA,DEV=1 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:hw:CARD=ALSA,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:hw:CARD=ALSA,DEV=1 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:plughw:CARD=ALSA,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:plughw:CARD=ALSA,DEV=1 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:sysdefault:CARD=Set IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:front:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:surround21:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:surround40:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:surround41:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:surround50:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:surround51:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:surround71:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:iec958:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:dmix:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:dsnoop:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:hw:CARD=Set,DEV=0 IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:plughw:CARD=Set,DEV=0 IOID:(null).
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

[ERR] OutputALSA::init : snd_pcm_open returned -111 = Connection refused.
[LOG] SystemI::close : 
[LOG] SystemI::close : Stop all sounds
[LOG] SystemI::close : Free software output.
[LOG] SystemI::close : done.

```

So I think this is about pulse audio, what should I do then ?

Thank you aggain for all your help !

YCN-

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [July 14, 2016, 9:45pm UTC](https://qa.fmod.com/t/cant-get-started-with-fmod-studio-api/12590/2 "2016-07-14T21:45:43Z")

</div>

> [@](#):
>
> Hello,
> 
> I’am currently facing problem using FMOD Studio API with Raspberry pi, I have downloaded fmodstudioapi10807linux/ , but I just don’t find how to use it… I have FMOD error 51 - Error initializing output device…  
> In the end I just want to use FMOD library to make a time accurate drummachine…
> 
> Please help me, I’m realy desperate…
> 
> Thank you for all your help…
> 
> YCN-
> 
> EDIT:
> 
> Hi thank you for your fast answer and sorry for my mail provider…
> 
> So here are my log when I redirect the stderr, I make the file by this way : make CPU=armhf CONFIG=Debug and then just ./play\_sound 2\>\>log.txt and here is what I get :
> 
> ```
> [LOG] SystemI::init : FMOD Studio Version: 00010807 (77241)
> [LOG] SystemI::init : maxchannels = 32, flags = 00000000, extradriverdata = (nil)
> [LOG] SystemI::close : 
> [LOG] SystemI::close : Stop all sounds
> [LOG] SystemI::close : done.
> 
> [LOG] FMOD_OS_Init : Detected Neon instruction support, will use Neon optimized mixing and resampling.
> [LOG] OutputALSA::registerLib : Loaded ALSA version 1.0.28.
> [LOG] OutputALSA::enumerate : Found device NAME:null IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:pulse IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:sysdefault:CARD=ALSA IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:dmix:CARD=ALSA,DEV=0 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:dmix:CARD=ALSA,DEV=1 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:dsnoop:CARD=ALSA,DEV=0 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:dsnoop:CARD=ALSA,DEV=1 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:hw:CARD=ALSA,DEV=0 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:hw:CARD=ALSA,DEV=1 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:plughw:CARD=ALSA,DEV=0 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:plughw:CARD=ALSA,DEV=1 IOID:Output.
> [LOG] OutputALSA::enumerate : Found device NAME:sysdefault:CARD=Set IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:front:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:surround21:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:surround40:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:surround41:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:surround50:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:surround51:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:surround71:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:iec958:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:dmix:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:dsnoop:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:hw:CARD=Set,DEV=0 IOID:(null).
> [LOG] OutputALSA::enumerate : Found device NAME:plughw:CARD=Set,DEV=0 IOID:(null).
> ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
> 
> ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
> 
> [ERR] OutputALSA::init : snd_pcm_open returned -111 = Connection refused.
> [LOG] SystemI::close : 
> [LOG] SystemI::close : Stop all sounds
> [LOG] SystemI::close : Free software output.
> [LOG] SystemI::close : done.
> 
> ```
> 
> So I think this is about pulse audio, what should I do then ?
> 
> Thank you aggain for all your help !
> 
> YCN-

I’ve merged your second response into your original question and updated my answer to reflect this new information.

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [July 12, 2016, 10:21pm UTC](https://qa.fmod.com/t/cant-get-started-with-fmod-studio-api/12590/3 "2016-07-12T22:21:36Z")

</div>

Thanks for posting on the Q&A, we received your question via e-mail however all responses we send bounce from your mail provider.

FMOD Studio API certainly supports the Raspberry Pi, you can read about the different ABIs we support [here](http://www.fmod.org/documentation/#content/generated/platform_linux/basics.html), you’ll want the armhf version.

A good starting place is the examples, the simplest is “play\_sound”, try testing with that.  
Also I recommend linking with the logging version of FMOD to get detailed error information via stderr. This will help diagnose your error code during init.

EDIT:

Based on your updated log information, it looks like your default device will be “pulse” and PulseAudio isn’t working / enabled at the moment. You should try playback using “sysdefault” or “dmix” instead. To do this use `System::getNumDrivers` (to know how many there are), `System::getDriverInfo` (to know what each one is) and `System::setDriver` (to select the desired output driver. You should do all of this before System::init.
