ExPixel / miniaudio-rs

Rust bindings for miniaudio C library.
https://crates.io/crates/miniaudio
MIT License
50 stars 20 forks source link

Device callbacks do not need to by Sync #20

Closed sdonnan closed 4 years ago

sdonnan commented 4 years ago

Currently the device callbacks require the Sync trait, but since the callback is cloned for each thread I believe this is unnecessary. Send and Clone seem sufficient.

The Sync trait makes it difficult to implement a pattern where, for example, one might use an mpsc::Sender to emit events from the callback.

ExPixel commented 4 years ago

Merged your PR, thanks.