voiceOnDucking method

Future<void> voiceOnDucking()

Voice Ducking Hook

Called by VoiceActingChannel when a voice line starts. Caches the current BGM volume and then reduces it to a softer level (default 0.3) to keep narration intelligible without hard-stopping music.

Note: Adjust the target value to taste or expose it via config.

Implementation

Future<void> voiceOnDucking() async {
  _bgmCachedVolume = bgm.volume;
  await bgm.setVolume(0.3);
}