I want make use of loopback device (YouTube playing from the browser), how can I change the settings so that in processBlock (AudioBuffer& buffer) the buffer is from the loopback device.
If you’re building a stand-alone application, you’ll need to install a Loopback audio driver such as iShowU Audio Driver, O.B.S.’ audio capture thing or Screenflow’s audio driver. It depends on your OS.
Then simply choose that driver as your audio input in your application, and as the audio output in the thing that’s playing audio.
If you’re building a plugin, then you’ll need to set the HOST’s audio driver settings to use the above-mentioned drivers.
an example for capturing audio from the browser would be to set the computer’s Audio Output to use iShowU Audio Driver, and then in your app, set the audio input to iShowU Audio Driver. this will route the audio from your browser (and any other app that sends sound to the system audio device) into your app.