Skip to content
Project referenceDevelopmentEngine ccf7d03f
Authored
  • Session-owned Editor preview audio and isolated Edit/Play generations.

Session-owned Editor preview audio and isolated Edit/Play generations.

Read the linked task or ownership explanation before using the exact API below.

Preview Editor audio explains PlayPreview/StopPreview, the independent Play generation, Edit master-bus suspension and subsystem-owned scope/update/release. This service supplies no mixer window or waveform editor.

EditorAudioHost requires a backend-neutral device factory; it does not select MiniAudio itself. Device creation failure publishes AUDIO_DEVICE_INIT_FAILED and establishes an explicit muted generation. The public factory supports real composition and headless execution without relaxing acoustic acceptance.

Keep voices, handles and completion events in their owning session. EnterExecutionScope covers preview presentation outside the normal session tick, not another lifecycle loop. Type-catalog refresh occurs atomically at a frame-safe update and preserves last-good on candidate failure. Dispose the audio generation before the corresponding scene/session finishes retirement.

Supply existing live dependencies on the declared API surface. Compiling the example does not initialize a product or certify a physical device.

using Inno.Audio;
using Inno.Editor.Audio;
using Inno.Runtime;
static AudioVoiceHandle Preview(
IEditorAudioHost audio,
RuntimeSession activeEditSession,
AudioClipAsset clip
) {
return audio.PlayPreview(activeEditSession, clip);
}

The source project defines the selected host declarations. Script projection and platform execution require their separate evidence.

Types and exact member contracts preserve captured declarations and source XML.

Project: Inno.Editor.Audio
Source: src/composition/editor/features/Inno.Editor.Audio/Inno.Editor.Audio.csproj

Type API Description
EditorAudioHost engine Owns Editor audio devices, previews, diagnostics, and isolated Play Mode audio generations.
IEditorAudioHost engine Coordinates isolated audio runtime generations for Edit and Play Mode sessions.