mozilla / cubeb-coreaudio-rs

The audio backend of Firefox on Mac OS X.
ISC License
25 stars 10 forks source link

Remove also_mutexed_stm pattern when making serial queue calls. #183

Closed kinetiknz closed 1 year ago

kinetiknz commented 2 years ago

The lifetime of the stream is guaranteed to outlive any items running on the serial queue. This is ensured by stream destroy flushing the serial queue before freeing stream resources.

The Arc<Mutex<&mut AudioUnitStream>> seems to be unnecessary.

This PR is just the second commit, but is based on https://github.com/mozilla/cubeb-coreaudio-rs/pull/182