/* ============ Media Consumer Interface ================= */
int tdav_consumer_audiounit_set(tmedia_consumer_t* self, const tmedia_param_t* param)
{
    tdav_consumer_audiounit_t* consumer = (tdav_consumer_audiounit_t*)self;
    if (param->plugin_type == tmedia_ppt_consumer) {
        if (param->value_type == tmedia_pvt_int32) {
            if (tsk_striequals(param->key, "interrupt")) {
                int32_t interrupt = *((uint8_t*)param->value) ? 1 : 0;
                return tdav_audiounit_handle_interrupt(consumer->audioUnitHandle, interrupt);
            }
            else if (tsk_striequals(param->key, "pause") || tsk_striequals(param->key, "hold")) {
                int32_t pause = *((uint8_t*)param->value) ? 1 : 0;
                return pause ? tdav_consumer_audiounit_pause(self) : tdav_consumer_audiounit_resume(self);
            }
        }
    }
    return tdav_consumer_audio_set(TDAV_CONSUMER_AUDIO(self), param);
}
/* ============ Media Consumer Interface ================= */
int tdav_consumer_audiounit_set(tmedia_consumer_t* self, const tmedia_param_t* param)
{
	return tdav_consumer_audio_set(TDAV_CONSUMER_AUDIO(self), param);
}