mp3 files <=0.34 secs not playing on Droid X using MediaPlayer

by Mark Carter » Sat, 17 Jul 2010 01:14:55 GMT

Sponsored Links
 Getting reports that mp3 files <= 0.34 secs in length, are not played
(or, at least, inaudible) on the Droid X.  Works fine on other devices
I've tried (e.g. Nexus One, Hero, G1)

All files longer than 0.34 secs are working fine. I've tested this
with about 100 files (mixture of short and long) and the correlation
is 100%.

Has anyone else experienced this?


mp3 files <=0.34 secs not playing on Droid X using MediaPlayer

by Mark Carter » Sat, 17 Jul 2010 01:18:25 GMT

 Should also mention the file format:

44100Hz, 64kbps, mono


Sponsored Links

mp3 files <=0.34 secs not playing on Droid X using MediaPlayer

by Mark Carter » Sat, 17 Jul 2010 01:42:19 GMT

 Comparing the logs of a file that plays and one that doesn't play.
Well, they are the same except the one that does play has these
additional entries:

D/AudioHardwareMot( 7494): AudioStreamOut::wake: disabling SRC
D/AudioHardwareMot( 7494): Output 0x11c48 exiting standby
D/OMX_MP3 ( 7494): MP3DEC_HandleUSNError():3548
E/ProfileVideoFrameDrops( 7494): PVMediaOutputNodePort :: Early 0
frames :: OnTime 0 frames :: Late 0 frames :: Total 9 frames
E/ProfileVideoFrameDrops( 7494): PVMediaOutputNodePort :: Early
0.000000 % :: OnTime 5245.171875 % :: Late -0.000000 %

So, it appears not even an attempt is made to play the shorter file
(but no error message is given) and the log simply reads:

D/        ( 7494): sourceURL is /sdcard/veryshort.mp3
D/        ( 7494): PVMFCPMMotPlugInOMA1:SetSourceInitializationData
MOT_SVC_drm_openSession not oma drm file
D/TIOMX_CORE( 7494): Found component OMX.TI.MP3.decode with refCount 0
D/OMX_MP3 ( 7494): OMX_ComponentInit():216 Entering OMX_ComponentInit
W/MediaPlayer(20385): info/warning (1, 44)
I/MediaPlayer(20385): Info (1,44)
D/        ( 7494): enter SharedLibraryLookup
D/        ( 7494): enter GetFactoryAndMimeString
D/OMX_MP3 ( 7494): MP3DEC_LCML_Callback():2585 stop ack. received.
stop waiting for sending disable command completed
D/TIOMX_CORE( 7494): Found matching pHandle(0xc24e0) at index 5 with
refCount 1


Other Threads

1. ViewFlipper with clickable items


I am using the ViewFlipper to switch between different views by
implementing a swing (mouse down, move and release). This works great
with non-clickable items, e.g. a TextView.

But if the views are clickable items (such as buttons), the onTouch()
method of the ViewFlipper is not called. :-(
Does anyone know why this is so and how I can implement this "pseudo

I know that I could do this easily by using the 1.6 SDK and the new
gesture support, but my application is limited to 1.5.

Thanks in advance & regards

Marc Reichelt   ||

PS: I developed a simple example so that you can see what I mean.

--------- Content of ---------
package com.example.test;

import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.ViewFlipper;

public class TestFlipper extends Activity {
        /** Called when the activity is first created. */
        public void onCreate(Bundle savedInstanceState) {

                final ViewFlipper flipper = (ViewFlipper) findViewById
                flipper.setOnTouchListener(new OnTouchListener() {

                        private float oldX;

                        public boolean onTouch(View v, MotionEvent event) {
                                switch (event.getAction()) {
                                case MotionEvent.ACTION_DOWN:
                                        // save start X location
                                        oldX = event.getX();
                                        return true;

                                case MotionEvent.ACTION_UP:
                                        // get old X location where the user 
started the move
                                        float currentX = event.getX();

                                        // do not consume event if it is not 
clear enough
                                        if (Math.abs(currentX - oldX) < 25.0f)
                                                return false;

                                        // show previous view
                                        if (oldX < currentX) {
                                                return true;

                                        // show next view
                                        if (oldX > currentX) {
                                                return true;

                                // do not consume this event by default
                                return false;

--------- End ---------

--------- Content of main.xml ---------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="

        <ViewFlipper android:layout_height="fill_parent"
android:layout_width="fill_parent" android:id="@+id/flipper">
                <Button android:id="@+id/b1" android:layout_height="fill_parent"
android:layout_width="fill_parent" android:text="1"
android:textSize="100px" />
                <Button android:id="@+id/b2" android:layout_height="fill_parent"
android:layout_width="fill_parent" android:text="2"
android:textSize="100px" />
                <Button android:id="@+id/b3" android:layout_height="fill_parent"
android:layout_width="fill_parent" android:text="3"
android:textSize="100px" />

--------- End ---------

2. CheckedTextView.isChecked

This is a two part question:

1) Is there a preferred listener for this control?  I notice in order
to get this work, I had to listen for
AdapterView.OnItemSelectedListener and AdapterView.OnItemClickListener

2) Within my onItemClick method, the value of control.isChecked() is
opposite the GUI.  IOW, when I check the box, it returns false.  When
I uncheck, it returns true.


3. Custom View donot Draw in ListView

4. Custom translucent theme

5. How to specify the maxWidth of a TextView as a percentage of screen width?

6. Reading/Decoding bar code stored in resources

7. Android Developers - Don't miss your chance to regisetr for upcoming Sprint dev conf Oct 26 in Santa Clara