Skip to content
Type

FlacOutputFormatOptions

FLAC-specific output options.

ts
type FlacOutputFormatOptions = {
	appendOnly?: boolean;
	onFrame?: (data: Uint8Array, position: number) => unknown;
};

Used by

Properties

appendOnly

ts
appendOnly?: boolean;

Configures the output to only append new data at the end, useful for live-streaming the file as it's being created. When enabled, the STREAMINFO block will not be finalized with accurate min/max block sizes, frame sizes, or total sample count, so don't use this option when you want to write out a clean file for later use.

Events

onFrame

ts
onFrame?: ((data: Uint8Array<ArrayBufferLike>, position: number) => unknown);

Will be called for each FLAC frame that is written.

Released under the Mozilla Public License 2.0.