florent37 / Flutter-AssetsAudioPlayer

Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
https://pub.dartlang.org/packages/assets_audio_player
Apache License 2.0
740 stars 337 forks source link

play audio The sound sounds strange #795

Open butoften opened 10 months ago

butoften commented 10 months ago

Flutter 3.10.5 Platform : iOS or macos

when use this code ,it's ok,the sound is ok.

AssetsAudioPlayer audioPlayer = AssetsAudioPlayer();
await audioPlayer.open(
  Audio("assets/s.mp3"),
  autoStart: false,
);
audioPlayer.play();

When i use this ,let it auto play ,the sound becomes muffled

AssetsAudioPlayer audioPlayer = AssetsAudioPlayer();
audioPlayer.open(
      Audio("assets/s.mp3"),
);

s.mp3 is the sound of a drum,relatively short you can download the s.mp3 file to assets folder and test. https://github.com/butoften/assets/blob/main/s.mp3

thanks

nohli commented 10 months ago

Does it make a difference if you await open() in the second version?