Skip to content

Commit

Permalink
feat(client): add channel parameter to addVolumeEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
vadzz-dev committed Nov 26, 2023
1 parent ad889dd commit e89d06b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions client/src/bindings/AudioFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,19 @@ static void AddVolumeEffect(const v8::FunctionCallbackInfo<v8::Value>& 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<v8::Value>& info)
Expand Down

0 comments on commit e89d06b

Please sign in to comment.