AudioFilter extends PCMTransformer
new AudioFilter(options)
Parameter | Type | Optional | Description |
---|---|---|---|
options | PCMFiltererOptions | β | - |
Properties
private _processedSamples: number
public allowHalfOpen: boolean
If
- Source:
node_modules/@types/node/stream.d.ts#L872
public bassEQ: Equalizer
public bits: number
public bytes: number
public closed: boolean
- Source:
node_modules/@types/node/stream.d.ts#L861
public destroyed: boolean
Is
- Source:
node_modules/@types/node/stream.d.ts#L128
public disabled: boolean
public errored: null | Error
- Source:
node_modules/@types/node/stream.d.ts#L862
public extremum: number
public filters: Array<'8D' | 'Tremolo' | 'Vibrato' | 'BassBoost'>
public pulsatorConfig: AFPulsatorConfig
public readable: boolean
Is
- Source:
node_modules/@types/node/stream.d.ts#L84
public readableAborted: boolean
Returns whether the stream was destroyed or errored before emitting
- Source:
node_modules/@types/node/stream.d.ts#L78
public readableDidRead: boolean
Returns whether
- Source:
node_modules/@types/node/stream.d.ts#L90
public readableEncoding: null | BufferEncoding
Getter for the property
- Source:
node_modules/@types/node/stream.d.ts#L95
public readableEnded: boolean
Becomes
- Source:
node_modules/@types/node/stream.d.ts#L100
public readableFlowing: null | boolean
This property reflects the current state of a
- Source:
node_modules/@types/node/stream.d.ts#L106
public readableHighWaterMark: number
Returns the value of
- Source:
node_modules/@types/node/stream.d.ts#L111
public readableLength: number
This property contains the number of bytes (or objects) in the queue ready to be read. The value provides introspection data regarding the status of the
- Source:
node_modules/@types/node/stream.d.ts#L118
public readableObjectMode: boolean
Getter for the property
- Source:
node_modules/@types/node/stream.d.ts#L123
public sampleRate: number
public targetSampleRate: number
public totalSamples: number
public tremoloConfig: AFTremoloConfig
public type: 's16le' | 's16be' | 's32le' | 's32be'
public vibratoConfig: AFTremoloConfig
public writable: boolean
- Source:
node_modules/@types/node/stream.d.ts#L853
public writableCorked: number
- Source:
node_modules/@types/node/stream.d.ts#L859
public writableEnded: boolean
- Source:
node_modules/@types/node/stream.d.ts#L854
public writableFinished: boolean
- Source:
node_modules/@types/node/stream.d.ts#L855
public writableHighWaterMark: number
- Source:
node_modules/@types/node/stream.d.ts#L856
public writableLength: number
- Source:
node_modules/@types/node/stream.d.ts#L857
public writableNeedDrain: boolean
- Source:
node_modules/@types/node/stream.d.ts#L860
public writableObjectMode: boolean
- Source:
node_modules/@types/node/stream.d.ts#L858
public static captureRejectionSymbol: (typeof captureRejectionSymbol)
- Source:
node_modules/@types/node/events.d.ts#L291
public static captureRejections: boolean
Sets or gets the default captureRejection value for all emitters.
- Source:
node_modules/@types/node/events.d.ts#L296
public static defaultMaxListeners: number
- Source:
node_modules/@types/node/events.d.ts#L297
public static errorMonitor: (typeof errorMonitor)
This symbol shall be used to install a listener for only monitoring
- Source:
node_modules/@types/node/events.d.ts#L290
public currentDuration: number
public currentSampleRate: number
public estimatedDuration: number
public pulsator: number
public tremolo: AFTremoloConfig
Methods
public [asyncIterator](): AsyncIterableIterator<any>
- Source:
node_modules/@types/node/stream.d.ts#L502
public _construct(callback): void
Parameter | Type | Optional | Description |
---|---|---|---|
callback | (error: null | Error) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L140
public _destroy(error, callback): void
Parameter | Type | Optional | Description |
---|---|---|---|
error | null | Error | β | - |
callback | (error: null | Error) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L904
public _final(callback): void
Parameter | Type | Optional | Description |
---|---|---|---|
callback | (error: null | Error) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L905
public _flush(callback): void
Parameter | Type | Optional | Description |
---|---|---|---|
callback | TransformCallback | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L947
public _read(size): void
Parameter | Type | Optional | Description |
---|---|---|---|
size | number | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L141
public _readInt(buffer, index): number
Parameter | Type | Optional | Description |
---|---|---|---|
buffer | Buffer | β | - |
index | number | β | - |
public _transform(chunk, encoding, callback): void
Parameter | Type | Optional | Description |
---|---|---|---|
chunk | Buffer | β | - |
encoding | BufferEncoding | β | - |
callback | TransformCallback | β | - |
public _write(chunk, encoding, callback): void
Parameter | Type | Optional | Description |
---|---|---|---|
chunk | any | β | - |
encoding | BufferEncoding | β | - |
callback | (error: null | Error) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L896
public _writeInt(buffer, int, index): number
Parameter | Type | Optional | Description |
---|---|---|---|
buffer | Buffer | β | - |
int | number | β | - |
index | number | β | - |
public _writev(chunks, callback): void
Parameter | Type | Optional | Description |
---|---|---|---|
chunks | Array<{ chunk: any,encoding: BufferEncoding }> | β | - |
callback | (error: null | Error) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L897
public addListener(event, listener): AudioFilter
Event emitter The defined events on documents including:
- close
- data
- end
- error
- pause
- readable
- resume
Parameter | Type | Optional | Description |
---|---|---|---|
event | 'close' | β | - |
listener | (...args: unknown[]) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L446
public applyFilters(byte, channel): number
Parameter | Type | Optional | Description |
---|---|---|---|
byte | number | β | - |
channel | LR | β | - |
public clamp(val, max, min): number
Parameter | Type | Optional | Description |
---|---|---|---|
val | number | β | - |
max | number | β | - |
min | number | β | - |
public cork(): void
- Source:
node_modules/@types/node/stream.d.ts#L912
public destroy(error?): AudioFilter
Destroy the stream. Optionally emit an
Parameter | Type | Optional | Description |
---|---|---|---|
error | Error | β | Error which will be passed as payload in |
- Source:
node_modules/@types/node/stream.d.ts#L434
public disable(): void
public emit(event): boolean
Parameter | Type | Optional | Description |
---|---|---|---|
event | 'close' | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L454
public enable(): void
public end(cb?): AudioFilter
Parameter | Type | Optional | Description |
---|---|---|---|
cb | (...args: unknown[]) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L909
public eventNames(): Array<string | symbol>
Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or
- Source:
node_modules/@types/node/events.d.ts#L632
public getMaxListeners(): number
Returns the current max listener value for the
- Source:
node_modules/@types/node/events.d.ts#L489
public isPaused(): boolean
The
- Source:
node_modules/@types/node/stream.d.ts#L301
public listenerCount(eventName): number
Returns the number of listeners listening to the event named
Parameter | Type | Optional | Description |
---|---|---|---|
eventName | string | symbol | β | The name of the event being listened for |
- Source:
node_modules/@types/node/events.d.ts#L579
public listeners(eventName): Array<Function>
Returns a copy of the array of listeners for the event named
Parameter | Type | Optional | Description |
---|---|---|---|
eventName | string | symbol | β | - |
- Source:
node_modules/@types/node/events.d.ts#L502
public off(eventName, listener): AudioFilter
Alias for
Parameter | Type | Optional | Description |
---|---|---|---|
eventName | string | symbol | β | - |
listener | (args: Array<any>) => void | β | - |
- Source:
node_modules/@types/node/events.d.ts#L462
public on(event, listener): AudioFilter
Parameter | Type | Optional | Description |
---|---|---|---|
event | 'close' | β | - |
listener | (...args: unknown[]) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L462
public onUpdate(): void
public once(event, listener): AudioFilter
Parameter | Type | Optional | Description |
---|---|---|---|
event | 'close' | β | - |
listener | (...args: unknown[]) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L470
public pause(): AudioFilter
The
- Source:
node_modules/@types/node/stream.d.ts#L265
public pipe(destination, options?): T
Parameter | Type | Optional | Description |
---|---|---|---|
destination | T | β | - |
options | { end: boolean } | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L25
public prependListener(event, listener): AudioFilter
Parameter | Type | Optional | Description |
---|---|---|---|
event | 'close' | β | - |
listener | (...args: unknown[]) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L478
public prependOnceListener(event, listener): AudioFilter
Parameter | Type | Optional | Description |
---|---|---|---|
event | 'close' | β | - |
listener | (...args: unknown[]) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L486
public push(chunk, encoding?): boolean
Parameter | Type | Optional | Description |
---|---|---|---|
chunk | any | β | - |
encoding | BufferEncoding | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L421
public rawListeners(eventName): Array<Function>
Returns a copy of the array of listeners for the event named
Parameter | Type | Optional | Description |
---|---|---|---|
eventName | string | symbol | β | - |
- Source:
node_modules/@types/node/events.d.ts#L532
public read(size?): any
The
Parameter | Type | Optional | Description |
---|---|---|---|
size | number | β | Optional argument to specify how much data to read. |
- Source:
node_modules/@types/node/stream.d.ts#L218
public removeAllListeners(event?): AudioFilter
Removes all listeners, or those of the specified
Parameter | Type | Optional | Description |
---|---|---|---|
event | string | symbol | β | - |
- Source:
node_modules/@types/node/events.d.ts#L473
public removeListener(event, listener): AudioFilter
Parameter | Type | Optional | Description |
---|---|---|---|
event | 'close' | β | - |
listener | (...args: unknown[]) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L494
public resume(): AudioFilter
The
- Source:
node_modules/@types/node/stream.d.ts#L284
public seek(duration): void
Parameter | Type | Optional | Description |
---|---|---|---|
duration | number | β | - |
public setDefaultEncoding(encoding): AudioFilter
Parameter | Type | Optional | Description |
---|---|---|---|
encoding | BufferEncoding | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L908
public setEncoding(encoding): AudioFilter
The
Parameter | Type | Optional | Description |
---|---|---|---|
encoding | BufferEncoding | β | The encoding to use. |
- Source:
node_modules/@types/node/stream.d.ts#L243
public setFilters(filters): boolean
Parameter | Type | Optional | Description |
---|---|---|---|
filters | Array<'8D' | 'Tremolo' | 'Vibrato' | 'BassBoost'> | β | - |
public setMaxListeners(n): AudioFilter
By default
Parameter | Type | Optional | Description |
---|---|---|---|
n | number | β | - |
- Source:
node_modules/@types/node/events.d.ts#L483
public setPulsator(hz): void
Parameter | Type | Optional | Description |
---|---|---|---|
hz | number | β | - |
public setSampleRate(rate): void
Parameter | Type | Optional | Description |
---|---|---|---|
rate | number | β | - |
public setTargetSampleRate(rate): void
Parameter | Type | Optional | Description |
---|---|---|---|
rate | number | β | - |
public setTremolo(__namedParameters): void
Parameter | Type | Optional | Description |
---|---|---|---|
__namedParameters | Partial<AFTremoloConfig> | β | - |
public setVibrato(__namedParameters): void
Parameter | Type | Optional | Description |
---|---|---|---|
__namedParameters | Partial<AFTremoloConfig> | β | - |
public toggle(): void
public uncork(): void
- Source:
node_modules/@types/node/stream.d.ts#L913
public unpipe(destination?): AudioFilter
The
Parameter | Type | Optional | Description |
---|---|---|---|
destination | WritableStream | β | Optional specific stream to unpipe |
- Source:
node_modules/@types/node/stream.d.ts#L328
public unshift(chunk, encoding?): void
Passing
Parameter | Type | Optional | Description |
---|---|---|---|
chunk | any | β | Chunk of data to unshift onto the read queue. For streams not operating in object mode, |
encoding | BufferEncoding | β | Encoding of string chunks. Must be a valid |
- Source:
node_modules/@types/node/stream.d.ts#L394
public wrap(stream): AudioFilter
Prior to Node.js 0.10, streams did not implement the entire
Parameter | Type | Optional | Description |
---|---|---|---|
stream | ReadableStream | β | An "old style" readable stream |
- Source:
node_modules/@types/node/stream.d.ts#L420
public write(chunk, encoding?, cb?): boolean
Parameter | Type | Optional | Description |
---|---|---|---|
chunk | any | β | - |
encoding | BufferEncoding | β | - |
cb | (error: undefined | null | Error) => void | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L906
public static from(src): Duplex
A utility method for creating duplex streams.
Parameter | Type | Optional | Description |
---|---|---|---|
src | string | Object | Stream | Blob | ArrayBuffer | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L895
public static fromWeb(readableStream, options?): Readable
A utility method for creating a
Parameter | Type | Optional | Description |
---|---|---|---|
readableStream | ReadableStream<any> | β | - |
options | Pick<ReadableOptions, 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'> | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L61
public static getEventListeners(emitter, name): Array<Function>
Returns a copy of the array of listeners for the event named
Parameter | Type | Optional | Description |
---|---|---|---|
emitter | DOMEventTarget | EventEmitter | β | - |
name | string | symbol | β | - |
- Source:
node_modules/@types/node/events.d.ts#L262
public static isDisturbed(stream): boolean
Returns whether the stream has been read from or cancelled.
Parameter | Type | Optional | Description |
---|---|---|---|
stream | Readable | ReadableStream | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L66
public static listenerCount(emitter, eventName): number
A class method that returns the number of listeners for the given
- β οΈ Deprecated
Parameter | Type | Optional | Description |
---|---|---|---|
emitter | EventEmitter | β | The emitter to query |
eventName | string | symbol | β | The event name |
- Source:
node_modules/@types/node/events.d.ts#L234
public static on(emitter, eventName, options?): AsyncIterableIterator<any>
const { on, EventEmitter } = require('events');
(async () => {
const ee = new EventEmitter();
// Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});
for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();
Parameter | Type | Optional | Description |
---|---|---|---|
emitter | EventEmitter | β | - |
eventName | string | β | The name of the event being listened for |
options | StaticEventEmitterOptions | β | - |
- Source:
node_modules/@types/node/events.d.ts#L217
public static once(emitter, eventName, options?): Promise<Array<any>>
Creates a
Parameter | Type | Optional | Description |
---|---|---|---|
emitter | NodeEventTarget | β | - |
eventName | string | symbol | β | - |
options | StaticEventEmitterOptions | β | - |
- Source:
node_modules/@types/node/events.d.ts#L157
public static setMaxListeners(n?, eventTargets): void
const {
setMaxListeners,
EventEmitter
} = require('events');
const target = new EventTarget();
const emitter = new EventEmitter();
setMaxListeners(5, target, emitter);
Parameter | Type | Optional | Description |
---|---|---|---|
n | number | β | A non-negative number. The maximum number of listeners per |
eventTargets | Array<DOMEventTarget | EventEmitter> | β | - |
- Source:
node_modules/@types/node/events.d.ts#L280
public static toWeb(streamReadable): ReadableStream<any>
A utility method for creating a web
Parameter | Type | Optional | Description |
---|---|---|---|
streamReadable | Readable | β | - |
- Source:
node_modules/@types/node/stream.d.ts#L72