talonvoice / beta

Issue tracker for the private Talon Beta
10 stars 0 forks source link

noise.unregister does not release audio device on linux #53

Closed faithanalog closed 4 years ago

faithanalog commented 4 years ago

This causes a large number of pulseaudio streams after awhile of turning eye zoom on and off

minimal test case:

def test():
    return

for i in range(10):
    noise.register('pop', test)
    noise.unregister('pop', test)

This will result in 10 additional recording streams in pulseaudio.

When the file that caused the noises to be registered is reloaded, the streams are finally closed. So for example, if mouse.py is reloaded, all the streams generated from toggling eye zoom are cleared (despite the fact that the actual register/unregister call is in eye_zoom_mouse.py!)

Screenshot_20200501_003336

faithanalog commented 4 years ago

same root cause as #42