Stream a very large mp3?

by g1bb » Thu, 12 Mar 2009 09:00:14 GMT


Sponsored Links
 Hello,

Is it possible to stream a very large mp3 using MediaPlayer? The mp3 I
am interested in is over 270 mb.

Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~



Stream a very large mp3?

by g1bb » Thu, 12 Mar 2009 09:25:29 GMT


 For the record, here is the code:

 MediaPlayer player = new MediaPlayer();

            player.setAudioStreamType(AudioManager.STREAM_MUSIC);

            try {

                player.setDataSource(" http://mybigmp3.mp3 ");
                        } catch (IllegalArgumentException e1) {
                                // TODO Auto-generated catch block
                                e1.printStackTrace();
                        } catch (IllegalStateException e1) {
                                // TODO Auto-generated catch block
                                e1.printStackTrace();
                        } catch (IOException e1) {
                                // TODO Auto-generated catch block
                                e1.printStackTrace();
                        }
            try {
                                player.prepare();
                        } catch (IllegalStateException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        }
            player.start();


And the logcat:
03-12 01:22:10.996: WARN/System.err(324): java.io.IOException: Prepare
failed.: status=0xFFFFFFF6
03-12 01:22:10.996: WARN/System.err(324):     at
android.media.MediaPlayer.prepare(Native Method)
03-12 01:22:10.996: WARN/System.err(324):     at
com.myapp.app.Main.onCreate(Main.java:35)
03-12 01:22:10.996: WARN/System.err(324):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
03-12 01:22:10.996: WARN/System.err(324):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2104)
03-12 01:22:10.996: WARN/System.err(324):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2157)
03-12 01:22:10.996: WARN/System.err(324):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
03-12 01:22:10.996: WARN/System.err(324):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
03-12 01:22:10.996: WARN/System.err(324):     at
android.os.Handler.dispatchMessage(Handler.java:88)
03-12 01:22:10.996: WARN/System.err(324):     at android.os.Looper.loop
(Looper.java:123)
03-12 01:22:11.006: WARN/System.err(324):     at
android.app.ActivityThread.main(ActivityThread.java:3739)
03-12 01:22:11.006: WARN/System.err(324):     at
java.lang.reflect.Method.invokeNative(Native Method)
03-12 01:22:11.006: WARN/System.err(324):     at
java.lang.reflect.Method.invoke(Method.java:515)
03-12 01:22:11.006: WARN/System.err(324):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
03-12 01:22:11.006: WARN/System.err(324):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
03-12 01:22:11.006: WARN/System.err(324):     at
dalvik.system.NativeStart.main(Native Method)
03-12 01:22:11.006: ERROR/MediaPlayer(324): start called in state 0
03-12 01:22:11.026: ERROR/MediaPlayer(324): Error (-38,0)




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Stream a very large mp3?

by Dave Sparks » Thu, 12 Mar 2009 10:44:29 GMT


 've never tried an MP3 that big - it's quite possible that it won't
work. I think the largest file we ever tested was a one hour MP3 mix
file. I think it was about 70 MB.

On Mar 11, 6:25 pm, g1bb <corymgibb...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Web application development in India, SEO companies in India, Web designing companies in India

WebGuruz offers a range of services including Web application
development in India, SEO companies in India, Web designing companies
in India, Software outsourcing services in India

-- 

2. Figure out if current EGLContext is active and valid.

I'm trying to find a way to check to see if a current EGLContext
exists and is ready to use on Android. By specification, I've tried
using

((EGL10)EGLContext.getEGL()).eglGetCurrentContext()

and then comparing it to EGL10.EGL_NO_CONTEXT (tried .equals() and !
= ). However, even though through debugging it 'seems' that it is
returning an instance of 'EGL_NO_CONTEXT' (seems meaning all the
internal values are uninitialized) however no matter what comparison I
do I can't get it to work (At any rate using debugging shows
EGL_NO_CONTEXT's memory location is different than the returned
object).

Anyone know of another/proper method to get this done? I don't want to
do it by throwing a random GL call and catching the EGLError...

There is also a StackOverflow question up here:
http://stackoverflow.com/questions/3091937/call-to-check-if-a-current-eglcontext-exists-in-android

-- 

3. Creating the request to a webservice by kSoap2

4. Decrypt layouts and Decompile Classe.dex

5. Rendering Alpha Causes Frame Rate to Plummet on HTC Magic

6. Looking for developers who love to write

7. Can't mount iso file under Windows