Jump to content
  • Advertisement
Sign in to follow this  
BigMarv

Sony Ericsson k310i + mp3s - sometimes they play, sometimes they don't?!?!?

This topic is 4166 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use the code below to play sounds in a little app for my K310i. The only thing is that sometimes the program will run and play all sounds perfectly, and other times it won't. i.e. it will play them all, or not a single sound. Anyone got any ideas? Thanks in advance Paul. public void PlaySound(int soundNum, int pauseCycles) { if ( soundNum > NA ) { try { String audioName = "sounds/" + AUDIO[soundNum] + ".mp3"; InputStream in = getClass().getResourceAsStream(audioName); Player p = Manager.createPlayer(in, "audio/x-mp3"); p.start(); if (pauseCycles > 0) { try{Thread.sleep(pauseCycles);}catch(InterruptedException ie){ie.printStackTrace();} } p.stop(); p.close(); in.close(); } catch (Exception e) {System.out.printnln(e.getMessage());} } };

Share this post


Link to post
Share on other sites
Advertisement
may be there are some kind of limit in the api, where you can play only mp3 non-mbr or mp3 with limited bitrate/size.

The best chance is to find what's the difference into the playable mp3 and the unplayable ones.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!