[android-developers] AudioRecord.read returns duplicate data

2014-10-10 Thread 'RLScott' via Android Developers
In my musical instrument tuner app I stream audio data to my analysis code with an AudioRecord.read() method which runs in a separate thread to decouple it from the UI. The AudioRecord was set up with a sample rate of 22050 and a 16384 samples. I read the data in chunks of 1024 samples at a t

[android-developers] AudioRecord.read keep blocking, How to get buffer data and no wait with AudioRecord.read?

2010-06-07 Thread Hill.Fu
I just want get the audio input data, and draw a wave, but now I don't know how to get audio data. This is my code: package com.fugui.fetal; import java.nio.ByteBuffer; import java.nio.ShortBuffer; import android.app.Activity; import android.content.Context; import android.media.AudioFormat; im

[android-developers] AudioRecord.read keep blocking and throwing " obtainBuffer timed out"

2010-04-01 Thread Jammy
I am writing a VOIP phone application and testing it on MOTO milestime. Sometime I meet a "obtainBuffer timed out" exception when i am calling AudioRecord.read , it don't return me any result but just block the thread. Runing on emulator with 1.5 OS won't get this exception. My codes: AudioRecord

[android-developers] AudioRecord.read

2009-09-24 Thread Natalie
Hi, I've been working with the AudioRecord class. When I first started running my code, when I called AudioRecord.read, I would get a bunch of messages in logcat beginning with AudioStreamInGeneric::read etc. but these messages have stopped coming up, and I also have found that the buffer I'm rea