mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-28 12:33:12 +00:00
changing to channelCount to match rest of API
This commit is contained in:
parent
dbd77be2ef
commit
927ff54166
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||||
|
|
|
@ -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,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue