FMOD studio API - Problem initializing USB sound card


(Simon Kuitenbrouwer) #1

Hi,

I’m working with the FMOD studio API on a raspberry pi 3 B: linux api version 1.10.05

When I use the built-in sound output everything works fine. When I set my USB soundcard (ESI gigaport HD+) as the systems default sound output I get FMOD error 51 – Error initializing output device. The soundcard works fine outside of the FMOD API.

I generated a log file, which shows the specific error: [ERR] OutputALSA::init : snd_pcm_hw_params_set_rate returned -22 = Invalid argument.
I realise that this could be a really device/driver specific problem but I have no clue what this error means, could anyone point me in the right direction?

LOG:

[LOG] System::create : Header version = 1.10.05. Current version = 1.10.05.
[LOG] Manager::init : maxchannels = 256 studioflags = 00000000 flags 00000000 extradriverdata (nil).
[LOG] SystemI::init : Initialize version=11005 (94661), maxchannels=256, flags=0x00020000
[LOG] FMOD_OS_Init : Detected Neon instruction support, will use Neon optimized mixing and resampling.
[LOG] SystemI::setOutputInternal : Setting output to ‘FMOD ALSA Output’
[LOG] OutputALSA::registerLib : Loaded ALSA version 1.1.3.
[LOG] OutputALSA::enumerate : Found device NAME:null IOID:(null).
[LOG] OutputALSA::enumerate : Found device NAME:default 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=HD IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:front:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:surround21:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:surround40:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:surround41:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:surround50:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:surround51:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:surround71:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:iec958:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:dmix:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:dsnoop:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:hw:CARD=HD,DEV=0 IOID:Output.
[LOG] OutputALSA::enumerate : Found device NAME:plughw:CARD=HD,DEV=0 IOID:Output.
[ERR] OutputALSA::init : snd_pcm_hw_params_set_rate returned -22 = Invalid argument.
[LOG] SystemI::close : Closed.
[LOG] LiveUpdate::release :
[LOG] LiveUpdate::reset : Reset connection (reason Disconnected)

Kind regards,
Simon


(リチャード清水) #2

Hi Simon,

In my test of 1.10.05 on Linux it works as expected. Could you please check that you have the x86 version of ALSA installed as well as the x64?

https://www.fmod.com/resources/documentation-api?page=content/generated/platform_linux/basics.html#/

Thanks,
Richard


(Simon Kuitenbrouwer) #3

Thanks for your reply. I looked further into the ALSA settings.

ALSA version is 1.1.3 (as seen in de log).
I checked the ALSA driver version: Advanced Linux Sound Architecture Driver Version k4.14.34-v7+.

The problem has been solved. I changed some settings relevant for my USB sound card in the ALSA config file and selected a different output driver using System::setDriver.


(リチャード清水) #4

Good to hear you were able to resolve the issue, Simon. Please let us know if you need any further assistance.

Thanks,
Richard