alexmercerind / flutter_audio_desktop

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

Method setPosition() unstable #4

Closed stonega closed 3 years ago

stonega commented 3 years ago

Hi, @alexmercerind Thanks for the plugin, it is simple, but decent and worked well. I find that when the duration in setPosition() is longer more than like 20 mins or tap fast forward many times in short time, the plugin will crash. Also change position take too long time and have some noisy sound.

image

alexmercerind commented 3 years ago

Hello @stonega! I'm literally 0% sure about the cause of the bug because I have used @mackron's miniaudio in this project, and made a very simple implementation over it.

I have to see what can I do. I can't tell if my code is problematic as I always just played files of maximum about 5 minutes.

MichealReed commented 3 years ago

@stonega this may be fixed with the latest version of miniaudio --(https://github.com/mackron/miniaudio/blob/master/miniaudio.h

Can you try dropping that into your pub cache folder for this library? Windows path -- User\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_audio_desktop-0.0.8\audioplayer

stonega commented 3 years ago

@MichealReed I tested with the latest version, looks like the issue is still there. Thanks for your reply!

alexmercerind commented 3 years ago

Hi there @stonega !

The issue is fixed in the vnext branch.

Now, no longer whole file will be loaded into memoery, but in segments (as a stream).

I'll inform you real soon, once I get it working on Windows (will be very easy to do, as Linux implementation is already done).

Thankyou.

stonega commented 3 years ago

Glad to hear that, can not wait to have a test. I have switched to use Linux these days😉

On Sat, Feb 27, 2021, 20:54 Hitesh Kumar Saini notifications@github.com wrote:

Hi there @stonega https://github.com/stonega !

The issue is fixed in the vnext https://github.com/alexmercerind/flutter_audio_desktop/tree/vnext branch.

Now, no longer whole file will be loaded into memoery, but in segments (as a stream).

I'll inform you real soon, once I get it working on Windows (will be very easy to do, as Linux implementation is already done).

Thankyou.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexmercerind/flutter_audio_desktop/issues/4#issuecomment-787068553, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARIH57QD7GH6LSPUWO4C3DTBDTQBANCNFSM4S4GD57A .

alexmercerind commented 3 years ago

Hi there @stonega !

May you try out the plugin now on Windows or Linux?

Try running example. There are few API changes.

I'm yet to implement playlists or queues, should be pure Dart side code.

Although, I feel there is still some delay in seeking the file. I'm not sure how better it can be now.

Please clone the repo & build the example. Let me know how it goes. Closing for now.