changing to channelCount to match rest of API

This commit is contained in:
Yotam Mann 2021-10-13 13:09:09 -04:00
parent dbd77be2ef
commit 927ff54166
2 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ describe("Meter", () => {
it("returns an array of channels if channels > 1", () => { it("returns an array of channels if channels > 1", () => {
const meter = new Meter({ const meter = new Meter({
channels: 4, channelCount: 4,
}); });
expect((meter.getValue() as number[]).length).to.equal(4); expect((meter.getValue() as number[]).length).to.equal(4);
meter.dispose(); meter.dispose();

View file

@ -8,7 +8,7 @@ import { Analyser } from "./Analyser";
export interface MeterOptions extends MeterBaseOptions { export interface MeterOptions extends MeterBaseOptions {
smoothing: NormalRange; smoothing: NormalRange;
normalRange: boolean; normalRange: boolean;
channels: number; channelCount: number;
} }
/** /**
@ -59,7 +59,7 @@ export class Meter extends MeterBase<MeterOptions> {
context: this.context, context: this.context,
size: 256, size: 256,
type: "waveform", type: "waveform",
channels: options.channels, channels: options.channelCount,
}); });
this.smoothing = options.smoothing, this.smoothing = options.smoothing,
@ -70,7 +70,7 @@ export class Meter extends MeterBase<MeterOptions> {
return Object.assign(MeterBase.getDefaults(), { return Object.assign(MeterBase.getDefaults(), {
smoothing: 0.8, smoothing: 0.8,
normalRange: false, normalRange: false,
channels: 1, channelCount: 1,
}); });
} }