import { ByteVector } from "../byteVector"; import { ILosslessAudioCodec, MediaTypes } from "../properties"; /** * Provides information about a FLAC audio stream. */ export default class FlacStreamHeader implements ILosslessAudioCodec { private readonly _audioChannels; private readonly _audioSampleRate; private readonly _bitsPerSample; private readonly _streamLength; private readonly _totalSamples; /** * Constructs and initializes a new instance by reading a raw stream header structure and using * the stream length. * @param data Object containing the raw stream header * @param streamLength Length of the stream, must be a safe, positive integer. */ constructor(data: ByteVector, streamLength: number); /** * @inheritDoc * @remarks * This value is calculated based on duration which may be zero if total number * of samples is unknown. Therefore, the bitrate may be 0 indicating it is unknown. */ get audioBitrate(): number; /** @inheritDoc */ get audioChannels(): number; /** @inheritDoc */ get audioSampleRate(): number; /** @inheritDoc */ get bitsPerSample(): number; /** @inheritDoc */ get description(): string; /** * @inheritDoc * @remarks * This value is calculated based on total samples, which may be 0 if the number of * samples is unknown. Therefore, the duration may be unknown. */ get durationMilliseconds(): number; /** @inheritDoc */ get mediaTypes(): MediaTypes; }