diff --git a/platform/javascript/audio_server_javascript.cpp b/platform/javascript/audio_server_javascript.cpp index fd505b8a8f0..a2c6740eaf9 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 bdab171b45e..450237d324f 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/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp index 09cb4eca5fd..141c940615d 100644 --- a/servers/audio/audio_server_sw.cpp +++ b/servers/audio/audio_server_sw.cpp @@ -455,12 +455,12 @@ void AudioServerSW::voice_play(RID p_voice, RID p_sample) { } -void AudioServerSW::voice_set_volume(RID p_voice, float p_db) { +void AudioServerSW::voice_set_volume(RID p_voice, float p_volume) { VoiceRBSW::Command cmd; cmd.type=VoiceRBSW::Command::CMD_SET_VOLUME; cmd.voice=p_voice; - cmd.volume.volume=p_db; + cmd.volume.volume=p_volume; voice_rb.push_command(cmd); } diff --git a/servers/audio/audio_server_sw.h b/servers/audio/audio_server_sw.h index 77d2f2e8dda..250855a43ee 100644 --- a/servers/audio/audio_server_sw.h +++ b/servers/audio/audio_server_sw.h @@ -146,7 +146,7 @@ public: virtual void voice_play(RID p_voice, RID p_sample); - virtual void voice_set_volume(RID p_voice, float p_db); + 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/servers/audio_server.h b/servers/audio_server.h index f54698a1e38..cd3e920f31b 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -210,7 +210,7 @@ public: virtual void voice_play(RID p_voice, RID p_sample)=0; - virtual void voice_set_volume(RID p_voice, float p_gain)=0; + virtual void voice_set_volume(RID p_voice, float p_volume)=0; virtual void voice_set_pan(RID p_voice, float p_pan, float p_depth=0,float height=0)=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)=0; virtual void voice_set_chorus(RID p_voice, float p_chorus )=0;