csabahruska / proteaaudio

Simple audio library for Windows, Linux, OSX. Supports Mp3, Ogg, Wav playback and multichannel mixing.
28 stars 8 forks source link

No Audio devices found #14

Open Simre1 opened 1 year ago

Simre1 commented 1 year ago

Hello!

When using the normal proteaaudio, I cannot play any audio because no devices are found:

DeviceAudioRt ERROR: No audio devices found!

I have tested both with proteaaudio-0.9.4 from Hackage as well as with proteaaudio-1.0.0. I am running it on Linux with pipewire 1:0.3.77-2.

I ended up using proteaaudio-sdl which works, so there is no time pressure to fix this quickly. I just wanted to inform you that there might be a problem when using pipewire which I assume to be the cause.

huantianad commented 1 year ago

I'm also getting this issue, I am using pipewire but I'm also using pipewire-pulse which should theoretically give me compatibility with applications that expect pulse, so I'm not sure what's going wrong here.

csabahruska commented 1 year ago

What OS do you use?

huantianad commented 1 year ago

I'm running NixOS (Linux 6.6.0, NixOS, 23.11 (Tapir), 23.11.20231104.85f1ba3), with a standard pipewire configuration:

security.rtkit.enable = true;
services.pipewire = {
  enable = true;
  alsa.enable = true;
  alsa.support32Bit = true;
  pulse.enable = true;

  wireplumber.enable = true;
};

I'm building my project with cabal, inside of a nix shell that I've added pkg-config and pulseaudio to.

huantianad commented 12 months ago

I'm unsure why this issue is happening, an app built with libpulseaudio should work out of the box with pipewire-pulse. I can't find other related issues so I'm not sure what could be causing the issue. Perhaps updating RTAudio could fix it? No idea.

csabahruska commented 12 months ago

I've updated rtaudio to the latest released version (6.0.1). It should fix this issue. Please try it out: https://github.com/csabahruska/proteaaudio/tree/rtaudio-6.0.1-update

huantianad commented 12 months ago

I believe that does fix the issue! (Though strangely, I seem to be getting some latency with the play/pause function, unless I have the SDL version installed, even if I don't use it at all!)

BTW, it seems the audio is playing in mono for both native and SDL version, is this intentional?

csabahruska commented 12 months ago

It is strange because the SDL version has not changed at all. The audio backend is totally separated between proteaaudio and proteaaudio-sdl, only the API is and the mixer code is common, and I only changed the rtaudio backend not the SDL and the mixer code is also unchanged. Could you double check the mono playback issue please?

Simre1 commented 12 months ago

Hello,

I have tested your rt-audio update branch and it works for me with pipewire. Congrats!

From my side, you can close this issue as soon as your branch lands on master.

Many thanks for the fix!

Simre1 commented 12 months ago

Sorry, closed by mistake.

huantianad commented 11 months ago

The main issue mentioned here has also been fixed for me, so it's good to close.

I'll make separate issues for the problems I've encountered.