diff --git a/lib/logic/state.dart b/lib/logic/state.dart index 4a9237c..7e2ff62 100644 --- a/lib/logic/state.dart +++ b/lib/logic/state.dart @@ -291,6 +291,8 @@ class PlayerState extends ChangeNotifier { /// Should be called only once void _sequenceObserver() async { await for (final _ in _player.currentIndexStream) { + // apply effects + _soundEffect(); // update ui notifyListeners(); } diff --git a/lib/main.dart b/lib/main.dart index 889ce0d..9d48340 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -23,6 +23,7 @@ void main() async { JustAudioMediaKit.title = 'pffs'; } var player = audio.AudioPlayer(); + player.setSkipSilenceEnabled(true); final session = await AudioSession.instance; await session.configure(const AudioSessionConfiguration.music()); // init state diff --git a/pubspec.yaml b/pubspec.yaml index 2d23854..5827adb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.0.5+1 +version: 0.0.6+1 environment: sdk: '>=3.3.4 <4.0.0'