# Path: hearinglosssimulator/gui/myqt.py
# QT = ModuleProxy(['', 'Q', 'Qt'], [QtCore.Qt, QtCore, QtGui, QtWidgets])


from .myqt import QT
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib import pyplot
import pyqtgraph as pg
import numpy as np
import sounddevice as sd
import time
import hearinglosssimulator as hls
                    #~ input=True, output=True, input_device_index=input_device_index, output_device_index=output_device_index,
                    #~ frames_per_buffer=chunksize, stream_callback=callback, start=False)
    
    
    #~ audiostream.start_stream()
    
    #~ t_start = time.perf_counter()
    #~ while (time.perf_counter()-t_start)<duration:
        #~ time.sleep(0.01)

    #~ audiostream.stop_stream()
    #~ audiostream.close()

    #~ pa.terminate()
    
    
    
def test_play_input_to_output():
    print(sd.query_devices())
    play_input_to_output(4, 'default')
    #~ play_input_to_output(4, 10)




def get_dict_from_group_param(param, cascade = False):
    assert param.type() == 'group'
    d = {}
    for p in param.children():
        if p.type() == 'group':

# Path: hearinglosssimulator/gui/myqt.py
# QT = ModuleProxy(['', 'Q', 'Qt'], [QtCore.Qt, QtCore, QtGui, QtWidgets])


# Path: hearinglosssimulator/gui/guitools.py
from .myqt import QT
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib import pyplot
import pyqtgraph as pg
import numpy as np
import sounddevice as sd
import time
import hearinglosssimulator as hls

                    #~ input=True, output=True, input_device_index=input_device_index, output_device_index=output_device_index,
                    #~ frames_per_buffer=chunksize, stream_callback=callback, start=False)
    
    
    #~ audiostream.start_stream()
    
    #~ t_start = time.perf_counter()
    #~ while (time.perf_counter()-t_start)<duration:
        #~ time.sleep(0.01)

    #~ audiostream.stop_stream()
    #~ audiostream.close()

    #~ pa.terminate()
    
    
    
def test_play_input_to_output():
    print(sd.query_devices())
    play_input_to_output(4, 'default')
    #~ play_input_to_output(4, 10)




def get_dict_from_group_param(param, cascade = False):
    assert param.type() == 'group'
    d = {}
    for p in param.children():
        if p.type() == 'group':

            if cascade: