cacophony 0.30.3 → 0.30.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/basePlayback.d.ts +98 -0
- package/dist/cacophony-PShY6dPK.cjs.map +1 -1
- package/dist/cacophony-o1zE5oDP.js.map +1 -1
- package/dist/container.d.ts +10 -105
- package/dist/processors/timestretch-core.d.ts +53 -0
- package/dist/routableSource.d.ts +2 -27
- package/dist/volumeMixin.d.ts +23 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AudioCache.html +4 -4
- package/docs/classes/BarberpoleEffect.html +6 -6
- package/docs/classes/BiquadEffect.html +3 -3
- package/docs/classes/Bus.html +21 -21
- package/docs/classes/Cacophony.html +85 -85
- package/docs/classes/DynamicsEffect.html +6 -6
- package/docs/classes/FdnReverbEffect.html +6 -6
- package/docs/classes/FoaDecoder.html +5 -5
- package/docs/classes/FoaDecoderEffect.html +3 -3
- package/docs/classes/FrequencyShifterEffect.html +6 -6
- package/docs/classes/Group.html +32 -32
- package/docs/classes/HarmonizerEffect.html +6 -6
- package/docs/classes/ImpulseResponseEffect.html +3 -3
- package/docs/classes/KWeightingFilter.html +4 -4
- package/docs/classes/LoudnessMeter.html +11 -11
- package/docs/classes/MediaStreamPlayback.html +78 -113
- package/docs/classes/MediaStreamSound.html +73 -143
- package/docs/classes/MicrophoneStream.html +74 -144
- package/docs/classes/ModulatedDelayEffect.html +6 -6
- package/docs/classes/PcmStreamPlayback.html +79 -114
- package/docs/classes/PcmStreamSound.html +83 -153
- package/docs/classes/PhaserEffect.html +6 -6
- package/docs/classes/Playback.html +94 -122
- package/docs/classes/ReverbEffect.html +6 -6
- package/docs/classes/ShareEffect.html +3 -3
- package/docs/classes/Sound.html +92 -162
- package/docs/classes/SpectralFreezeEffect.html +6 -6
- package/docs/classes/StereoWidenerEffect.html +3 -3
- package/docs/classes/Synth.html +91 -161
- package/docs/classes/SynthGroup.html +28 -28
- package/docs/classes/TremoloEffect.html +6 -6
- package/docs/classes/TruePeakDetector.html +8 -8
- package/docs/classes/WaveshaperEffect.html +6 -6
- package/docs/functions/encodeMonoToFoaSN3D.html +1 -1
- package/docs/functions/integratedLoudness.html +1 -1
- package/docs/functions/integratedUngatedLoudness.html +1 -1
- package/docs/functions/loudnessRange.html +1 -1
- package/docs/functions/timeStretch.html +1 -1
- package/docs/functions/timeStretchChannels.html +1 -1
- package/docs/functions/truePeakDb.html +1 -1
- package/docs/hierarchy.html +7 -7
- package/docs/interfaces/AudioBuffer.html +8 -8
- package/docs/interfaces/AudioBufferSourceNode.html +21 -21
- package/docs/interfaces/AudioEventCallbacks.html +1 -1
- package/docs/interfaces/AudioListener.html +12 -12
- package/docs/interfaces/AudioNode.html +13 -13
- package/docs/interfaces/AudioParam.html +6 -6
- package/docs/interfaces/AudioWorklet.html +2 -2
- package/docs/interfaces/AudioWorkletNode.html +15 -15
- package/docs/interfaces/BarberpoleOptions.html +5 -5
- package/docs/interfaces/BaseContext.html +25 -25
- package/docs/interfaces/BaseSound.html +16 -16
- package/docs/interfaces/BiquadCoefficients.html +6 -6
- package/docs/interfaces/BiquadFilterNode.html +19 -19
- package/docs/interfaces/BuiltEffectGraph.html +6 -6
- package/docs/interfaces/CacheErrorEvent.html +5 -5
- package/docs/interfaces/CacheHitEvent.html +4 -4
- package/docs/interfaces/CacheMissEvent.html +4 -4
- package/docs/interfaces/CacophonyEffect.html +2 -2
- package/docs/interfaces/CacophonyLogger.html +4 -4
- package/docs/interfaces/ChannelMergerNode.html +13 -13
- package/docs/interfaces/ChannelSplitterNode.html +13 -13
- package/docs/interfaces/ConvolverNode.html +15 -15
- package/docs/interfaces/DynamicsOptions.html +7 -7
- package/docs/interfaces/FadeStartEvent.html +4 -4
- package/docs/interfaces/FdnReverbOptions.html +6 -6
- package/docs/interfaces/FoaDecoderOptions.html +2 -2
- package/docs/interfaces/FrequencyShifterOptions.html +3 -3
- package/docs/interfaces/GainNode.html +14 -14
- package/docs/interfaces/GlobalPlaybackEvent.html +3 -3
- package/docs/interfaces/HarmonizerOptions.html +6 -6
- package/docs/interfaces/ImpulseResponseOptions.html +5 -5
- package/docs/interfaces/LoadingCompleteEvent.html +5 -5
- package/docs/interfaces/LoadingErrorEvent.html +5 -5
- package/docs/interfaces/LoadingProgressEvent.html +6 -6
- package/docs/interfaces/LoadingStartEvent.html +3 -3
- package/docs/interfaces/LoudnessChannelInput.html +3 -3
- package/docs/interfaces/LoudnessReading.html +5 -5
- package/docs/interfaces/MediaElementSourceNode.html +14 -14
- package/docs/interfaces/MediaStreamAudioSourceNode.html +14 -14
- package/docs/interfaces/MediaStreamSoundOptions.html +4 -4
- package/docs/interfaces/MicrophoneStreamOptions.html +8 -8
- package/docs/interfaces/ModulatedDelayOptions.html +8 -8
- package/docs/interfaces/OfflineOptions.html +5 -5
- package/docs/interfaces/OscillatorNode.html +19 -19
- package/docs/interfaces/PannerNode.html +27 -27
- package/docs/interfaces/PcmStreamBufferEvent.html +2 -2
- package/docs/interfaces/PcmStreamSoundOptions.html +6 -6
- package/docs/interfaces/PhaserOptions.html +7 -7
- package/docs/interfaces/PlayOptions.html +5 -5
- package/docs/interfaces/PlaybackErrorEvent.html +5 -5
- package/docs/interfaces/ReverbOptions.html +13 -13
- package/docs/interfaces/RuntimeOptions.html +6 -6
- package/docs/interfaces/SoundCleanupHoldings.html +4 -4
- package/docs/interfaces/SoundErrorEvent.html +6 -6
- package/docs/interfaces/SpectralFreezeOptions.html +4 -4
- package/docs/interfaces/StereoPannerNode.html +14 -14
- package/docs/interfaces/StereoWidenerOptions.html +4 -4
- package/docs/interfaces/StreamCapabilities.html +5 -5
- package/docs/interfaces/TimeStretchOptions.html +5 -5
- package/docs/interfaces/TremoloOptions.html +5 -5
- package/docs/interfaces/WaveshaperOptions.html +5 -5
- package/docs/types/BaseAudioEvents.html +11 -11
- package/docs/types/BuiltEffect.html +1 -1
- package/docs/types/BusConnectionTarget.html +1 -1
- package/docs/types/CacheEventCallback.html +1 -1
- package/docs/types/CacophonyEvents.html +17 -17
- package/docs/types/ErrorEventCallback.html +1 -1
- package/docs/types/FadeType.html +1 -1
- package/docs/types/HrtfPannerOptions.html +1 -1
- package/docs/types/ImpulseResponseSource.html +1 -1
- package/docs/types/LoadingEventCallback.html +1 -1
- package/docs/types/LoopCount.html +1 -1
- package/docs/types/LoudnessChannel.html +1 -1
- package/docs/types/Orientation.html +3 -3
- package/docs/types/PanCloneOverrides.html +5 -5
- package/docs/types/PanType.html +1 -1
- package/docs/types/PcmStreamEvents.html +6 -6
- package/docs/types/PcmStreamState.html +1 -1
- package/docs/types/PlaybackEvents.html +1 -1
- package/docs/types/Position.html +1 -1
- package/docs/types/SoundEvents.html +1 -1
- package/docs/types/SoundType.html +1 -1
- package/docs/types/SourceNode.html +1 -1
- package/docs/types/SynthEvents.html +1 -1
- package/docs/types/ThreeDOptions.html +1 -1
- package/docs/types/WebCodecsStreamSound.html +1 -1
- package/docs/variables/CHANNEL_WEIGHTS.html +1 -1
- package/docs/variables/K_WEIGHTING_STAGE1_48K.html +1 -1
- package/docs/variables/K_WEIGHTING_STAGE2_48K.html +1 -1
- package/docs/variables/consoleLogger.html +1 -1
- package/docs/variables/noopLogger.html +1 -1
- package/package.json +3 -2
- package/dist/cli/exit.test.d.ts +0 -1
- package/dist/cli/index.test.d.ts +0 -1
- package/dist/cli/live.test.d.ts +0 -1
- package/dist/cli/loudness.test.d.ts +0 -1
- package/dist/cli/package.test.d.ts +0 -1
- package/dist/cli/params.test.d.ts +0 -1
- package/dist/cli/render-core.test.d.ts +0 -1
- package/dist/cli/render.test.d.ts +0 -1
- package/dist/cli/repl.test.d.ts +0 -1
- package/dist/cli/wav.test.d.ts +0 -1
- package/dist/meters/loudness-core.test.d.ts +0 -1
- package/dist/meters/loudness-meter.test.d.ts +0 -1
- package/dist/meters/truepeak-core.test.d.ts +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Bus } from './bus';
|
|
2
|
+
import { FadeType } from './cacophony';
|
|
3
|
+
import { PlaybackContainer } from './container';
|
|
4
|
+
import { AudioNode, BaseContext, BiquadFilterNode, GainNode } from './context';
|
|
5
|
+
import { EffectChain } from './effectChain';
|
|
6
|
+
import { CacophonyEffect } from './effects';
|
|
7
|
+
import { TypedEventEmitter } from './eventEmitter';
|
|
8
|
+
import { PlaybackEvents } from './events';
|
|
9
|
+
import { FilterManager } from './filters';
|
|
10
|
+
export type PlaybackState = "unplayed" | "playing" | "paused" | "stopped";
|
|
11
|
+
declare const BasePlayback_base: (abstract new (...args: any[]) => {
|
|
12
|
+
panner?: import('./context').PannerNode | import('./context').StereoPannerNode | undefined;
|
|
13
|
+
_panType: import('./cacophony').PanType;
|
|
14
|
+
readonly panType: import('./cacophony').PanType;
|
|
15
|
+
setPanType(panType: import('./cacophony').PanType, audioContext: BaseContext): void;
|
|
16
|
+
setPannerNode(pannerNode: import('./context').PannerNode): void;
|
|
17
|
+
get stereoPan(): number | null;
|
|
18
|
+
set stereoPan(value: number);
|
|
19
|
+
get threeDOptions(): import('./pannerMixin').ThreeDOptions;
|
|
20
|
+
set threeDOptions(options: import('./pannerMixin').ThreeDOptions | Partial<import('./pannerMixin').HrtfPannerOptions>);
|
|
21
|
+
position: import('./cacophony').Position;
|
|
22
|
+
cleanup(): void;
|
|
23
|
+
_filters: BiquadFilterNode[];
|
|
24
|
+
addFilter(filter: BiquadFilterNode): void;
|
|
25
|
+
removeFilter(filter: BiquadFilterNode): void;
|
|
26
|
+
readonly filters: BiquadFilterNode[];
|
|
27
|
+
addFilters(filters: BiquadFilterNode[]): void;
|
|
28
|
+
}) & typeof FilterManager & (abstract new (...args: any[]) => import('./volumeMixin').VolumeControls);
|
|
29
|
+
export declare abstract class BasePlayback extends BasePlayback_base {
|
|
30
|
+
source?: AudioNode;
|
|
31
|
+
protected _effectChain?: EffectChain;
|
|
32
|
+
private _effectContext?;
|
|
33
|
+
/**
|
|
34
|
+
* Per-playback send-gain allocations owned by the shared routing state
|
|
35
|
+
* machine. Cleanup disconnects every allocation deterministically.
|
|
36
|
+
*/
|
|
37
|
+
_sendGains: Map<Bus, GainNode>;
|
|
38
|
+
protected _state: PlaybackState;
|
|
39
|
+
origin: PlaybackContainer;
|
|
40
|
+
eventEmitter: TypedEventEmitter<PlaybackEvents>;
|
|
41
|
+
constructor(origin: PlaybackContainer);
|
|
42
|
+
protected setEffectChainEndpoints(input: AudioNode, output: AudioNode): void;
|
|
43
|
+
/** Build and splice an effect into this live playback's pre-panner chain. */
|
|
44
|
+
addEffect(effect: CacophonyEffect): Promise<AudioNode>;
|
|
45
|
+
/** @internal Source preplay path that preserves synchronous native-build failures. */
|
|
46
|
+
_addSourceEffect(effect: CacophonyEffect): Promise<AudioNode>;
|
|
47
|
+
/** @internal Materialize a source-level biquad recipe and retain filter API compatibility. */
|
|
48
|
+
_addFilterEffect(effect: CacophonyEffect): Promise<AudioNode>;
|
|
49
|
+
private materializeEffect;
|
|
50
|
+
rampEffectParam(handle: AudioNode, paramName: string, value: number, options?: {
|
|
51
|
+
duration?: number;
|
|
52
|
+
type?: FadeType;
|
|
53
|
+
}): void;
|
|
54
|
+
addFilter(filter: BiquadFilterNode): void;
|
|
55
|
+
removeFilter(filter: BiquadFilterNode): void;
|
|
56
|
+
setFilterOrder(filters: readonly BiquadFilterNode[]): void;
|
|
57
|
+
setFilterBypassed(filter: BiquadFilterNode, bypassed: boolean): void;
|
|
58
|
+
isFilterBypassed(filter: BiquadFilterNode): boolean;
|
|
59
|
+
rampFilterParam(filter: BiquadFilterNode, paramName: string, value: number, options?: {
|
|
60
|
+
duration?: number;
|
|
61
|
+
type?: FadeType;
|
|
62
|
+
}): void;
|
|
63
|
+
abstract play(): [this];
|
|
64
|
+
abstract pause(): void;
|
|
65
|
+
abstract stop(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Checks if the audio is currently playing.
|
|
68
|
+
*/
|
|
69
|
+
get isPlaying(): boolean;
|
|
70
|
+
get isPaused(): boolean;
|
|
71
|
+
protected markPlaying(): void;
|
|
72
|
+
protected markPaused(): void;
|
|
73
|
+
protected markStopped(): void;
|
|
74
|
+
protected emitPlayStarted(isResume: boolean): void;
|
|
75
|
+
protected emitPaused(): void;
|
|
76
|
+
protected emitStopped(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Register event listener.
|
|
79
|
+
* @returns Cleanup function
|
|
80
|
+
*/
|
|
81
|
+
on<K extends keyof PlaybackEvents>(event: K, listener: (data: PlaybackEvents[K]) => void): () => void;
|
|
82
|
+
/**
|
|
83
|
+
* Remove event listener.
|
|
84
|
+
*/
|
|
85
|
+
off<K extends keyof PlaybackEvents>(event: K, listener: (data: PlaybackEvents[K]) => void): void;
|
|
86
|
+
emit<K extends keyof PlaybackEvents>(event: K, data: PlaybackEvents[K]): void;
|
|
87
|
+
emitAsync<K extends keyof PlaybackEvents>(event: K, data: PlaybackEvents[K]): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Fades the volume to a target value, emitting fadeStart and fadeEnd events.
|
|
90
|
+
*/
|
|
91
|
+
fadeTo(value: number, duration: number, type?: FadeType): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Cancels any in-progress fade, emitting fadeCancel if a fade was active.
|
|
94
|
+
*/
|
|
95
|
+
cancelFade(): void;
|
|
96
|
+
cleanup(): void;
|
|
97
|
+
}
|
|
98
|
+
export {};
|