×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2012.821 | Released: 23 May 2012, 2:01am | What's New | Download Now

object:startRecording()

Description:

Start audio recording.

Note: Starting an audio recording will stop any audio playback. You cannot record and play audio at the same time.

Syntax:

object:startRecording( )

Example:

local filePath = system.pathForFile( dataFileName, system.DocumentsDirectory )
r = media.newRecording( filePath)
r:startRecording( )

Parameters:

None.

Returns:

Nothing.

Remarks:

To enable audio recording on Android devices, you must set the permission level in the build.settings file.

1
2
3
4
5
6
7
settings =
{
   androidPermissions =
   {
       "android.permission.RECORD_AUDIO"
   },
}

Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Corona SDK 2.0
  • Windows:
    Build 2011.508
  • iOS:
    Corona SDK 2.0
  • Android:
    Corona SDK 2.0

Replies

rahulsingh2k10
User offline. Last seen 3 weeks 4 days ago. Offline
Joined: 9 Aug 2011

is there a way to save multiple recorded sound in the same app?

MBD's picture
MBD
User offline. Last seen 11 hours 34 min ago. Offline
Joined: 14 Sep 2010

Will recording and playing back at the same time every be supported?