The volume setting in the AudioSource component does not seem to have any effect. I can even set it to 0 and it still plays the same as 1.
CC V.1.0.0, Windows 10 Pro x64, Using chrome for testing.
The volume setting in the AudioSource component does not seem to have any effect. I can even set it to 0 and it still plays the same as 1.
CC V.1.0.0, Windows 10 Pro x64, Using chrome for testing.
How do you change volume setting?
I’m using this (with audioVolume varrying from 0.0 to 1.0) and it works fine:
cc.audioEngine.setEffectsVolume(audioVolume);
I have to admit that from time to time, I have no sound at all, I don’t know why, but when I have sound, modifying volume works fine.
–
Daniel
Hi,
I am using the spinner box next to where it says “Volume”. I have tried different mp3 files.
It should be a bug, thanks! I will report it.
In the meantime, you can set the volume manually in some components onLoad function, like:
...
properties: {
audioComponent: cc.AudioSource
}
onLoad: function () {
this.audioComponent.volume = 0.5;
}
The audio component can be linked as a property in the inspector.
Thanks pandamicro