-
Notifications
You must be signed in to change notification settings - Fork 447
Description
I was working on updating rodio and cpal on the bevy crate and I've encountered a couple of build issues for different targets.
I've tested patching cpal by using the following SHA: a8269d3 and the build issues we had went away for MacOS targets. But now, this change seems to have made Stream non-Sync and this breaks a Resource (which need to be both Send and Sync as far as I'm aware) wrapping the audio stream.
The field that seems to be the causing this issue is the event field which has the type struct HANDLE(pub *mut core::ffi::c_void), i.e. Foundation::HANDLE from the windows crate, which doesn't seem to be neither Send nor Sync. I couldn't find how these trait guarantees were upheld before, as a very similar type was being used for this field (https://docs.rs/winapi/latest/winapi/um/winnt/type.HANDLE.html).
I hope this issue has enough detail, and if not please let me know. I might be overlooking something here so any feedback and insights will be welcomed. Thanks a lot for your time!