-
Notifications
You must be signed in to change notification settings - Fork 227
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
Windows build / switch to PortAudio #34
Comments
Observations:
I think those are prerequisites for a Windows / OSX port. If the bar calculation code were extracted to a “libcava” library, it would likely be easiest to treat “Linux cava”, “Windows cava”, et cetera as separate projects, as they'd share very little code. |
We could go with cygwin, which supports ncurses. You can distribute it with cygwin's dll to make cava standalone.
Framebuffer graphics would be great. The biggest issue is that the code is so painfully nonmodular (i.e. the "shared" variable, which makes everything hard). I've tried to separate different parts (i.e. move input_alsa -> input/alsa.c; input_fifo -> input/fifo.c; drawing -> output/terminal.c; etc.), but I wasn't able to do it. |
Sounds possible. I think it would help if we where able to separate cava in to three different "parts" first:
(@CelestialWalrus I was just writing this when you commented. ) The shared variable is, I admit, not ideal... I needed a way to pass the audio from the audio thread to the main thread. Any other way of doing this? |
@karlstav maybe pointers, but I'm not sure if those work with pthread. Or execute the input_* function in realtime (i.e. I'd like to suggest a directory structure if you don't mind:
(...and that autoconfigure thing, but I'm not sure how to exactly use it) |
Looks good. If you're thinking about executing the alsa input audio as a function, not a thread, every time cava is supposed to listen to audio. I already tried it en early early development. It didn't work very well as I missed huge chunks of the audio. Pointers might work, I think I tried that as well, but because I suck at pointers I got nowhere. |
Ironically enough I made a "working" WIN32 renderer (which compiles only under cygwin for now) only to find this. Would like to switch to a non-Pulseaudio/ALSA thing to make this actually usable. |
@nikp123 portaudio is the thing then. I don't think the implementation would be so difficult now, as the problems disused in this thread have been solved. One question that remains is how to capture audio from application or output in portaudio. |
@karlstav someone already asked that question, but I'm not sure how accurate are the results that the guy got. |
Well, I was thinking about porting cava to Windows & OS X, and I think a switch to PortAudio would be great, because it solves some of the issues.
Also: I think you can use PortAudio on Android, so that'd be nice.
The text was updated successfully, but these errors were encountered: