openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.91k stars 2.55k forks source link

some way of grabbing audio samples of the main mix #3741

Open dimitre opened 9 years ago

dimitre commented 9 years ago

I would love some way of writing a raw audio file with realtime information from ofSoundStream, including ofSoundPlayer. Related threads https://github.com/timscaffidi/ofxVideoRecorder/issues/14 http://forum.openframeworks.cc/t/any-easy-way-to-export-audio-from-ofsoundstream-in-realtime/17638/4

kritzikratzi commented 8 years ago

This is simply not possible on most operating systems.

On Mac OSX you can use the soundflower audio driver to accomplish this https://github.com/mattingalls/Soundflower On Windows you can enable the "stereo mix" feature http://www.howtogeek.com/howto/39532/how-to-enable-stereo-mix-in-windows-7-to-record-audio/ I don't know about Linux in general, but with JACK this is definitely possible.

Afaik on Mac OS X even the snapz screenrecorder installs a virtual audio driver and when you begin recording it switches the current output to that virtual driver which also passes through to the original output device. It adds a bit of latency but allows recording. However, while i find it sad from practical standpoint, i also find it perfectly reasonable to have as little latency as possible in an audio architecture.