alexmercerind / flutter_audio_desktop

[WIP] An 🎵 audio playback library for Flutter Desktop. Supports Windows & Linux. Based on miniaudio.
MIT License
53 stars 18 forks source link

Audio auto loop play #31

Closed yiky84119 closed 3 years ago

yiky84119 commented 3 years ago

when audio file duration is less than 1 sec ,AudioPlayer play file in loop.

static void play(var file) async {
  await _audioPlayer.load(AudioSource.fromFile(file));
  await _audioPlayer.play();
}

music_file.zip

alexmercerind commented 3 years ago

Hi there @yiky84119 !

I'm currently working on a better implementation of this plugin which will bring a lot lot better control, usablity & a really better codec/format support. In-fact, I'm using the really powerful libVLC now, to bring the best audio plugin, that will be ever possible for Windows.

I'm sure that you'll love it & it will be a lot more better in terms of performance & controllability.

Thankyou. I'll inform you soon.

I'm also adding things like proper event listeners, network streaming, better asset support, reading metadata without any external plugin & playlists aswell. (It's in a private repo currently).

Learn more here.

alexmercerind commented 3 years ago

Since, this plugin is one of the very first plugins ever made for Windows, so I was still figuring out the things.

Now, I'm close to get the things done, in a better way possible.

On the issue you told, I'm aware why it is happening but I don't wanna spend time improving this badly written code. I've come a long way from there.

maks commented 3 years ago

@alexmercerind I've come across this as well on Linux. If you've already identified why this was happening, could you point me to where the problem is to save me the time of my (re) finding it on my own?

alexmercerind commented 3 years ago

@maks. As I said on the other thread, whole approach is the problem. I've got rid of it on Windows, but on Linux, I'm yet to write everything.

alexmercerind commented 3 years ago

@maks.

I'll improve this miniaudio implementation in future. Right now, I'm diverted towards the libVLC version (And FFI).

alexmercerind commented 3 years ago

Anyways, I just noticed this is same as #30.