0

I'm currently working on a visual project in C++ / OpenGL which projects 3D fractals and render them depending on a simple fourier transform I do on a .wav audio file i put as input of the program to get the frequencies and change the fractal according to them while playing it.

This allows for example the shape to "bounce" to the beat of the song or change the illumination according to the pitch of the voice. Here's an example of what I've done yet : https://www.youtube.com/watch?v=4xFvnvORr1Y

The thing is for know you have to download a music and put it as input of the program if you want the shape to evolve along the music. What I want to do actually is for a user to open this app in background and play a music on youtube or spotify, while my program get the audio output of the computer to insert it in my program in order for the fractal to do real time modifications according to the audio output.

Do you have any clues or ideas on how to redirect the audio output of a system (i'm on win10) and inject it in a buffer variable in C++ ? I did a little bit of research but I did not find anything that could help me.

Thanks in advance for your answers, and hope you're all doing great :)

Cheers,

Nathan

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
  • For windows, the Core Audio API does provide something along these lines: https://learn.microsoft.com/en-ca/windows/win32/coreaudio/loopback-recording –  May 26 '21 at 19:05
  • Not all sound cards have this feature, on ones that do it's usually called "What You Hear". – Ben Voigt May 26 '21 at 21:40
  • If your question is different from the one I marked it as duplicate of, use the EDIT feature to add more details. It's often even a good idea to directly link the other one and say "Same as this, except Y instead of X". – Ben Voigt May 26 '21 at 21:42

0 Answers0