assassin-bug/framework/resonator/vendor/resonance-es6/early-reflections.d.ts

57 lines
2.0 KiB
TypeScript

export default EarlyReflections;
/**
* @class EarlyReflections
* @description Ray-tracing-based early reflections model.
* @param {AudioContext} context
* Associated {@link
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext}.
* @param {Object} options
* @param {Utils~RoomDimensions} options.dimensions
* Room dimensions (in meters). Defaults to
* {@linkcode Utils.DEFAULT_ROOM_DIMENSIONS DEFAULT_ROOM_DIMENSIONS}.
* @param {Object} options.coefficients
* Frequency-independent reflection coeffs per wall. Defaults to
* {@linkcode Utils.DEFAULT_REFLECTION_COEFFICIENTS
* DEFAULT_REFLECTION_COEFFICIENTS}.
* @param {Number} options.speedOfSound
* (in meters / second). Defaults to {@linkcode Utils.DEFAULT_SPEED_OF_SOUND
* DEFAULT_SPEED_OF_SOUND}.
* @param {Float32Array} options.listenerPosition
* (in meters). Defaults to
* {@linkcode Utils.DEFAULT_POSITION DEFAULT_POSITION}.
*/
declare class EarlyReflections {
constructor(context: any, options: any);
speedOfSound: any;
input: any;
output: any;
_lowpass: any;
_delays: {};
_gains: {};
_inverters: {};
_merger: any;
_listenerPosition: any;
/**
* Set the listener's position (in meters),
* where [0,0,0] is the center of the room.
* @param {Number} x
* @param {Number} y
* @param {Number} z
*/
setListenerPosition(x: number, y: number, z: number): void;
/**
* Set the room's properties which determines the characteristics of
* reflections.
* @param {Utils~RoomDimensions} dimensions
* Room dimensions (in meters). Defaults to
* {@linkcode Utils.DEFAULT_ROOM_DIMENSIONS DEFAULT_ROOM_DIMENSIONS}.
* @param {Object} coefficients
* Frequency-independent reflection coeffs per wall. Defaults to
* {@linkcode Utils.DEFAULT_REFLECTION_COEFFICIENTS
* DEFAULT_REFLECTION_COEFFICIENTS}.
*/
setRoomProperties(dimensions: any, coefficients: any): void;
_coefficients: any;
_halfDimensions: {};
}