mirror of https://github.com/axmolengine/axmol.git
fix bug that SimpleAudioEngine can not change effect volume (#19605)
This commit is contained in:
parent
212abc4ea0
commit
60272f6b88
|
@ -172,7 +172,7 @@ void SimpleAudioEngine::setEffectsVolume(float volume)
|
|||
*/
|
||||
unsigned int SimpleAudioEngine::playEffect(const char* filePath, bool loop, float pitch, float pan, float gain)
|
||||
{
|
||||
return AudioEngine::play2d(filePath, loop, gain);
|
||||
return AudioEngine::play2d(filePath, loop, g_SimpleAudioEngine->effectsvolume);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -183,9 +183,10 @@ public:
|
|||
* @param gain Volume, in the range of [0..1]. The normal value is 1.
|
||||
* @return The sound id.
|
||||
*
|
||||
* @note Full support is under development, now there are limitations:
|
||||
* - no pitch effect on Samsung Galaxy S2 with OpenSL backend enabled;
|
||||
* - no pitch/pan/gain on win32.
|
||||
* @note Now use Audio Engine to implement SimpleAudioEngine, and Audio Engine doesn't support
|
||||
* - pitch
|
||||
* - pan
|
||||
* - gain
|
||||
*/
|
||||
virtual unsigned int playEffect(const char* filePath, bool loop = false,
|
||||
float pitch = 1.0f, float pan = 0.0f, float gain = 1.0f);
|
||||
|
|
Loading…
Reference in New Issue