# setMixLevelsOutput not working properly on the ARM build

**URL:** https://qa.fmod.com/t/setmixlevelsoutput-not-working-properly-on-the-arm-build/18851
**Category:** FMOD Engine
**Tags:** cpp
**Created:** [June 7, 2022, 10:33am UTC](https://qa.fmod.com/t/setmixlevelsoutput-not-working-properly-on-the-arm-build/18851 "2022-06-07T10:33:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)
#### Post date: [June 7, 2022, 10:33am UTC](https://qa.fmod.com/t/setmixlevelsoutput-not-working-properly-on-the-arm-build/18851/1 "2022-06-07T10:33:55Z")

</div>

I am porting a windows application that is completely functional and works great with fmod (in WINDOWS).

I have been working a huge number of hours over the past 3 days, trying to get the setMixLevelsOutput to work in the arm using raspberry pi os lite.

I have tried so far all the combinations rpi3 and rpi4, the 64 bits and 32 bits os version, and the latest versions of 2.02, 2.01 and 2.00 of fmod.

I also tried both alsa and pulseaudio, no luck with both.

I have a usb soundcard connected to the raspberry pi, that has 5.1 analog output.  
This one:  
[Professional External USB Sound Card Channel 5.1 7.1 Optical Audio Card Adapter for PC Computer Laptop Promotion - Newegg.com](https://www.newegg.com/p/1T0-00ZC-00424?Description=usb%20sound%20card%205.1&cm_re=usb_sound%20card%205.1-_-9SIATPUGF41385-_-Product)

This is my aplay -l output:  
aplay -l  
\*\*\*\* List of PLAYBACK Hardware Devices \*\*\*\*  
card 0: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]  
Subdevices: 1/1  
Subdevice #0: subdevice #0  
card 1: ICUSBAUDIO7D [ICUSBAUDIO7D], device 0: USB Audio [USB Audio]  
Subdevices: 1/1  
Subdevice #0: subdevice #0

When I use the speaker test:  
speaker-test -t wav -c6 -d surround51:ICUSBAUDIO7D  
I can properly hear the sound in each individual channel.

I have an ogg file, that has the same sound in all 6 tracks.

My test usecase is simple: I want to play the ogg file sound only in the center and lfe channels.

To do so, I use the setMixLevelsOutput and set the volume to 0 for all the channels that I do not want to hear sound.

But doesn’t matter what I do, in the raspberry pi, the sound always play in the front left / front right.  
this applies for both alsa and pulseaudio.

Worth to mention again, the same file, same code, works perfectly fine in windows using the same soundcard, I can hear only lfe and center channels.

Here is a quick and dirty adaptation of your channel\_groups example and as well the sound that I am trying to play in the center and lfe channels.  
[https://drive.google.com/drive/folders/1dtuXllI9QRcUYMksfr0ydIiA07kROQhO?usp=sharing](https://drive.google.com/drive/folders/1dtuXllI9QRcUYMksfr0ydIiA07kROQhO?usp=sharing)

I have hardcoded the setDriver to 16, this is the:  
surround51:CARD=ICUSBAUDIO7D,DEV=0

I think everything I could possible think from my side, I have done, if you have any suggestion, I am more then welcome to try.

---

<div class="post-metadata">

### Author: ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)
#### Post date: [June 7, 2022, 11:45pm UTC](https://qa.fmod.com/t/setmixlevelsoutput-not-working-properly-on-the-arm-build/18851/2 "2022-06-07T23:45:14Z")

</div>

Just a bit for info, here is the mediainfo of the soundfile:  
mediainfo 1.ogg  
General  
Complete name : 1.ogg  
Format : Ogg  
File size : 13.7 KiB  
Duration : 23 ms  
Overall bit rate mode : Variable  
Overall bit rate : 4 886 kb/s

Audio  
ID : 515 (0x203)  
Format : Vorbis  
Format settings, Floor : 1 / 8710  
Duration : 23 ms  
Bit rate mode : Variable  
Bit rate : 1 080 kb/s  
Channel(s) : 6 channels  
Sampling rate : 44.1 kHz  
Compression mode : Lossy  
Stream size : 3.03 KiB (22%)  
Writing library : libVorbis (Omnipresent) (20120203 (Omnipresent))

---

<div class="post-metadata">

### Author: ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)
#### Post date: [June 8, 2022, 12:21am UTC](https://qa.fmod.com/t/setmixlevelsoutput-not-working-properly-on-the-arm-build/18851/3 "2022-06-08T00:21:41Z")

</div>

GetDriverInfo seems to be returning the correct number of channels…

name surround 51:CARD=ICUSBAUDIO7D,DEV=0  
system\_rate 48000  
speaker\_mode 6  
speaker\_mode\_channels 6

---

<div class="post-metadata">

### Author: ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)
#### Post date: [June 8, 2022, 12:45am UTC](https://qa.fmod.com/t/setmixlevelsoutput-not-working-properly-on-the-arm-build/18851/4 "2022-06-08T00:45:02Z")

</div>

Good news and bad news!  
I was able to get 5 channels working…  
by setting the FMOD::System::SoftwareFormat to 5.1  
Both raw channels and speaker mode.

Still have one issue left, I cannot get the lfe to play the sound.

---

<div class="post-metadata">

### Author: ![marcelomanzo](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@marcelomanzo](https://qa.fmod.com/u/marcelomanzo)
#### Post date: [June 8, 2022, 5:18am UTC](https://qa.fmod.com/t/setmixlevelsoutput-not-working-properly-on-the-arm-build/18851/5 "2022-06-08T05:18:02Z")

</div>

The solution was to set  
FMOD::System::SoftwareFormat to 5.1  
and use pulse audio.

Now everything works.
