Jump to content
  • Advertisement
Sign in to follow this  
CoCoMo

[J2ME]How to play the sound smooth?

This topic is 4841 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

Hi I have some trouble with my game. When The Prince attack, it should play a att.mid at the same time. Unfortunately when i transfer the att.start() function, the game will be block for a short time. So my game become disfluency. everybody can tell my how to play the sound smooth? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Thanks for your reply!
I have already preteching/realizing the Player when i creat it, the code like below:
att = Player.creatPlayer(file, "auto/midi");
att.realize();
att.start();

But unfortunately play sound will block my game and my game become so disfluency, how to resolve this question? everyone can help me? this game is my first game in my Corporation and I must done it on time!

Share this post


Link to post
Share on other sites
Are you creating and prefetching the Player ahead of time or only when you need to play the sound?

shmoove

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!