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

Keyboard controls are ignored when pausing PipeWire input #556

Closed
gardk opened this issue Mar 29, 2024 · 6 comments
Closed

Keyboard controls are ignored when pausing PipeWire input #556

gardk opened this issue Mar 29, 2024 · 6 comments

Comments

@gardk
Copy link
Contributor

gardk commented Mar 29, 2024

Describe the bug

Title.

Found this cause I wanted cava to only visualize my music and not all desktop sounds :)

I've found that resizing the window causes the bars to actually reset, unless you pressed Q before doing so.

To Reproduce

Steps to reproduce the behavior:

  1. Have MPD (only source I've tested with) running in the background
  2. Run cava
  3. Using qpwgraph or similar, attach cava to MPD's output instead of the default sink
  4. Pause music

Expected behavior

Input should not be ignored and bars should return to zero.

Screenshots

This picture is from when the music is paused
image

Desktop:

  • OS: NixOS
  • Version: 24.05 unstable

Terminal emulator
Tested in kitty 0.33.1 and alacritty 0.13.2

@karlstav
Copy link
Owner

this might be intended behavior, not the key controls, those should work (if the sleep timer is not configured).

When the source is paused, there is no data coming in, i would have to add a function to reset the buffer to zero after some time without new input data. I think i already have it in the fifo input.

@gardk gardk changed the title Keyboard input is ignored and bars freeze in place when pausing PipeWire input Keyboard controls are ignored when pausing PipeWire input Mar 29, 2024
@gardk
Copy link
Contributor Author

gardk commented Mar 29, 2024

Yeah, the bars freezing does make sense actually, but it would be nice to have them reset to zero after some time :)

@karlstav
Copy link
Owner

was finally able to reproduce. The issue is that the main thread is waiting for the audio to terminate, but the on_process callback is not being fired. Need to think of some solution.

@karlstav
Copy link
Owner

karlstav commented Apr 1, 2024

I guess that was what this was for: 0d77307 will re-add it make some signal to the thread when terminating the audio.

@gardk
Copy link
Contributor Author

gardk commented Apr 1, 2024

You can make on_process keep firing by setting PW_KEY_NODE_ALWAYS_PROCESS, seems to fix this issue completely.

@karlstav
Copy link
Owner

karlstav commented Apr 2, 2024

it does! and then the bars also go down when pausing.

I will consider this resolved then, thanks @gardk for the contribution!

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