- Home /
Grabbing system audio stream
I've been searching for this, and perhaps I'm not using the right terms. Is it possible to get audio that's playing from outside your application (like a music player) and use it to gather spectrum data? I believe the WWW class could get audio from something like Spotify or the like, but I'm interested in any audio coming from the system. Is this possible, and if so, how would I gain access to it?
Have a look here http://docs.unity3d.com/ScriptReference/$$anonymous$$icrophone.html
Won't this only work with a connected microphone? Wouldn't this just record audio input into the microphone or does it pick up system sounds such as background music?
Answer by r618 · May 01, 2017 at 04:11 PM
You can, when the system audio is configured properly, see this post:
and followup: https://forum.unity3d.com/threads/audiostream-an-audio-streaming-solution-for-all-and-everywhere.412029/page-2#post-3023900
I've tried it when developing my asset - which you don't need for this btw - if Unity's Microphone class works as expected when supplying the desired audio in device ( results varies from version to version from my testing )