[Tutor] Pytest - Sounddevice callback function

dn PythonList at DancesWithMice.info
Thu Oct 6 21:07:21 EDT 2022


Hello,

On 07/10/2022 10.37, Brian Wheatley wrote:
> Hello,
> 
> Is there any way to pytest a callback function, using the sounddevice
> library?
> I basically just want to test if the Inputstream is working.
> Or even assert that no exception is found.

Am probably misunderstanding the question: why not have the 
callback-function return either/both the data-received (or len() 
thereof) and 'status'?

NB don't know if incoming 'silence' is actually zero/null or if there 
will be values for 'static'/white-noise!

If revealed to be necessary, please explain further...
-- 
Regards,
=dn


More information about the Tutor mailing list