Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Sound Level frome microphone
Started by fm.fabrizio.marra Mar 15 2020 01:36 PM

No replies to this topic
audio gettunervolume() starttne()
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

fm.fabrizio.marra

[GLOBAL: userInfoPane.html]
fm.fabrizio.marra
  • Observer

  • 1 posts
  • Corona SDK

Hi,

I found on the web some codes about the topic but they don't work on Corona SDK.

enyone have idea hot ot run these codes.

[lua]

local displayGroup = display.newGroup()
local r = media.newRecording( filePath )
local decibelText = display.newText( displayGroup, "00.000", 180, 100, native.systemFontBold, 56 )
local updateStatus = function()
local v = r:getTunerVolume()
local t = system.getTimer()
local vdb = 10 * math.log( v )
decibelText.text = tostring( vdb )			
end
r:start()
r:startRecording()
Runtime:addEventListener( "enterFrame", updateStatus )

[lua]

Cheers

 

Fabrizio




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: audio, gettunervolume(), starttne()