wwmm / easyeffects

Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications
GNU General Public License v3.0
6.56k stars 270 forks source link

EasyEffects Inputs do not work with pavucontrol running #2954

Open unites opened 8 months ago

unites commented 8 months ago

EasyEffects Version

Flatpak 7.1.4

What package are you using?

Flatpak (Flathub)

Distribution

Arch Linux

Describe the bug

The Microphone input is not recognized unless you have pavucontrol open. Also no item show up in the inputs window but I can see the visualization of the input and plugins work.

Current packages installed in Arch: gst-plugin-pipewire pipewire pipewire-alsa pipewire-jack pipewire-media-session pipewire-pulse

Expected Behavior

Would expect there to be an input shown in the window (I think, I don't know what it is supposed to look like as this is the first time I have used easyeffects). Also would expect it to function without having a second application open.

Debug Log

Debug Log
``` Running Easy Effects, and the input fails with... --- (easyeffects:2): easyeffects-DEBUG: 10:15:06.900: effects_base.cpp:265 sie: pipeline latency: 25.354166 ms (easyeffects:2): easyeffects-DEBUG: 10:15:06.901: output_level.cpp:37 sie: output_level: PipeWire blocksize: 2048 (easyeffects:2): easyeffects-DEBUG: 10:15:06.901: output_level.cpp:38 sie: output_level: PipeWire sampling rate: 48000 (easyeffects:2): easyeffects-DEBUG: 10:15:06.901: output_level.cpp:37 soe: output_level: PipeWire blocksize: 2048 (easyeffects:2): easyeffects-DEBUG: 10:15:06.901: output_level.cpp:38 soe: output_level: PipeWire sampling rate: 48000 (easyeffects:2): easyeffects-DEBUG: 10:15:14.728: stream_input_effects.cpp:168 No app linked to our device wants to play. Unlinking our filters. (easyeffects:2): easyeffects-DEBUG: 10:15:14.728: stream_input_effects.cpp:327 disconnecting the deepfilternet filter from PipeWire (easyeffects:2): easyeffects-DEBUG: 10:15:14.733: pipe_manager.cpp:213 222 ee_sie_deepfilternet has been removed (easyeffects:2): easyeffects-DEBUG: 10:15:14.733: stream_input_effects.cpp:327 disconnecting the echo_canceller filter from PipeWire (easyeffects:2): easyeffects-DEBUG: 10:15:14.738: pipe_manager.cpp:213 57 ee_sie_echo_canceller has been removed (easyeffects:2): easyeffects-DEBUG: 10:15:14.739: stream_input_effects.cpp:327 disconnecting the gate filter from PipeWire (easyeffects:2): easyeffects-DEBUG: 10:15:14.740: pipe_manager.cpp:213 60 ee_sie_gate has been removed (easyeffects:2): easyeffects-DEBUG: 10:15:14.740: stream_input_effects.cpp:327 disconnecting the rnnoise filter from PipeWire (easyeffects:2): easyeffects-DEBUG: 10:15:14.742: pipe_manager.cpp:213 209 ee_sie_rnnoise has been removed Start up pavucontrol and it begins working again... --- (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:1219 Stream/Input/Audio 220 PulseAudio Volume Control with serial 2418 has been added (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:1219 Stream/Input/Audio 197 PulseAudio Volume Control with serial 2419 has been added (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:1219 Stream/Input/Audio 158 PulseAudio Volume Control with serial 2420 has been added (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:1219 Stream/Input/Audio 209 PulseAudio Volume Control with serial 2421 has been added (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:1219 Stream/Input/Audio 112 PulseAudio Volume Control with serial 2422 has been added (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:278 The input stream PulseAudio Volume Control does not have as target the same mic used as EE input: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo The user wants it to record from device 49. We will ignore this stream. (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:342 Stream/Input/Audio 220 PulseAudio Volume Control has been removed (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:278 The input stream PulseAudio Volume Control does not have as target the same mic used as EE input: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo The user wants it to record from device 51. We will ignore this stream. (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:342 Stream/Input/Audio 197 PulseAudio Volume Control has been removed (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:278 The input stream PulseAudio Volume Control does not have as target the same mic used as EE input: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo The user wants it to record from device 622. We will ignore this stream. (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:342 Stream/Input/Audio 158 PulseAudio Volume Control has been removed (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:278 The input stream PulseAudio Volume Control does not have as target the same mic used as EE input: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo The user wants it to record from device 1979. We will ignore this stream. (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:342 Stream/Input/Audio 209 PulseAudio Volume Control has been removed (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:278 The input stream PulseAudio Volume Control does not have as target the same mic used as EE input: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo The user wants it to record from device 1980. We will ignore this stream. (easyeffects:2): easyeffects-DEBUG: 10:16:37.672: pipe_manager.cpp:342 Stream/Input/Audio 112 PulseAudio Volume Control has been removed (easyeffects:2): easyeffects-DEBUG: 10:16:37.673: pipe_manager.cpp:955 new metadata property: 220, target.node, Spa:Id, 81 (easyeffects:2): easyeffects-DEBUG: 10:16:37.673: pipe_manager.cpp:955 new metadata property: 220, target.object, Spa:Id, 1980 (easyeffects:2): easyeffects-DEBUG: 10:16:37.674: pipe_manager.cpp:955 new metadata property: 197, target.node, Spa:Id, 81 (easyeffects:2): easyeffects-DEBUG: 10:16:37.674: pipe_manager.cpp:955 new metadata property: 197, target.object, Spa:Id, 1980 (easyeffects:2): easyeffects-DEBUG: 10:16:37.678: pipe_manager.cpp:1219 Stream/Input/Audio 217 PulseAudio Volume Control with serial 2451 has been added (easyeffects:2): easyeffects-DEBUG: 10:16:37.720: echo_canceller.cpp:208 soe: echo_canceller filter length: 4800 (easyeffects:2): easyeffects-DEBUG: 10:16:37.721: output_level.cpp:37 soe: output_level: PipeWire blocksize: 256 (easyeffects:2): easyeffects-DEBUG: 10:16:37.721: output_level.cpp:38 soe: output_level: PipeWire sampling rate: 48000 (easyeffects:2): easyeffects-DEBUG: 10:16:37.916: pipe_manager.cpp:278 The input stream PulseAudio Volume Control does not have as target the same mic used as EE input: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo The user wants it to record from device 73. We will ignore this stream. (easyeffects:2): easyeffects-DEBUG: 10:16:37.916: pipe_manager.cpp:342 Stream/Input/Audio 217 PulseAudio Volume Control has been removed (easyeffects:2): easyeffects-DEBUG: 10:16:37.916: pipe_manager.cpp:955 new metadata property: 158, target.node, Spa:Id, 81 (easyeffects:2): easyeffects-DEBUG: 10:16:37.916: pipe_manager.cpp:955 new metadata property: 158, target.object, Spa:Id, 1980 (easyeffects:2): easyeffects-DEBUG: 10:16:37.922: pipe_manager.cpp:955 new metadata property: 209, target.node, Spa:Id, 81 (easyeffects:2): easyeffects-DEBUG: 10:16:37.922: pipe_manager.cpp:955 new metadata property: 209, target.object, Spa:Id, 1980 (easyeffects:2): easyeffects-DEBUG: 10:16:37.924: pipe_manager.cpp:955 new metadata property: 112, target.node, Spa:Id, 81 (easyeffects:2): easyeffects-DEBUG: 10:16:37.924: pipe_manager.cpp:955 new metadata property: 112, target.object, Spa:Id, 1980 (easyeffects:2): easyeffects-DEBUG: 10:16:37.925: app_info.cpp:343 disposed (easyeffects:2): easyeffects-DEBUG: 10:16:37.925: app_info.cpp:351 finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.925: app_info.cpp:29 data struct destroyed (easyeffects:2): easyeffects-DEBUG: 10:16:37.925: node_info_holder.cpp:98 220, PulseAudio Volume Control finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.925: pipe_manager.cpp:955 new metadata property: 220, target.node, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.925: pipe_manager.cpp:955 new metadata property: 220, target.object, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.925: app_info.cpp:343 disposed (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:351 finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:29 data struct destroyed (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: node_info_holder.cpp:98 197, PulseAudio Volume Control finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: pipe_manager.cpp:955 new metadata property: 197, target.node, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: pipe_manager.cpp:955 new metadata property: 197, target.object, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:343 disposed (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:351 finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:29 data struct destroyed (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: node_info_holder.cpp:98 158, PulseAudio Volume Control finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: pipe_manager.cpp:955 new metadata property: 158, target.node, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: pipe_manager.cpp:955 new metadata property: 158, target.object, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:343 disposed (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:351 finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:29 data struct destroyed (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: node_info_holder.cpp:98 209, PulseAudio Volume Control finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: pipe_manager.cpp:955 new metadata property: 209, target.node, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: pipe_manager.cpp:955 new metadata property: 209, target.object, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.926: app_info.cpp:343 disposed (easyeffects:2): easyeffects-DEBUG: 10:16:37.927: app_info.cpp:351 finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.927: app_info.cpp:29 data struct destroyed (easyeffects:2): easyeffects-DEBUG: 10:16:37.927: node_info_holder.cpp:98 112, PulseAudio Volume Control finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.927: stream_input_effects.cpp:156 At least one app linked to our device wants to play. Linking our filters. (easyeffects:2): easyeffects-DEBUG: 10:16:37.927: pipe_manager.cpp:955 new metadata property: 112, target.node, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.927: pipe_manager.cpp:955 new metadata property: 112, target.object, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.929: plugin_base.cpp:370 sie: deepfilternet successfully connected to PipeWire graph (easyeffects:2): easyeffects-DEBUG: 10:16:37.929: pipe_manager.cpp:1259 alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo port 58 is connected to ee_sie_deepfilternet port 141 (easyeffects:2): easyeffects-DEBUG: 10:16:37.929: pipe_manager.cpp:1259 alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-stereo port 59 is connected to ee_sie_deepfilternet port 200 (easyeffects:2): easyeffects-DEBUG: 10:16:37.931: plugin_base.cpp:370 sie: gate successfully connected to PipeWire graph (easyeffects:2): easyeffects-DEBUG: 10:16:37.931: pipe_manager.cpp:1259 ee_sie_deepfilternet port 67 is connected to ee_sie_gate port 128 (easyeffects:2): easyeffects-DEBUG: 10:16:37.931: pipe_manager.cpp:1259 ee_sie_deepfilternet port 184 is connected to ee_sie_gate port 172 (easyeffects:2): easyeffects-DEBUG: 10:16:37.933: plugin_base.cpp:370 sie: echo_canceller successfully connected to PipeWire graph (easyeffects:2): easyeffects-DEBUG: 10:16:37.933: pipe_manager.cpp:1259 ee_sie_gate port 159 is connected to ee_sie_echo_canceller port 150 (easyeffects:2): easyeffects-DEBUG: 10:16:37.933: pipe_manager.cpp:1259 ee_sie_gate port 174 is connected to ee_sie_echo_canceller port 140 (easyeffects:2): easyeffects-DEBUG: 10:16:37.935: plugin_base.cpp:370 sie: rnnoise successfully connected to PipeWire graph (easyeffects:2): easyeffects-DEBUG: 10:16:37.935: pipe_manager.cpp:1259 ee_sie_echo_canceller port 123 is connected to ee_sie_rnnoise port 126 (easyeffects:2): easyeffects-DEBUG: 10:16:37.935: pipe_manager.cpp:1259 ee_sie_echo_canceller port 147 is connected to ee_sie_rnnoise port 66 (easyeffects:2): easyeffects-DEBUG: 10:16:37.936: pipe_manager.cpp:1259 alsa_output.usb-FIIO_FiiO_USB_DAC-E10-01.analog-stereo port 63 is connected to ee_sie_echo_canceller port 118 (easyeffects:2): easyeffects-DEBUG: 10:16:37.936: pipe_manager.cpp:1259 alsa_output.usb-FIIO_FiiO_USB_DAC-E10-01.analog-stereo port 65 is connected to ee_sie_echo_canceller port 100 (easyeffects:2): easyeffects-DEBUG: 10:16:37.940: pipe_manager.cpp:955 new metadata property: 217, target.node, Spa:Id, 81 (easyeffects:2): easyeffects-DEBUG: 10:16:37.940: pipe_manager.cpp:955 new metadata property: 217, target.object, Spa:Id, 1980 (easyeffects:2): easyeffects-DEBUG: 10:16:37.943: app_info.cpp:343 disposed (easyeffects:2): easyeffects-DEBUG: 10:16:37.943: app_info.cpp:351 finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.943: app_info.cpp:29 data struct destroyed (easyeffects:2): easyeffects-DEBUG: 10:16:37.944: node_info_holder.cpp:98 217, PulseAudio Volume Control finalized (easyeffects:2): easyeffects-DEBUG: 10:16:37.944: pipe_manager.cpp:955 new metadata property: 217, target.node, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.944: pipe_manager.cpp:955 new metadata property: 217, target.object, , (easyeffects:2): easyeffects-DEBUG: 10:16:37.947: echo_canceller.cpp:208 sie: echo_canceller filter length: 4800 (easyeffects:2): easyeffects-DEBUG: 10:16:37.947: rnnoise.cpp:256 sie: rnnoise latency: 0.010666667 s (easyeffects:2): easyeffects-DEBUG: 10:16:37.947: effects_base.cpp:265 sie: pipeline latency: 30.6875 ms (easyeffects:2): easyeffects-DEBUG: 10:16:37.947: output_level.cpp:37 sie: output_level: PipeWire blocksize: 256 (easyeffects:2): easyeffects-DEBUG: 10:16:37.947: output_level.cpp:38 sie: output_level: PipeWire sampling rate: 48000 (easyeffects:2): easyeffects-DEBUG: 10:16:37.958: rnnoise.cpp:256 sie: rnnoise latency: 0.0013333333 s (easyeffects:2): easyeffects-DEBUG: 10:16:37.958: effects_base.cpp:265 sie: pipeline latency: 21.354166 ms ```

Additional Information

No response

violetmage commented 8 months ago

Okay, I'm pretty sure I know why you're confused. Short answer: it's not broken, there simply isn't any application requesting audio to be recorded. (you can click the little microphone -> speaker icon in the bottom right of the effects tab on the input page to do a test)

Long answer:

The plugin pipeline (including the spectrum display) is only "active" when there is audio actually being played / recorded. If no application is playing or recording, then there is no data moving through easyeffects to be displayed.

The confusion comes from the fact that easyeffects is very transparent, so a user might not realize that easyeffects is just a "middleman", and doesn't operate at any lower of a level than a regular application.

In OP's scenario, they expect the input effects pipeline to be active simply because it is visible to them in the GUI and their microphone is not muted. However, easyeffects won't display anything until an application actually requests audio from their input device. This behavior is not necessarily intuitive from a non-technical perspective, causing the OP's confusion.

The solution, IMO, is to add another option similar to the "monitor input" button, that captures input and sends it to a null sink; to allow the pipeline to be active without sending audio out. This could be made more magic by, for example, automatically null sinking the input if the "Input" page is open and no applications are recording. Something to think about. I might experiment with something during the week if I have time.

wwmm commented 8 months ago

The solution, IMO, is to add another option similar to the "monitor input" button, that captures input and sends it to a null sink; to allow the pipeline to be active without sending audio out. This could be made more magic by, for example, automatically null sinking the input if the "Input" page is open and no applications are recording. Something to think about. I might experiment with something during the week if I have time.

I think this has the potential to cause undesirable side effects if not done carefully. In most cases the user only wants the processed mic output to be linked to the soundcard for testing purposes. Once things are as desired they probably won't want the processed mic audio going directly to the soundcard even if the window is opened.

We could disable the whole thing as asson as something is recording from the mic. But we will probably also have to make sure this does not conflict with the button that allows manual control of the mic monitoring. I don't know... It makes sense in situations like this one but once the user understands how things work it feels like a feature that will get in the way.

violetmage commented 8 months ago

@wwmm I agree that a "magic" solution might be technically precarious, but I still think that the ability to "activate" the input pipeline without causing audio output is useful for setups where feedback is possible. I realize that muting the system volume, then clicking the monitor button accomplishes this, however I still think it would be nice to offer this as a feature.

Maybe the monitor button could be made two-stage, or have a mutually exclusive neighbor button that does the null sink input.

I also just now noticed that the monitor button does not have a tool tip. As it's an icon only button, I feel it should have one. I'll make a pull request with a tool tip for it if you want.

wwmm commented 8 months ago

I also just now noticed that the monitor button does not have a tool tip. As it's an icon only button, I feel it should have one. I'll make a pull request with a tool tip for it if you want.

It is fine to add a tooltip.

wwmm commented 8 months ago

Maybe the monitor button could be made two-stage, or have a mutually exclusive neighbor button that does the null sink input.

Null sink input? . In my mind the whole process would be just an automation of what the monitor button already does.

violetmage commented 8 months ago

I should clarify: the new button would behave exactly the same as the monitor button (listen_to_mic or listen_mic in the code), except instead of routing the input audio back out, just send it to a null sink, or mute it, or whatever. The outcome is that all the effects in the input chain receive audio from the input, but no audio is heard by the user.

wwmm commented 8 months ago

I should clarify: the new button would behave exactly the same as the monitor button (listen_to_mic or listen_mic in the code), except instead of routing the input audio back out, just send it to a null sink, or mute it, or whatever. The outcome is that all the effects in the input chain receive audio from the input, but no audio is heard by the user.

But then won't the user be confused by the fact they won't be listening to anything and think something is broken?

violetmage commented 8 months ago

I had completely skipped over that while thinking of how to solve the problem...

Maybe the best solution is just to add something to the FAQ?

wwmm commented 8 months ago

I had completely skipped over that while thinking of how to solve the problem...

It happens :smile:

Maybe the best solution is just to add something to the FAQ?

I think this definitely should be clarified in the FAQ or the manual. But if the user does not think about reading them the problem remains... I am not sure about what would be a good solution. Throwing a popup or a dialog about this in the user face every time would also be very annoying...