ryanheise / audio_session

MIT License
107 stars 68 forks source link

Run darwin setActive in a separate thread to avoid jank #123

Closed jointhejourney closed 3 months ago

jointhejourney commented 4 months ago

Hey there,

Currently, the AVAudioSession setActive method gets called on the main thread and it causes dropped frames / jank.

This is a simple update to avoid this this type of jank.

Here's a similar issue on StackOverflow: https://stackoverflow.com/questions/18419249/ios-audiosessionsetactive-blocking-main-thread

Thanks for the great package!

jointhejourney commented 4 months ago

@ryanheise plz let me know if I need to update anything else to merge this in. Thanks!

jointhejourney commented 3 months ago

Hey @ryanheise any chance we could merge this in?

ryanheise commented 3 months ago

Hi @jointhejourney , first of all thank you for the PR. I am just working on pushing out the next releases of just_audio and audio_service first and then I will be able to review your PR.

ryanheise commented 3 months ago

I've just pushed out those releases. This PR is next on my list.

ryanheise commented 3 months ago

This is now published in 0.1.19. Thanks for your contribution!

jointhejourney commented 2 months ago

This is now published in 0.1.19. Thanks for your contribution!

That's awesome! And thank you for the awesome package!