chipweinberger / dart_melty_soundfont

A port of Melty Synth by Nobuaki Tanaka (C#) to Dart
Other
33 stars 8 forks source link

Rending audio off of the main thread #21

Closed wsievern closed 5 months ago

wsievern commented 8 months ago

Has anyone figured out a way to do this?

For me, when intensive UI operations occur while audio is rendering there are clicks during playback

chipweinberger commented 8 months ago

sure you can render with a dart isolate.

but submitting the audio with flutter_pcm_sound will still happen using a platform channel which is main thread i think so you'll want to keep your UI responsive


edit: actually maybe responsive UI is not necessary see: https://github.com/flutter/flutter/issues/13937 see: https://medium.com/flutter/introducing-background-isolate-channels-7a299609cad8

wsievern commented 8 months ago

Looking into this! Thx