FiftyAudioEngine class

Fifty Audio Engine

A singleton controller that initializes and exposes access to all core audio systems:

Key Responsibilities:

  • Centralizes initialization of all audio managers
  • Exposes unified access to sound subsystems
  • Automatically wires BGM ducking during voice playback
  • Provides global mute/unmute/stop + global fades

Usage:

await FiftyAudioEngine.instance.initialize(['assets/bgm/theme.mp3']);
FiftyAudioEngine.instance.bgm.playNext();
FiftyAudioEngine.instance.sfx.playGroup('click');
FiftyAudioEngine.instance.voice.playVoice(myVoiceUrl);

Part of Fifty Flutter Kit.

Properties

bgm ↔ BgmChannel
Background Music Manager
latefinal
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sfx ↔ SfxChannel
Sound Effects Manager
latefinal
voice ↔ VoiceActingChannel
Voice Acting Manager
latefinal

Methods

fadeAllIn({FadePreset? preset}) → Future<void>
Fade All In
fadeAllOut({FadePreset? preset}) → Future<void>
Fade All Out
initialize([List<String>? bgmTracks]) → Future<void>
Initialize the Sound System
muteAll() → Future<void>
Mute All
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stopAll() → Future<void>
Stop All
toString() → String
A string representation of this object.
inherited
unmuteAll() → Future<void>
Unmute All
voiceOnDucking() → Future<void>
Voice Ducking Hook
voiceOnRestore() → Future<void>
Voice Restore Hook

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → FiftyAudioEngine
Singleton Instance
final