¡@

Home 

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

android Programming Glossary: totalbytebuffer

Voice Detection in Android Application

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

bufferSizeInBytes boolean recording false float tempFloatBuffer new float 3 int tempIndex 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.. byte totalAudioLen 16 0xff finalBuffer 43 byte totalAudioLen 24 0xff for int i 0 i totalReadBytes i finalBuffer 44 i totalByteBuffer i FileOutputStream out try out new FileOutputStream fn try out.write finalBuffer out.close catch IOException e TODO.. tempIndex break Recording sound here. Log.i TAG Recording Sound. for int i 0 i numberOfReadBytes i totalByteBuffer totalReadBytes i audioBuffer i totalReadBytes numberOfReadBytes tempIndex Check this link . share improve this answer..

Android: Listener to record sound if any sound occurs

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

bufferSizeInBytes boolean recording false float tempFloatBuffer new float 3 int tempIndex 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.. byte totalAudioLen 16 0xff finalBuffer 43 byte totalAudioLen 24 0xff for int i 0 i totalReadBytes i finalBuffer 44 i totalByteBuffer i FileOutputStream out try out new FileOutputStream fn try out.write finalBuffer out.close catch IOException e TODO.. tempIndex break Recording sound here. Log.i TAG Recording Sound. for int i 0 i numberOfReadBytes i totalByteBuffer totalReadBytes i audioBuffer i totalReadBytes numberOfReadBytes tempIndex For more details you can also look at this demo.....