getNchnls

Contents

getNchnls#

csoundengine.csoundlib.getNchnls(backend='', outpattern='', inpattern='', defaultin=2, defaultout=2)[source]#

Get the default number of channels for a given device

Parameters:
  • backend – the backend, one of ‘jack’, ‘portaudio’, etc. None to use default

  • outpattern – the output device. Use None for default device. Otherwise either the device id (“dac0”) or a regex pattern matching the long name of the device

  • inpattern – the input device. Use None for default device. Otherwise either the device id (“dac0”) or a regex pattern matching the long name of the device

  • defaultin – default value returned if it is not possible to determine the number of channels for given backend+device

  • defaultout – default value returned if it is not possible to determine the number of channels for given backend/device

Return type:

tuple[int, int]

Returns:

a tuple (nchnls_i, nchnls) for that backend+device combination