UNPKG

@ekx/auph

Version:

[![Build](https://github.com/eliasku/auph/actions/workflows/build.yml/badge.svg)](https://github.com/eliasku/auph/actions/workflows/build.yml) [![Version](https://img.shields.io/npm/v/auph)](https://www.npmjs.com/package/auph) [![Downloads](https://img.sh

32 lines (31 loc) 1.4 kB
import { AuphBuffer, AuphBus, AuphVoice, u31 } from "../protocol/interface"; import { Obj } from "./common"; export declare class VoiceObj implements Obj { readonly g: GainNode; readonly p: StereoPannerNode; h: number; s: number; G: number; P: number; R: number; bf: AuphBuffer; bs: AuphBus; _s: number; sn: AudioBufferSourceNode | null; dn: AudioNode | null; pr: ScriptProcessorNode | null; _e: () => void; constructor(g: GainNode, p: StereoPannerNode, index: u31); } export declare function _voiceNew(ctx: AudioContext, index: u31): VoiceObj; export declare function _voiceChangeDestination(v: VoiceObj, target: AudioNode): void; export declare function _voiceResetDestination(v: VoiceObj): void; export declare function _voiceStop(v: VoiceObj): void; export declare function _voiceStartBuffer(v: VoiceObj): void; export declare function _voicePrepareBuffer(v: VoiceObj, ctx: AudioContext, audioBuffer: AudioBuffer): void; export declare function _voiceSetLoop(v: VoiceObj, value: boolean): void; export declare function _voiceSetRunning(v: VoiceObj, value: boolean): void; export declare function _voiceApplyPitch(v: VoiceObj, value: u31): void; export declare let voicePool: (VoiceObj | null)[]; export declare function _getVoiceObj(handle: AuphVoice): VoiceObj | null; export declare function createVoiceObj(ctx: AudioContext): AuphVoice;