diff --git a/client/src/bindings/AudioFilter.cpp b/client/src/bindings/AudioFilter.cpp index 9a6d2c03..af9ae234 100644 --- a/client/src/bindings/AudioFilter.cpp +++ b/client/src/bindings/AudioFilter.cpp @@ -91,11 +91,19 @@ static void AddVolumeEffect(const v8::FunctionCallbackInfo& info) V8_GET_THIS_BASE_OBJECT(filter, alt::IAudioFilter); - V8_CHECK_ARGS_LEN(2); + V8_CHECK_ARGS_LEN2(2, 3); V8_ARG_TO_NUMBER(1, fVolume); V8_ARG_TO_INT(2, priority); - V8_RETURN_UINT(filter->AddVolumeEffect(fVolume, priority)); + int channel = -1; + if (info.Length() > 2) + { + V8_TO_UINT(info[2], channel2); + channel = channel2; + } + + Log::Info << "VolumeEffect2: " << fVolume << ", " << priority << ", " << channel << Log::Endl; + V8_RETURN_UINT(filter->AddVolumeEffect(fVolume, priority, channel)); } static void AddPeakeqEffect(const v8::FunctionCallbackInfo& info)