assassin-bug/framework/resonator/sources/streaming-source.d.ts

34 lines
1.1 KiB
TypeScript

import { BaseSource } from './base-source';
import AudioGraph from '../audio-graph';
import ResonatorScene from '../scenes/webaudio-scene';
import ResonatorAudioContext from '../audio-context';
import { SourceType } from './source-type';
export declare class StreamingSource implements BaseSource {
private graph;
private scene;
private context;
private element;
private type;
playing: boolean;
private playOnAvailable;
private node;
private canPlay;
private sceneNode;
private gain;
private position;
constructor(graph: AudioGraph, scene: ResonatorScene, context: ResonatorAudioContext, element: HTMLAudioElement, type?: SourceType);
private init;
play(when?: number, offset?: number, duration?: number): void;
stop(): void;
getVolume(): number;
setVolume(value: number): void;
getPlaybackRate(): number;
setPlaybackRate(value: number): void;
private createConnections;
setPosition(x: number, y: number, z: number): void;
destroy(): void;
loop(value: boolean): void;
fadeIn(time: number): void;
fadeOut(time: number): void;
}