OfficialIncubo / BeatDrop-Music-Visualizer

The Milkdrop2 Music Visualization Standalone, only for Windows
https://twitter.com/BeatDropVis
Other
40 stars 2 forks source link

Support changing audio input! #14

Open OfficialIncubo opened 1 year ago

OfficialIncubo commented 1 year ago

Really excited about this feature! This feature will change all the audio inputs sequentially, from speakers, microphone to stereo mix! If it's on the final list and you press the hotkey again, it will hop again to speakers. Hotkey: CTRL + A I'll share this as a reference: https://github.com/milkdrop2077/MilkDrop3/issues/10

milkdrop2077 commented 1 year ago

I've been working on that, I can now choose what audio device to choose. The problem is, beatdrop code is old, and does not support microphone or high res audio source like 192kHz. Projectm's audio capture seems way more advanced. I don't know how hard it will be to port the code to beatdrop.

OfficialIncubo commented 1 year ago

Why the BeatDrop code is so old? I wish I want this to support microphone!

OfficialIncubo commented 1 year ago

Take a look at the projectM's Audio Capture. We need to convert this to a fully functional one.

kblaschke commented 6 months ago

As I've reimplemented the whole WASAPI capture code from scratch for the new projectM standalone app, this one would be a better starting point:

https://github.com/projectM-visualizer/frontend-sdl2/blob/master/src/AudioCaptureImpl_WASAPI.cpp

Since I'm still the sole author of the code, so I've relicensed the code under BSD 3-clause and removed the projectM references from it and replaced them with ToDo comments where the buffer code needs to go. See the attached ZIP. You can use it as you see fit. You'll propbably want to replace the POCO stuff with pure Win32 API code, but I can't really help with that I'm afraid.

The second thing worth mentioning is that this implementation works with signed float sample. If that's not desirable, you can either use IAudioClient::IsFormatSupported() to request the proper sample format or convert the float samples yourself.