To write the code in an OOP style, I had a problem to inject a queue into the callback. I did this with a closure with success.
But the success ended when using sounddevice with multiprocessing.process. I could use the callback when the callback was a static method without the wrapper of the closure. This lacks of course a reference to a queue.
So my proposal is to add a parameter for the callback, providing a python reference for a queue or another object instance, which can be provided by instancing a Stream.
To write the code in an OOP style, I had a problem to inject a queue into the callback. I did this with a closure with success.
But the success ended when using sounddevice with multiprocessing.process. I could use the callback when the callback was a static method without the wrapper of the closure. This lacks of course a reference to a queue.
So my proposal is to add a parameter for the callback, providing a python reference for a queue or another object instance, which can be provided by instancing a Stream.