How can i access alsa?

i have a midi sequencer and synth and I need to list and open the alsa rawmidi devices and sound devices…

My snd_* functions don’t die or anything, but i get no entries from them.

Any ideas of how I can use alsa properly with flatpak?

Also, I notice
Qt: Session management error: Could not open network socket

in the shell when i flatpak run my app
But my app seems to run other than these things.
(Although the very first time my app used this code it died with return code 2 but has since worked??)

bool QtEr::AskDir (char *name, char const *titl)
{ QString dir = QDir::homePath ();
   if (*name)  dir = name;
   dir = QFileDialog::getExistingDirectory (
      _w, titl, dir, QFileDialog::ShowDirsOnly |
   if (dir.isEmpty ())  return false;
   StrCp (name, CC(UnQS (dir)));
   return true;

I’m using the kde 6.6 runtime.

thanks for any pointers - this place is very helpful !

well, what I did was google around and set my sandbox permissions wide open as below cuz that’s all I could figure out.

it worked at least - all my midi and pcm devices are there now !

I was reading that in flatpak the preferred audio api was pulse audio and migrating to pipewire. I don’t care which midi/audio api i use. But I =need= midi and I’ll have to read up if pipewire does midi.

If anyone could enlighten me about the PROPER MODERN WAY to do audio and midi I would greatly appreciate it.
There seems to be alsa, jack, pulse, and now pipewire and I don’t know which to pick :confused:

ok ow to fix up my durn icon and .desktop and get this thing outa my hair so i can get back to functionality of my durn app…

 "finish-args": [
1 Like

You want to use pipewire, but pipewire is compatible with the old pulseaudio (and also jack). I would assume, that midi also just works, but I don’t actually know.

well might as well get this straightened out i guess.
hopefully that api is a thin layer on toppa alsa - I really don’t need anything more than alsa for a midi sequencer and synth.

i think --socket=pulseaudio got my alsa devices listing properly.

i mean why would sound be turned off by default in the sandbox that just seems silly.

it’s still unclear to me whether filesystem: home and host overlap or not - flatseal let’s you pick both ? it’s a bit of work to test this stuff when it could just be documented and then there’d be less junky apps that “don’t work”.

it’s also unclear to me how to deliver a closed source app to flathub. i guess just take the build-dir and build from the already built executables and stuff. i guess??

you asked for the modern way, you can use alsa fine I would assume

Probably because that socket also allows for audio input - but I know of potential changes happening, allowing to always have audio.

they overlap, both are bad. host is more bad. if you can, don’t use them at all. Not sure what you mean with your documentation part, very unclear what you actually want.

Yes, but you might want to check, if you are allowed to redistribute the app otherwise use extra-data Requirements | Flathub Documentation