Direct the audio output of a Web Browser
In 4.13.1, 4.14.1, and 4.15 (preview 4), I generated a Web Browser Widget and put this on a blueprint actor. I am aware that both the Web browser and use of a 3D widget are experimental features, but I would really like to know if there is a way to output the audio from the Web Browser into an audio component, thus making the Web Browser's audio spatialized.
Through researching this subject, I am aware that the CEF (Chromium Embedded Framework) uses Window's default sound device as its audio output stream, which if the audio is re-directed to an audio component this would fix that issue as well as the lack of attenuation.
Would I need to remove the current CEF implementation, download CEF, turn it into a plugin and hook this up to the Web Browser's functionality, and then change the way CEF outputs audio in order to redirect it to an audio component? By looking through CEF's BitBucket, I found a pull request for audio support: https://bitbucket.org/chromiumembedded/cef/pull-requests/18/adding-audio-support/diff. However, I do not know if this progress amounted to anything.
As it stands, I only have access to the header files that CEF provides, and none of the functions I've searched through provide any means of changing audio output. Any help is appreciated. :)
asked Feb 16 '17 at 12:03 AM in C++ Programming
That's a cool idea... I'm the audio programmer so I don't really know how the Web Browser Widget works... in fact, didn't even know that was a thing.
So if this implemented by chromium, and not us, it's up to that API to get the raw PCM data output. Googling, it looks like its not supported:
It does look like you can select a non-default output device but that won't help you.
So, assuming you figure out how to get the output PCM data from the browser widget, you'd then need to feed it to a procedural sound wave (USoundWaveProcedural). This is a bit tricky to setup and a lot of people have had issues getting it to work. It totally DOES work, it's just an advanced feature.
For GDC, I'll be demoing a new "synth component" object which basically handles the ugly details of dealing with a procedural sound wave and lets you just do really cool stuff with raw PCM data very easily. We've been building really cool real-time synthesizers with it.
I know this isn't too helpful :)
answered Feb 16 '17 at 06:42 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here