Vixen
dd8b0a81
csharp
public sealed class MixerImporter

Compiles a project's audio mixer into the chunk a game loads by address.

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

As a importer

Extensions
.vxmixer

Remarks

⚠ The two halves existed and did not meet. AudioEngine.LoadMixer(MixerAsset) has been there and tested since the mixing layer was written, and AudioMixerDocument authors and saves the YAML — but no [Importer] claimed .vxmixer, so the file fell to RawImporter and shipped as a chunk called Blob. A game could not load a mix a sound designer had made, and nothing said so ([#473](https://github.com/Rikarin/Vixen/issues/473)).

Compiled rather than carried, which is CompositorImporter's argument restated. A host reads this with AssetManager.LoadAsync<MixerAsset>, which goes through the binary serializer, so shipping the authored YAML would be shipping a document no runtime links a parser for. NativeFormatImporter carries text only for the two formats whose runtime reader takes text; this is not one of them.

⚠ The document is bound but not built, and that is deliberate. MixerBuilder.Build needs a live AudioMixer and returns the problems a game would hit at load; running it here would need an audio device in a content build and would move a decision the runtime has to make anyway — a send naming a bus that is not there is reported by LoadMixer, and reported again identically by the editor's own AudioMixerDocument.Validate, which is the panel that can do something about it. What the import owes is that the bytes are a MixerAsset, and a document that does not bind is where that stops being true.

Fields and properties (2)

  • public const string MixerType

    The type a compiled mixer's chunk is recorded as.

  • 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 (1)

Used by (2)

  • BuiltInImportersVixen.Editor.Assets
  • MixerImporterTestsVixen.Editor.Assets.Tests