Jump to content
  • Advertisement
Sign in to follow this  
Multiverse

Music playing during call interrupt (Nokia 6630)

This topic is 4272 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 guys, I have a problem that if you accept a call interrupt while my theme music is playing, you can hear the them music in the background during the call. The reason for this (i suspect) is because if I receive a hideNotify() event, I stop all sound, and then restart the sound in showNotify(). The problem is that on the 6630, when a call is accepted, the midlet is brought back into the foreground so I assume a showNotify() event occurs. Are there any other events that occur when a phone call is accepted/ended, that I can test for to decide when to restart my music/sound? Thanks for reading! Multi

Share this post


Link to post
Share on other sites
Advertisement
I'm not aware of any other events to let you know when the call ended.

But if you look at most games you'll notice that after the game has been paused for whatever reason (a pauseApp() or hideNotify()), it usually comes back in a paused state, and waits for some kind of user input before unpausing itself. That would probably solve your problem.

shmoove

Share this post


Link to post
Share on other sites
you may also use a certain unorthodox method: in the thread loop, compute the time difference between two frames. if the time difference is greater than a value (usually between 1-3 seconds), it is possible that the phone sent the app to background and you have to pause your game. i dont master low-level java machine behaviour, but i assume that the thread execution is not paused but slowered, thus allowing the application to detect such changes.

also take care that having a "blocking" game loading will trigger the process described above [wink]

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!