Music object unable to pause

  ... in the unlikely case you discovered a bug, post it here.

Music object unable to pause

Postby marvellousmax » Mon Jan 20, 2014 8:50 am

Hello,

I am having a problem using Music class.

This is how I am using it:
1. load music from asset
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 MusicFactory.setAssetBasePath("sfx/music/");
  2.                 try {
  3.                         menu_music = MusicFactory.createMusicFromAsset(mBaseGameActivity.getMusicManager(), mBaseGameActivity, "rocket_station.ogg");
  4.                 } catch (IOException e) {
  5.                         e.printStackTrace();
  6.                 }
  7.                 menu_music.setLooping(true);
Parsed in 0.012 seconds, using GeSHi 1.0.8.4

2. play music
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. menu_music.play();
Parsed in 0.022 seconds, using GeSHi 1.0.8.4

3. change scene
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. mEngine.setScene(gameScene);
Parsed in 0.019 seconds, using GeSHi 1.0.8.4

music is still playing at this point
4. change scene back
5. pause music
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. menu_music.pause();
Parsed in 0.011 seconds, using GeSHi 1.0.8.4

Music keeps playing, and what's more, if I pause and then play the Music it will play twice simultaneously.
marvellousmax
 
Posts: 3
Joined: Thu Dec 12, 2013 4:59 am

Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests