Re: [android-developers] Re: Using the AudioRecord API

2011-01-24 Thread Ben McCann
Hi Tom, Yes, I did get it figured out. Here's a writeup I posted on my blog. http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/ -Ben Hi there, Did you ever have any luck with this AudioRecord API? There are q

[android-developers] Re: Using the AudioRecord API

2009-05-19 Thread Keith Wiley
I would like to do this too, and I also took the OP's approach. I can't actually get AudioRecord's ctor to set the state to STATE_INITIALIZED, but that's a separate issue. I'm trying to understand the correct code structure. You say we shouldn't use the position-based callback, but instead shou

[android-developers] Re: Using the AudioRecord API

2009-05-19 Thread Dave Sparks
You probably don't need the callback interface. The read() will block until the buffer is full. If you are getting buffer overflows, you are probably spending too much time in your doSomething() call. On May 19, 11:59 am, benmccann wrote: > Thanks for the response.  I'm still foggy on the API u

[android-developers] Re: Using the AudioRecord API

2009-05-19 Thread benmccann
Thanks for the response. I'm still foggy on the API usage though. I basically want to listen to the mic and continually process the incoming audio. Should I be using the OnRecordPositionUpdateListener at all? Or should it look something like: recorder.startRecording() while(recorder.read(buffe

[android-developers] Re: Using the AudioRecord API

2009-05-15 Thread Dave Sparks
You need to call the read() method. On May 15, 3:15 pm, benmccann wrote: > Any ideas? > > Thanks, > Ben > > On May 15, 1:02 am, benmccann wrote: > > > Hi, > > I'm trying to figure out how to use theAudioRecordclass.  I created > > a callback with a logging message, but don't ever see it called.

[android-developers] Re: Using the AudioRecord API

2009-05-15 Thread benmccann
Any ideas? Thanks, Ben On May 15, 1:02 am, benmccann wrote: > Hi, > I'm trying to figure out how to use theAudioRecordclass.  I created > a callback with a logging message, but don't ever see it called.  Do > you see anything wrong with what I'm doing?  Do you have an example of > how to use t