mirror of https://github.com/axmolengine/axmol.git
fixed #542, Record the volume user specified though the background music is not playing.
This commit is contained in:
parent
7ca759470c
commit
72f17ecbdf
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue