jack_mixer_t
create(
- const char * jack_client_name_ptr)
+ const char * jack_client_name_ptr,
+ bool stereo)
{
int ret;
struct jack_mixer * mixer_ptr;
LOG_DEBUG("Sample rate: %" PRIu32, jack_get_sample_rate(mixer_ptr->jack_client));
- mixer_ptr->main_mix_channel = create_output_channel(mixer_ptr, "MAIN", true, false);
+ mixer_ptr->main_mix_channel = create_output_channel(mixer_ptr, "MAIN", stereo, false);
if (mixer_ptr->main_mix_channel == NULL) {
LOG_ERROR("Cannot create main mix channel");
goto close_jack;
static int
Mixer_init(MixerObject *self, PyObject *args, PyObject *kwds)
{
- static char *kwlist[] = {"name", NULL};
+ static char *kwlist[] = {"name", "stereo", NULL};
char *name;
+ int stereo = 1;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &name))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|b", kwlist, &name, &stereo))
return -1;
- self->mixer = create(name);
+ self->mixer = create(name, (bool)stereo);
if (self->mixer == NULL) {
PyErr_SetString(PyExc_RuntimeError,
"error creating mixer, probably jack is not running");