¡@

Home 

2014/10/16 ¤W¤È 08:26:39

android Programming Glossary: totalabsvalue

Voice Detection in Android Application

http://stackoverflow.com/questions/7955041/voice-detection-in-android-application

0 int totalReadBytes 0 byte totalByteBuffer new byte 60 44100 2 While data come from microphone. while true float totalAbsValue 0.0f short sample 0 numberOfReadBytes audioRecorder.read audioBuffer 0 bufferSizeInBytes Analyze Sound. for int i 0 i bufferSizeInBytes.. 0 bufferSizeInBytes Analyze Sound. for int i 0 i bufferSizeInBytes i 2 sample short audioBuffer i audioBuffer i 1 8 totalAbsValue Math.abs sample numberOfReadBytes 2 Analyze temp buffer. tempFloatBuffer tempIndex 3 totalAbsValue float temp 0.0f for.. audioBuffer i 1 8 totalAbsValue Math.abs sample numberOfReadBytes 2 Analyze temp buffer. tempFloatBuffer tempIndex 3 totalAbsValue float temp 0.0f for int i 0 i 3 i temp tempFloatBuffer i if temp 0 temp 350 recording false Log.i TAG 1 tempIndex continue..

Android: Listener to record sound if any sound occurs

http://stackoverflow.com/questions/9323452/android-listener-to-record-sound-if-any-sound-occurs

0 int totalReadBytes 0 byte totalByteBuffer new byte 60 44100 2 While data come from microphone. while true float totalAbsValue 0.0f short sample 0 numberOfReadBytes audioRecorder.read audioBuffer 0 bufferSizeInBytes Analyze Sound. for int i 0 i bufferSizeInBytes.. 0 bufferSizeInBytes Analyze Sound. for int i 0 i bufferSizeInBytes i 2 sample short audioBuffer i audioBuffer i 1 8 totalAbsValue Math.abs sample numberOfReadBytes 2 Analyze temp buffer. tempFloatBuffer tempIndex 3 totalAbsValue float temp 0.0f for.. audioBuffer i 1 8 totalAbsValue Math.abs sample numberOfReadBytes 2 Analyze temp buffer. tempFloatBuffer tempIndex 3 totalAbsValue float temp 0.0f for int i 0 i 3 i temp tempFloatBuffer i if temp 0 temp 350 recording false Log.i TAG 1 tempIndex continue..