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

Error on Exit and CloseSoundPulse() not being executed #76

Open
Ragebone opened this issue Nov 30, 2018 · 2 comments
Open

Error on Exit and CloseSoundPulse() not being executed #76

Ragebone opened this issue Nov 30, 2018 · 2 comments

Comments

@Ragebone
Copy link

Ragebone commented Nov 30, 2018

Hi Charles,
i noticed the following behavior, this might be irrelevant, but i think it'd be nice if we could resolve this.

When i exit through the window close button or the IDE stop Button:

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 417249 requests (417175 known processed) with 1 events remaining.

Process finished with exit code 1

When Exiting through pressing ESC:
Process finished with exit code 0

I couldn't find any place where you are initiating "shutdown" and cleanup, what have i missed?
Except the Keyboard event handler with exit(0) on ESC of cause, but even in that case,
the CloseSoundPulse Method in sound_pulse.c is never executed even though i expect it to be.
This does not seem to be a problem with just the play and record streams in your normal setup, since they magically disappear from pavucontrol anyway but i now have a problem with that.

My current setup is that ColorChord is directly listening on the main output sink monitor, a rather obvious thing i guess.
But i want a separate sink to have ColorChord only pickup for example spotify.
There are multiple solutions i came up with, the easiest is to load a module-combine-sink on the default sink and have ColorChord listen to the module sink monitor. The much harder and currently abandoned way is to have the PulseAudio record stream, input into the playStream (play=1 rec=1) and then have the record stream listen to a module-null-sink monitor and the play stream output to where ever you want.
The advantage would be that you can have full volume on the Colorchord input for analysis and still turn down the volume on the output side.

As far as i understand, you even have the later way partially implemented and my long term plan is to get that working.

Currently i'm stuck at this cleanup problem, i have the first way working and i moved adding the module into the PulseAudio setup in ColorChord because i thought that to be reasonable.
But now the combined-sink isn't getting removed since the closeSoundPulse method isn't executed and that is kind of annoying.

Any ideas how to resolve those issues?
And thank you very much for this awesome and "interesting" pile of code.
With all this RGB in todays PC-Masterrace, i see ColorChord as thee cure to the brainless rainbow unicorn puke.

@cnlohr
Copy link
Owner

cnlohr commented Dec 11, 2018

Hey! Sorry I am just getting to reading these.

I am concerned about needing to clean up, since I never really designed that with in mind, but the closing could be added in XDriver.c

I have made a lot of updates to rawdraw since colorchord, so it may make sense to merge those changes in, by overwriting the individual .c/.h files. https://github.com/cnlohr/rawdraw

I recommend adding a void HandleDestroy(); call in XDriver.c wherever you find it closes the window.

@cnlohr
Copy link
Owner

cnlohr commented Dec 11, 2018

I may have time this coming weekend to clean some stuff up around here, myself. Let me know where you get.

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