MediaRecorder - No value other than 0 returned from getMaxAmplitude

by Dave Sparks » Sun, 01 Feb 2009 03:04:00 GMT

Sponsored Links
 Are you running on a G1 or on the emulator? If on the emulator, maybe
audio input isn't working correctly and it's failing to open the audio
input device.


MediaRecorder - No value other than 0 returned from getMaxAmplitude

by nicolas cosson » Sun, 01 Feb 2009 08:09:46 GMT

 are you testing it on the emulator or on the G1 device?

I'm not sure about it but I've read around some forums that you need a
virtual sd card to record audio on the emulator. (with the
mksdcard.exe in the tools provided with the sdk)
Some other sources also say it isn't possible to record audio on the
emulator yet.

Check if you can read/hear what you have recorded since you are using
a sdcard, maybe the sdcard is too small.

Why would you use a thread to return the max amplitude?

I am myself looking forward to record audio on the emulator and
constantly find contradictory informations about whether it's possible
or not.
the manual says it's not.

Any insight about that is appreciated in addition to the upper


On 31 jan, 15:12, ""


Sponsored Links

MediaRecorder - No value other than 0 returned from getMaxAmplitude

by Dave Sparks » Sun, 01 Feb 2009 12:18:21 GMT

 You shouldn't have to reboot the device. The release() call just
forces the release of the hardware resources instead of waiting for
the garbage collector to come along.

You should always call release() in your onPause() if you are using a
singleton hardware resource like a media player, media recorder,
camera, etc.


Other Threads

1. how to display icon in SimpleCursorAdapter?

Cursor c = ppp.getAll();

String[] from = new String[] {"name","gender","address"};

int[] to = new int[] {,,};

SimpleCursorAdapter peoples = new SimpleCursorAdapter
(this,R.layout.money_row, c, from, to);

setListAdapter(peoples );

i get the data from database, and list it in listview, now it can
display normally with all textview.

the gender field, it display text also, i want to replace it with
icon. how can i do it?


2. SurfaceView speed optimization suggestions (or just kick it up to openGL)?

I am trying to optimize my graphics app.  I have read the best practices and
have employed these and they have helped but, I am still getting hiccups.  I
get the hiccups when more of the screen is drawn upon.  I am looking for
either strategies on how to speed things up or a convincing that employing
openGL is the best solution.

My app draws graphics directly on a SurfaceView.  My workspace is larger
than the screen. I am using translate.  My draw loop determines time passed
between draws and adjusts update calls accordingly.  More updates are
required in subsequent passes when more of the screen area is drawn upon (in
other words, a big circle the diameter of the screen width will take longer
than a small circle 1/10 of the screen width).

It seems to me that the graphics processor is the bottleneck (no?).

I have an easing routine when the app scrolls (triggered via onFling ...
kind of like the way lists work but in 2D).  This speed issue is most
visually apparent here.

If openGL is the solution, I can put this aside for now and upgrade later
when I have time to ramp up on openGL.  If there are other solutions, I
would like to hear them.  One thought I have is to draw to a bitmap before
engaging my scrolling/easing and move the bitmap instead of adjusting the

Feedback super appreciated.

Thank You,
Jason Van Anden


3. problems with Phone.apk built from source

4. App not visible in Android Market of Samsung Galaxy

5. How to implement this simple animation ?

6. How does android Gallery scrolls on a TrackBall Event

7. Automatic Updates - iphone vastly superior (Was Availability of Developer Phone.)