cnlohr / colorchord

Chromatic Sound to Light Conversion System
Other
663 stars 115 forks source link

Question: New version does not work in Wallpaper engine #109

Open Fireflaker opened 4 years ago

Fireflaker commented 4 years ago

Hi! I have very little experience with C. I am trying to get Colorchord to work as a wallpaper. Unnecessary as it is, the old compile works in Wallpaper engine but the new one doesn't, and reports can not open certain files in the Colorchord Console. I wonder why. The old version is attached below.

When the resolution is set to 3840*2160, the debug overlay hurts performance significantly. Is there a place in config.txt where I can turn off the debug overlay-when the program lunches- by default. Wallpaper engine seems to block keyboard input. Or is there some code I can comment out before compiling?

Lastly, is it possible to add some postprocessing, for example, to get rid of the staircase pixelations?

I use virtual loopback for audio output delay so processing time is not a concern.

Fireflaker commented 4 years ago

$colorchord2-old.zip

CaiB commented 4 years ago

How are you compiling, and what files are reported missing?

As for disabling the debug output, one way to do it is to simply comment out lines 534-628 in main.c: https://github.com/cnlohr/colorchord/blob/master/colorchord2/main.c#L534-L628

You may get significantly improved performance if you use OpenGL mode. But it's also possible that this is what is causing it to no longer work, as this was enabled by default not long ago.

If you are compiling using the windows/compile.bat script, try removing -DCNFGOGL from line 6: https://github.com/cnlohr/colorchord/blob/master/colorchord2/windows/compile.bat#L6 (removing this will disable OpenGL, so if the problem is not fixed, put it back)

You mention loopback. I assume you're on Windows, have you tried using WASAPI mode instead? It supports loopback from output devices directly. To do so, simply specify two lines in the config: sound_source=WASAPI and devrecord=defaultRender