aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_audio/ecore_audio_obj_out_pulse.c')
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out_pulse.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
index eab7464288..07fdfaa9ff 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
@@ -61,10 +61,10 @@ _ecore_audio_out_pulse_ecore_audio_volume_set(Eo *eo_obj, Ecore_Audio_Out_Pulse_
pa_cvolume_set(&pa_volume, 2, volume * PA_VOLUME_NORM);
- eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_volume_set(volume));
+ eo_super_ecore_audio_obj_volume_set(MY_CLASS, eo_obj, volume);
EINA_LIST_FOREACH(out_obj->inputs, input, in) {
- eo_do(in, stream = eo_key_data_get("pulse_data"));
+ eo_do(in, stream = eo_key_data_get(in, "pulse_data"));
idx = pa_stream_get_index(stream);
pa_operation_unref(pa_context_set_sink_input_volume(class_vars.context, idx, &pa_volume, NULL, NULL));
}
@@ -81,7 +81,7 @@ static void _write_cb(pa_stream *stream, size_t len, void *data)
pa_stream_begin_write(stream, &buf, &wlen);
- eo_do(in, bread = ecore_audio_obj_in_read(buf, wlen));
+ eo_do(in, bread = ecore_audio_obj_in_read(in, buf, wlen));
pa_stream_write(stream, buf, bread, NULL, 0, PA_SEEK_RELATIVE);
if (bread < (int)len)
@@ -96,10 +96,10 @@ static Eina_Bool _update_samplerate_cb(void *data EINA_UNUSED, Eo *eo_obj, const
int samplerate = 0;
double speed = 0;
- eo_do(eo_obj, samplerate = ecore_audio_obj_in_samplerate_get());
- eo_do(eo_obj, speed = ecore_audio_obj_in_speed_get());
+ eo_do(eo_obj, samplerate = ecore_audio_obj_in_samplerate_get(eo_obj));
+ eo_do(eo_obj, speed = ecore_audio_obj_in_speed_get(eo_obj));
- eo_do(eo_obj, stream = eo_key_data_get("pulse_data"));
+ eo_do(eo_obj, stream = eo_key_data_get(eo_obj, "pulse_data"));
pa_operation_unref(pa_stream_update_sample_rate(stream, samplerate * speed, NULL, NULL));
@@ -115,28 +115,28 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
Eina_Bool ret = EINA_FALSE;
Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_CLASS);
- eo_do_super(eo_obj, MY_CLASS, ret = ecore_audio_obj_out_input_attach(in));
+ ret = eo_super_ecore_audio_obj_out_input_attach(MY_CLASS, eo_obj, in);
if (!ret)
return EINA_FALSE;
ss.format = PA_SAMPLE_FLOAT32LE;
- eo_do(in, ss.rate = ecore_audio_obj_in_samplerate_get());
- eo_do(in, speed = ecore_audio_obj_in_speed_get());
- eo_do(in, ss.channels = ecore_audio_obj_in_channels_get());
- eo_do(in, name = ecore_audio_obj_name_get());
+ eo_do(in, ss.rate = ecore_audio_obj_in_samplerate_get(in));
+ eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
+ eo_do(in, ss.channels = ecore_audio_obj_in_channels_get(in));
+ eo_do(in, name = ecore_audio_obj_name_get(in));
ss.rate = ss.rate * speed;
stream = pa_stream_new(class_vars.context, name, &ss, NULL);
if (!stream) {
ERR("Could not create stream");
- eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_out_input_detach(in));
+ eo_super_ecore_audio_obj_out_input_detach(MY_CLASS, eo_obj, in);
return EINA_FALSE;
}
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, _update_samplerate_cb, eo_obj));
+ eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, _update_samplerate_cb, eo_obj));
- eo_do(in, eo_key_data_set("pulse_data", stream));
+ eo_do(in, eo_key_data_set(in, "pulse_data", stream));
pa_stream_set_write_callback(stream, _write_cb, in);
@@ -151,7 +151,7 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
static Eina_Bool _delayed_attach_cb(void *data, Eo *eo_obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
Eo *in = data;
- eo_do(eo_obj, eo_event_callback_del(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
+ eo_do(eo_obj, eo_event_callback_del(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
_input_attach_internal(eo_obj, in);
@@ -165,7 +165,7 @@ _ecore_audio_out_pulse_ecore_audio_out_input_attach(Eo *eo_obj, Ecore_Audio_Out_
if (class_vars.state != PA_CONTEXT_READY) {
DBG("Delaying input_attach because PA context is not ready.");
- eo_do(eo_obj, eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
+ eo_do(eo_obj, eo_event_callback_add(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
} else {
retval = _input_attach_internal(eo_obj, in);
}
@@ -186,11 +186,11 @@ _ecore_audio_out_pulse_ecore_audio_out_input_detach(Eo *eo_obj, Ecore_Audio_Out_
Eina_Bool ret2 = EINA_FALSE;
pa_operation *op;
- eo_do_super(eo_obj, MY_CLASS, ret2 = ecore_audio_obj_out_input_detach(in));
+ ret2 = eo_super_ecore_audio_obj_out_input_detach(MY_CLASS, eo_obj, in);
if (!ret2)
return EINA_FALSE;
- eo_do(in, stream = eo_key_data_get("pulse_data"));
+ eo_do(in, stream = eo_key_data_get(in, "pulse_data"));
pa_stream_set_write_callback(stream, NULL, NULL);
op = pa_stream_drain(stream, _drain_cb, NULL);
@@ -221,12 +221,12 @@ static void _state_cb(pa_context *context, void *data EINA_UNUSED)
if (state == PA_CONTEXT_READY) {
DBG("PA context ready.");
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL));
+ eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL));
}
} else if ((state == PA_CONTEXT_FAILED) || (state == PA_CONTEXT_TERMINATED)) {
DBG("PA context fail.");
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
+ eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
}
} else {
DBG("Connection state %i", state);
@@ -252,7 +252,7 @@ static void _state_job(void *data EINA_UNUSED)
}
// the callback here can delete things in the list..
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
+ eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
}
// now unref everything safely
EINA_LIST_FOREACH_SAFE(class_vars.outputs, out, tmp, eo_obj) {
@@ -269,7 +269,7 @@ _ecore_audio_out_pulse_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Out_Pulse_Dat
char **argv;
Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OUT_CLASS);
- eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
+ eo_super_eo_constructor(MY_CLASS, eo_obj);
out_obj->need_writer = EINA_FALSE;
@@ -296,7 +296,7 @@ EOLIAN static void
_ecore_audio_out_pulse_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Out_Pulse_Data *_pd EINA_UNUSED)
{
class_vars.outputs = eina_list_remove(class_vars.outputs, eo_obj);
- eo_do_super(eo_obj, MY_CLASS, eo_destructor());
+ eo_super_eo_destructor(MY_CLASS, eo_obj);
}
#include "ecore_audio_out_pulse.eo.c"