Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 24th, 2012  |  syntax: None  |  size: 0.63 KB  |  hits: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Corona SDK Volume and Recording
  2. if "simulator" == system.getInfo("environment") then
  3.     dataFileName = dataFileName .. ".ogg"`
  4. else
  5.     local platformName = system.getInfo( "platformName" )
  6.     if "iPhone OS" == platformName then
  7.         dataFileName = dataFileName .. ".aif"
  8.     elseif "Android" == platformName then
  9.         dataFileName = dataFileName .. ".3gp"
  10.     else
  11.         print("Unknown OS " .. platformName )
  12.     end
  13. end
  14. local filePath = system.pathForFile( dataFileName, system.DocumentsDirectory )
  15.  
  16. -- Create an object to access audio input features
  17. local r = media.newRecording(filePath)
  18. r:startTuner()
  19. r:startRecording()