- Home /
How to obtain audio data?
I'm trying to record in a video images and sounds generated with unity. So far I have figured out how to get the video frames by rendering to a RenderTexture off-screen. However, it does not seem to be a similar mechanism for capturing audio data. I do not want to use external applications for recording, and I would prefer to record the audio data without actually using the speakers (say, I want to use an off-speaker buffer instead).
Therefore, I'm considering mixing the sounds myself. But then, I cannot find a way to obtain the sample data from AudioClips. Is there a way to do that?
Answer by Sren Christiansen · May 15, 2010 at 08:40 AM
No. But it's planned for Unity 3.0.
Answer by StephanK · May 14, 2010 at 04:12 PM
Not without using external plugins like fmod.
Ok, but that approach raises a new problem. How do you get the sound files out of the standalone application so fmod can read them?
Answer by David Plans · Sep 16, 2010 at 12:48 AM
Sren, do you mean GetSpectrumData() and GetOutputData() in AudioListener? Or do you mean that 3.0 will also get sound recording (access to audio from microphone?)?
sorry, should have posted that as comment to Sren's post
yeah. No recording this time around. BTW You can use GetSpectrum.. and GetOutput... on each audio source as well