Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loopback #145

Open
nestarz opened this issue Oct 17, 2021 · 1 comment
Open

Loopback #145

nestarz opened this issue Oct 17, 2021 · 1 comment

Comments

@nestarz
Copy link

nestarz commented Oct 17, 2021

Hello,

I would like to process the audio playback from my system only using Rust, without other configurations, I am trying with Jack bindings to do so. But I can't make it work I have this error that pop up:

Source port in attempted (dis)connection of system:playback_1 and rust_jack_loopback:rust_in is not an output port

using this code, an adaptation of your playback_capture.rs example

  let (client, _status) =
      jack::Client::new("rust_jack_loopback", jack::ClientOptions::NO_START_SERVER).unwrap();
    let input = client
        .register_port("rust_in", jack::AudioIn::default())
        .unwrap();
  client.connect_ports_by_name("system:playback_1", "rust_jack_loopback:rust_in");
  client.connect_ports_by_name("rust_jack_loopback:rust_in", "external:xxx");

Do you know if there is a way to process the audio playback ? and not the audio input ? without tweaking the card so that the audio playback becomes an audio input.

It's related to this issue https://superuser.com/questions/1495091/pyaudio-in-docker-on-cloud-server-alsa-jack and I am asking this mainly because I can't run modprobe snd-aloop to create a loopback in my environment (bc its a linux container on an arbitrary kernel that will not support module snd-aloop and neither its host).

Thank you for your work !

@wmedrano
Copy link
Member

system:playback_1 is a jack input that happens to output sound to your speakers. Being an input, you cannot connect it to another input like rust_jack_loopback:rust_in.

If all your audio is in JACK, I would suggest using jack::Client to check every output that is connected to system:playback_1 and also route it to rust_jack_loopback:rust_in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants