Record/Save/Playback of Audio clips.. How to?


I am working on recording an audio clip, saving it to disk and playing it back the next time the scene is loaded. Currently i am doing these:

  1. Record using AudioSource, AudioClip and Microphone methods.
  2. Playback the AudioClip while the scene is running.

My problem is that once the scene transitions to another, I want to save these AudioClips as files (.wav or other) on disk. On reloading the scene, I want to load them from the disk to the Audioclip again. Now, since the files are created during runtime, I am not sure if i ll be able to load them into assets. Also if i want to store them as AudioClips themselves, is there anyway I can save/load these in the application?

Any help is appreciated.

Figured out the way to go as this … If someone s wondering,

  1. Record Audio clip using Microphone.
  2. Save to wav file on to the disk using the above link script.
  3. Read Asset using WWW class, load to audio clip.
  4. Playback.

The example at Unity - Scripting API: AudioSource.SetScheduledEndTime shows how you can save audio clips as wav files.

how can i record the microphone and other sound in scene together? i wrote a drum pad application with unity and i want to record mic and other sound and i want save them to a wave file(mixed)…i used of “savwav” script…how can i give to “” two output AudioSource? can i use AudioListener and give GetOutputData to that? if i can…how…please help me…i cant fine my solution…sorry for bad English…
@omidnoor ,