mozilla / audioipc

Cubeb Audio Remoting For Gecko
10 stars 17 forks source link

Use separate rpc Proxy clones for each of ServerStreamCallbacks's callbacks. #144

Closed kinetiknz closed 2 years ago

kinetiknz commented 2 years ago

The threads that cubeb executes the data, state, and device_change callbacks on is undefined. Using a single rpc Proxy for all three of the ServerStreamCallbacks callbacks can result in the Proxy being used from multiple threads concurrently (e.g. data_callback on the OS audio thread and state_callback on the Server RPC thread) depending on the cubeb backend in use.

Also remove the mpsc::channel clone from make_client, since it was obscuring the root cause of this issue.