def _get_stream_parameters(kind, device, channels, dtype, latency, samplerate):
    if device is None:
        if kind == 'input':
            device = _pa.Pa_GetDefaultInputDevice()
        elif kind == 'output':
            device = _pa.Pa_GetDefaultOutputDevice()

    info = device_info(device)
    if channels is None:
        channels = info['max_' + kind + '_channels']
    dtype = np.dtype(dtype)
    try:
        sample_format = _np2pa[dtype]
    except KeyError:
        raise ValueError("Invalid " + kind + " sample format")
    if samplerate is None:
        samplerate = info['default_samplerate']
    parameters = ffi.new(
        "PaStreamParameters*",
        (device, channels, sample_format, latency, ffi.NULL))
    return parameters, dtype, samplerate
Called when the a switch tagged with *start* is deactivated.
dataset/ETHPy150Open bastibe/PySoundCard/pysoundcard.py/_get_stream_parameters--crossover with--dataset/ETHPy150Open missionpinball/mpf/mpf/modes/attract/code/attract.py/Attract.start_button_released