This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class GroupFinalizationRegistry<T> extends FinalizationRegistry<T> { | |
#members: WeakRef<object>[] = []; | |
constructor(cleanupCallback: (heldValue: T) => void) { | |
super((heldValue) => { | |
if (this.#members.length === 0) return; | |
this.#members = this.#members.filter((member) => ( | |
member.deref() !== undefined | |
)); | |
if (this.#members.length === 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Plot the live microphone signal(s) with matplotlib. | |
Matplotlib and NumPy have to be installed. | |
Edited from: | |
https://github.com/spatialaudio/python-sounddevice/blob/0.4.1/examples/plot_input.py | |
""" | |
import argparse |