taglib-ts
    Preparing search index...

    Audio properties for Monkey's Audio (APE) streams.

    Supports both current (v3980+) and legacy header formats. Current versions use a 44-byte descriptor followed by a 24-byte header; older versions use a 26-byte header with embedded WAV format info.

    Hierarchy (View Summary)

    Index

    Properties

    _readStyle: ReadStyle

    The read style used when parsing the audio stream.

    Accessors

    • get bitrate(): number

      Average bitrate of the stream in kb/s.

      Returns number

    • get bitsPerSample(): number

      Bits per sample (bit depth) of the audio stream.

      Returns number

    • get channels(): number

      Number of audio channels.

      Returns number

    • get lengthInMilliseconds(): number

      Duration of the audio stream in milliseconds.

      Returns number

    • get lengthInSeconds(): number

      Duration rounded to the nearest second.

      Returns number

    • get sampleFrames(): number

      Total number of PCM sample frames in the stream.

      Returns number

    • get sampleRate(): number

      Sample rate of the stream in Hz.

      Returns number

    • get version(): number

      APE format version number (e.g. 3990 for v3.99).

      Returns number

    Methods

    • Asynchronously create and populate an ApeProperties instance by reading from file.

      Parameters

      • file: File

        The file to read from (positioned at or near the APE header).

      • streamLength: number

        Byte length of the audio stream, used to compute bitrate.

      • readStyle: ReadStyle

        Level of detail to use when reading properties.

      Returns Promise<ApeProperties>

      A resolved promise containing the populated properties object.