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
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
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.