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 playback from Uint8List \ List<int> stream #32

Open alexey55501 opened 3 years ago

alexey55501 commented 3 years ago

Is it possible to implement \ add suport of playing file from raw audio stream?

alexmercerind commented 3 years ago

Hi there @alexey55501 !

miniaudio supports it. But as of now, there is possibly no way to transfer bytes through method channel (if there is, then I'm not aware. Since there isn't much documentation available for making plugins for Windows).

Anyways, why don't you save your bytes to a file first & then pass its path. You can use getTtemporaryDirectory to save it there & pass it as File for playback.

I'm working on a really better implementation of this plugin currently. This library isn't the best to use currently.

I'm using libVLC now (its in a private repo) & it is a lot better plugin than this in terms of both usability & format support.

Thanks. I'll recommend you to wait for the while, and use the newer plugin that I bring for Windows. Since, VLC is really powerful compared to this single header miniaudio. Current implementation has many problems in general.

alexmercerind commented 3 years ago

I'll also add things like network playback etc. in that version & fix some core issues like format support is really bad currently. And as a pros, it will provide metadata reading support out of the box.

I'll inform you once I get up there. :-) (I'm pretty close too.)