It looks like you're new here. If you want to get involved, click one of these buttons!
application:setKeepAwake(true) require 'microphone' local file = '|D|file.wav' local mic = Microphone.new(nil, 44100, 2, 16, 1) mic:setOutputFile(file) local timer = Timer.new(1000, 1) timer:addEventListener(Event.TIMER_COMPLETE, function() mic:stop() local sound = Sound.new(file) print(sound:getLength()) -- 700\800 ms instead of 1000 end) timer:start() mic:start() |
Likes: oleg
Comments
Unity by the way already has api for fixed record time =(
Likes: Apollo14