Vixen
02b45cc4
csharp
public sealed class AudioImporter

Turns a sound file into the clip a device plays.

No guide page documents this yet — the page shows what the code says about itself.

As a importer

Extensions
.wav .wave .ogg .mp3 .flac

Remarks

Decode, mix, convert, write. The decode is a IAudioDecoder and everything after it is policy, which is the same division TextureImporter runs on and for the same reason: a codec is a dependency and the decisions are the engine's.

It claims formats it cannot yet read, which is a deviation worth naming. TextureImporter claims only the extensions it decodes, so an .exr falls to RawImporter and ships as a blob. That is the wrong answer for audio: doc 08's table promises ogg, mp3 and flac, and an artist who drops an .ogg in and finds it silently became an unplayable byte blob has learned nothing. Claiming it and failing with the name of what is missing is the more useful of the two silences.

Fields and properties (1)

  • public override int Version

    Its own version. Bumping it invalidates every artefact it has ever produced, which is the whole mechanism for "I fixed the mip filter, re-import everything".

Methods (3)

  • public AudioImporter()

    Uses the decoders that ship.

  • public AudioImporter(IReadOnlyList<IAudioDecoder> decoders)

    Uses a given set of decoders.

  • protected override ValueTask<ImportResult> ImportAsync(ImportContext context, AudioImportSettings settings, CancellationToken cancellationToken)

    Imports one asset.

Used by (2)

  • AudioImporterTestsVixen.Editor.Assets.Tests
  • BuiltInImportersVixen.Editor.Assets