chipweinberger / dart_melty_soundfont

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

Rending audio off of the main thread #21

Closed wsievern closed 9 months ago

wsievern commented 1 year 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 1 year 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 1 year ago

Looking into this! Thx