output_channel_ptr->muted_channels = g_slist_remove(output_channel_ptr->muted_channels, channel);
}
}
+
+bool
+output_channel_is_muted(
+ jack_mixer_output_channel_t output_channel,
+ jack_mixer_channel_t channel)
+{
+ struct output_channel *output_channel_ptr = output_channel;
+
+ if (g_slist_find(output_channel_ptr->muted_channels, channel) != NULL)
+ return true;
+ return false;
+}
+
+bool
+output_channel_is_solo(
+ jack_mixer_output_channel_t output_channel,
+ jack_mixer_channel_t channel)
+{
+ struct output_channel *output_channel_ptr = output_channel;
+
+ if (g_slist_find(output_channel_ptr->soloed_channels, channel) != NULL)
+ return true;
+ return false;
+}
+
jack_mixer_channel_t channel,
bool muted_value);
+bool
+output_channel_is_muted(
+ jack_mixer_output_channel_t output_channel,
+ jack_mixer_channel_t channel);
+
+bool
+output_channel_is_solo(
+ jack_mixer_output_channel_t output_channel,
+ jack_mixer_channel_t channel);
+
#endif /* #ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */
OutputChannel_set_solo(OutputChannelObject *self, PyObject *args)
{
PyObject *channel;
- int solo;
+ unsigned char solo;
if (! PyArg_ParseTuple(args, "Ob", &channel, &solo)) return NULL;
OutputChannel_set_muted(OutputChannelObject *self, PyObject *args)
{
PyObject *channel;
- int muted;
+ unsigned char muted;
if (! PyArg_ParseTuple(args, "Ob", &channel, &muted)) return NULL;
return Py_None;
}
+static PyObject*
+OutputChannel_is_solo(OutputChannelObject *self, PyObject *args)
+{
+ PyObject *channel;
+ PyObject *result;
+
+ if (! PyArg_ParseTuple(args, "O", &channel)) return NULL;
+
+ if (output_channel_is_solo(self->output_channel,
+ ((ChannelObject*)channel)->channel)) {
+ result = Py_True;
+ } else {
+ result = Py_False;
+ }
+
+ Py_INCREF(result);
+ return result;
+}
+static PyObject*
+OutputChannel_is_muted(OutputChannelObject *self, PyObject *args)
+{
+ PyObject *channel;
+ PyObject *result;
+
+ if (! PyArg_ParseTuple(args, "O", &channel)) return NULL;
+
+ if (output_channel_is_muted(self->output_channel,
+ ((ChannelObject*)channel)->channel)) {
+ result = Py_True;
+ } else {
+ result = Py_False;
+ }
+
+ Py_INCREF(result);
+ return result;
+}
static PyMethodDef output_channel_methods[] = {
{"remove", (PyCFunction)OutputChannel_remove, METH_VARARGS, "Remove"},
{"set_solo", (PyCFunction)OutputChannel_set_solo, METH_VARARGS, "Set a channel as solo"},
{"set_muted", (PyCFunction)OutputChannel_set_muted, METH_VARARGS, "Set a channel as muted"},
+ {"is_solo", (PyCFunction)OutputChannel_is_solo, METH_VARARGS, "Is a channel set as solo"},
+ {"is_muted", (PyCFunction)OutputChannel_is_muted, METH_VARARGS, "Is a channel set as muted"},
{NULL}
};