audioFor method

  1. @override
AudioSource audioFor(
  1. GenerativeSource source
)

The resolved file-backed AudioSource for a produced audio source (music, speech, or sound effect) — synchronous by contract.

Only valid after generateAll for an audio source; implementations throw on an unresolved or non-audio source.

Implementation

@override
AudioSource audioFor(GenerativeSource source) => _audio[source] ?? (throw _unresolved(source));