Download

Getting system audio for Calculate Audio Spectrum

Hey guys! We are trying to allow users to just play music in whatever they are used to while using our app, and need the systems audio frequency data.

Any leads on how to go about getting that into the sound viz plugins that come with ue4?

Thanks!

Hey!

Don’t use the audio visualizer, which comes with UE4. You can’t package your project if you use it.

Instead, you may be interested in eXi’s excellent sound visualization plugin, which I also use btw :).

https://forums.unrealengine.com/showthread.php?94974-eXi-s-Sound-Visualization-Plugin-(works-in-cooked-builds)

Is there a way to access the system audio tho? rather than loaded ogg files?

As far as I know not with blueprints. Atleast I haven’t heard of a way to do it with blueprints. Maybe someone else can shed some light on that subject.

This is not something you can get robustly for all cases in general, much less from the Unreal Engine.
There are a number of reasons, ranging from “the system sound stream may be an AC3 bit stream” to “many sound cards don’t have a loopback feature” to “the recording companies don’t like it if there exists a generic everything-feedback digital loop.”

For each operating system, you may be able to develop some kind of sound driver or kernel plugin, which can attach at a low enough level (typically, where “room equalizer” or “echo cancellation” would plug in) and extract the audio, and make it available to other programs through some device interface, and then in turn open that device interface to read (really, re-record) the sound that’s being played.

Some sound cards support a “What You Hear” or “System Loopback” recording source, so if that is available, you could set that as the recording input, and open the system sound recording device to get the data.
That doesn’t work for devices that don’t have that feature, though (USB or Bluetooth headsets or HDMI audio-out typically don’t, for example.)