flutter_sequencer icon indicating copy to clipboard operation
flutter_sequencer copied to clipboard

[iOS] Using the just_audio package to play a specific mp3 is breaking the flutter_sequencer but it doensn't throw any errors.

Open dmendoza05 opened this issue 2 years ago • 0 comments

Whenever I play an mp3 file the whole flutter_sequencer just stops. Currently using the just_audio package to play audio files.

Reproduced this issue on the example project of the flutter_sequencer by adding a simple button widget to play the mp3 file and adding the just_audio package to the pubspec.yaml file.

I crossed referenced the offending mp3 file with other working mp3 files and found out that if an mp3 has these properties the flutter_sequencer package breaks:

  • Audio Channel: Stereo
  • Sample Rate: 48 kHz

Mp3 files: Archive.zip

main.dart

        ...
            ElevatedButton(
              onPressed: () async {
                final player = AudioPlayer();
                var duration = await player.setAsset('assets/mp3/sfx-pop_mono_44k.mp3');
                player.play();
              },
              child: Text('Mono - 44k'),
            ),
            ElevatedButton(
              onPressed: () async {
                final player = AudioPlayer();
                var duration = await player.setAsset('assets/mp3/sfx-pop_mono_48k.mp3');
                player.play();
              },
              child: Text('Mono - 48k'),
            ),
            ElevatedButton(
              onPressed: () async {
                final player = AudioPlayer();
                var duration = await player.setAsset('assets/mp3/sfx-pop_stereo_44k.mp3');
                player.play();
              },
              child: Text('Stereo - 44k'),
            ),
            ElevatedButton(
              onPressed: () async {
                final player = AudioPlayer();
                var duration = await player.setAsset('assets/mp3/sfx-pop_stereo_48k.mp3');
                player.play();
              },
              child: Text('Stereo - 48k'),
            ),
       ...

No erros or logs are produced.


ADDITIONAL INFO:

  • Playing a video that has sample rate of 48k break the flutter_sequencer.
  • The SFZ that is currently being used for the flutter_sequencer is in 44.1k

dmendoza05 avatar Jul 19 '22 18:07 dmendoza05