Package net.paulhertz.pixelaudio.schedule

# Interface AudioScheduler.SpanHandler<H>

Enclosing class:
  AudioScheduler<H>

public static interface AudioScheduler.SpanHandler<H>

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onBlock(H happening, long blockStartSample, int blockSize)`
  Called for each audio block the span overlaps.
  `void`
  `onEnd(H happening, int offsetInBlock)`
  Called once when a span ends within the current block (possibly mid-block).
  `void`
  `onStart(H happening, int offsetInBlock)`
  Called once when a span begins within the current block (possibly mid-block).

- ## Method Details

  - ### onStart

    void onStart(H happening, int offsetInBlock)
    Called once when a span begins within the current block (possibly mid-block).
    Parameters:
      `happening` - the event's Happening
      `offsetInBlock` - sample offset in [0, blockSize)

  - ### onBlock

    void onBlock(H happening, long blockStartSample, int blockSize)
    Called for each audio block the span overlaps. Useful for driving continuous/streamed behaviors while the span is active.
    Parameters:
      `happening` - the event's Happening
      `blockStartSample` - absolute start sample of this block
      `blockSize` - number of samples in this block

  - ### onEnd

    void onEnd(H happening, int offsetInBlock)
    Called once when a span ends within the current block (possibly mid-block).
    Parameters:
      `happening` - the event's Happening
      `offsetInBlock` - sample offset in [0, blockSize]; may equal blockSize if end == block end