summaryrefslogtreecommitdiff
path: root/platform/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript')
-rw-r--r--platform/javascript/audio_server_javascript.cpp4
-rw-r--r--platform/javascript/audio_server_javascript.h2
-rw-r--r--platform/javascript/detect.py3
3 files changed, 6 insertions, 3 deletions
diff --git a/platform/javascript/audio_server_javascript.cpp b/platform/javascript/audio_server_javascript.cpp
index fd505b8a8f..a2c6740eaf 100644
--- a/platform/javascript/audio_server_javascript.cpp
+++ b/platform/javascript/audio_server_javascript.cpp
@@ -259,12 +259,12 @@ void AudioServerJavascript::voice_play(RID p_voice, RID p_sample){
voice->active=true;
}
-void AudioServerJavascript::voice_set_volume(RID p_voice, float p_gain){
+void AudioServerJavascript::voice_set_volume(RID p_voice, float p_volume){
Voice* voice=voice_owner.get(p_voice);
ERR_FAIL_COND(!voice);
- voice->volume=p_gain;
+ voice->volume=p_volume;
if (voice->active) {
EM_ASM_( {
diff --git a/platform/javascript/audio_server_javascript.h b/platform/javascript/audio_server_javascript.h
index bdab171b45..450237d324 100644
--- a/platform/javascript/audio_server_javascript.h
+++ b/platform/javascript/audio_server_javascript.h
@@ -125,7 +125,7 @@ public:
virtual void voice_play(RID p_voice, RID p_sample);
- virtual void voice_set_volume(RID p_voice, float p_gain);
+ virtual void voice_set_volume(RID p_voice, float p_volume);
virtual void voice_set_pan(RID p_voice, float p_pan, float p_depth=0,float height=0); //pan and depth go from -1 to 1
virtual void voice_set_filter(RID p_voice, FilterType p_type, float p_cutoff, float p_resonance, float p_gain=0);
virtual void voice_set_chorus(RID p_voice, float p_chorus );
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 104cede3f1..ec21bf6ee4 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -76,6 +76,9 @@ def configure(env):
#env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-g4', '-DDEBUG_ENABLED'])
env.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC'])
+ if(env["opus"]=="yes"):
+ env.opus_fixed_point="yes"
+
env.Append(CPPFLAGS=["-fno-exceptions",'-DNO_SAFE_CAST','-fno-rtti'])
env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DNO_FCNTL','-DMPC_FIXED_POINT','-DTYPED_METHOD_BIND','-DNO_THREADS'])
env.Append(CPPFLAGS=['-DGLES2_ENABLED'])