While working on a morse code play program, I'm finding sounddevice 0.3.7 will work intermittently, one time playing perfectly and then the next just making a bunch of clicking sounds.
I'm playing fairly short segments (a second up to several seconds) using this method:
sd.default.samplrate = 8000.0 # tried other sample rates as well
wav_wave = np.array(self.gain * w, dtype=np.int16)
sd.play(wav_wave, blocking=True)
Where w is an np.array with samples at the correct sample rate and are mostly dits and dahs of a tone. When working, it sounds great, when broken it sounds like a bunch of clicking.
I'm not sure why this is happening.