mwg API
    Preparing search index...

    Class FakeBlockSource

    A deterministic BlockSource: a ramp whose value names its frame, or a flat level, of a known length or none at all. It counts every read and seek so a test can see how the consumer pulled.

    Implements

    Index
    length?: number

    total frames, or undefined for a source with no end (a chip tune that never finishes)

    position: number = 0
    reads: number = 0
    sampleRate: number
    seeks: number[] = []
    • writes up to count frames at start of both buffers and returns how many it wrote; fewer than asked means the source ended

      Parameters

      • left: Float32Array
      • right: Float32Array
      • start: number
      • count: number

      Returns number