projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.39k stars 375 forks source link

Update WASAPI to use projectm_pcm_add_float #626

Closed sean5446 closed 2 years ago

sean5446 commented 2 years ago

projectm_pcm_add_float_1ch_data -> projectm_pcm_add_float

Tested with STEREO and MONO, both seemed to work. Not sure what the 1ch was referring to.

revmischa commented 2 years ago

Cool! I think this file needs to be updated: https://github.com/projectM-visualizer/frontend-sdl2/blob/master/src/AudioCaptureImpl_WASAPI.cpp For the SDL2 application

kblaschke commented 2 years ago

Cool! I think this file needs to be updated: https://github.com/projectM-visualizer/frontend-sdl2/blob/master/src/AudioCaptureImpl_WASAPI.cpp For the SDL2 application

The WASAPI implementation doesn't even exist in the new SDL2 app's master yet. The WASAPI code in libprojectM's example app here is mostly a copy of the win32 SDK loopback capture sample code, and doesn't care for a lot of stuff like vanishing audio devices (e.g. unplug a headset which was the default device, and see projectM crash).

I'm currently working on getting the new implementation running with proper device selection, which will of course use the latest libprojectM API calls to add audio samples.

kblaschke commented 2 years ago

Nice, thanks! Will merge as soon as the build tests ran.