From da10ab2e291d4ba4d3082b9a6ae535639fb8f1b7 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Sat, 16 Sep 2023 23:41:47 +0600 Subject: [PATCH] feat: add audio normalization #164 --- lib/services/audio_player/audio_player.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/services/audio_player/audio_player.dart b/lib/services/audio_player/audio_player.dart index 78dc149b4..8566977d1 100644 --- a/lib/services/audio_player/audio_player.dart +++ b/lib/services/audio_player/audio_player.dart @@ -24,6 +24,10 @@ abstract class AudioPlayerInterface { ) // _justAudio = !_mkSupportedPlatform ? ja.AudioPlayer() : null { + //? Normalizing the audio + (_mkPlayer.platform as mk.NativePlayer) + .setProperty('af', 'dynaudnorm=g=5:f=250:r=0.9:p=0.5'); + _mkPlayer.stream.error.listen((event) { Catcher.reportCheckedError(event, StackTrace.current); });