fixed #542, Record the volume user specified though the background music is not playing.

This commit is contained in:
natural-law 2011-06-27 11:43:27 +08:00
parent 7ca759470c
commit 72f17ecbdf
2 changed files with 2 additions and 2 deletions

View File

@ -136,8 +136,8 @@ public class Cocos2dxMusic {
}
public void setBackgroundVolume(float volume){
this.mLeftVolume = this.mRightVolume = volume;
if (this.mBackgroundMediaPlayer != null){
this.mLeftVolume = this.mRightVolume = volume;
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);
}
}

View File

@ -136,8 +136,8 @@ public class Cocos2dxMusic {
}
public void setBackgroundVolume(float volume){
this.mLeftVolume = this.mRightVolume = volume;
if (this.mBackgroundMediaPlayer != null){
this.mLeftVolume = this.mRightVolume = volume;
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);
}
}