Hi, how are you?
I am trying to do a system that grabs the volume from the MIC and when it is bigger than a X value, it records, when it is smaller than that X value it plays the recorded sound.
I tried using startTuner(), but it crashes if you setup a filePath for media.newRecording(filePath) , also you cant run 2 recording objects at same time in Android.
Anyone had the same problem? I just bought Corona and now i am running bad with this bug…
Sounds simple, but never works in the real Android device.
My build is 2012.820 and Android 2.3
This is an example that crashes:
if “simulator” == system.getInfo(“environment”) then
dataFileName = dataFileName … “.ogg”
else
local platformName = system.getInfo( “platformName” )
if “iPhone OS” == platformName then
dataFileName = dataFileName … “.aif”
elseif “Android” == platformName then
dataFileName = dataFileName … “.3gp”
else
print("Unknown OS " … platformName )
end
end
local filePath = system.pathForFile( dataFileName, system.DocumentsDirectory )
– Create an object to access audio input features
local r = media.newRecording(filePath)
r:startTuner()
r:startRecording()
Thanks [import]uid: 151200 topic_id: 26775 reply_id: 326775[/import]