UNPKG

@echogarden/wave-codec

Version:

A fully-featured WAVE format encoder and decoder. Written in pure TypeScript.

22 lines (21 loc) 718 B
export declare class WaveFormatHeader { sampleFormat: SampleFormat; channelCount: number; sampleRate: number; get byteRate(): number; get blockAlign(): number; bitDepth: BitDepth; speakerPositionMask: number; get guid(): string; get bytesPerSample(): number; constructor(channelCount: number, sampleRate: number, bitDepth: BitDepth, sampleFormat: SampleFormat, speakerPositionMask?: number); serialize(useExtensibleFormat: boolean): Uint8Array<ArrayBuffer>; static deserializeFrom(formatChunkBody: Uint8Array): WaveFormatHeader; } export declare enum SampleFormat { PCM = 1, Float = 3, Alaw = 6, Mulaw = 7 } export type BitDepth = 8 | 16 | 24 | 32 | 64;