Audio.startRecording() This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to Audio Class Summary

Availability
Windows, Mac OSX

Usage
mdm.Audio.startRecording(filename:String, sampleRate:Number, recordingMode:Number):Void

Parameters
filename:String - The output filepath

sampleRate:Number - The sample rate

recordingMode:Number - Recording mode

Returns
Nothing

Description
Uses the system sound capture capabilities to record audio from a Microphone or any Line In. On Windows, an uncompressed .wav file is created, whilst Mac OSX Projectors will create an MPEG 4 Audio .m4a file.

Notes
The 'sampleRate' parameter must have a value of either 44100, 22050 or 11025.

The 'recordingMode' parameter must have either value 1 for mono or 2 for stereo.

Example Code
// Windows
mdm.Audio.startRecording("myRecording.wav", 44100, 2);

// Mac OSX
mdm.Audio.startRecording("myRecording.m4a", 44100, 2);

mdm.Audio Class Example Downloads
No Example Downloads Available


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page