Using alsa


#1

I found https://github.com/diddlesnaps/snapcraft-alsa and tried to use it following the instructions

However when I run snapcraft I get:

Failed to get part information: Cannot find the definition for part 'alsa-lib-mixin', required by part 'alsa-mixin'.
Remote parts are not supported with bases, so make sure that this part is defined in the `snapcraft.yaml`.

How can I get alsa working for my snap?


#2

I’m using core18, so my guess is that I can’t use that approach for alsa.

How can I use alsa from my core18 snap app?


#3

Although I use the Alsa API, I’m aware that it is actually using pulse audio, which is fine. Rewriting my app to use pulse audio is a lot of work if I can make the existing code work with alsa.


#4

probably @daniel can help here ? (given this is his code)


#5

I’ve started the work to switch to PulseAudio, it turns out that building a c# wrapper for PulseAudio from scratch is easier than trying to get Alsa working with snapcraft.

I’m hoping that getting PulseAudio working will be easier as it should be the most common way of using sound in snaps.


#6

it definitely is and the pulseudio interface in snaps does auto-connect while the alsa one does not (for security reasons).


#7

That’s reassuring. I just finished making the PulseAudio c# wrapper, will try to snap it tomorrow night.


#8

Have now created the snap using PulseAudio and it works! :grinning: