forked from enlightenment/efl
ecore_audio: remove "name" property
This commit is contained in:
parent
ac909ac04c
commit
30e52e9413
|
@ -64,7 +64,7 @@ main(int argc, const char *argv[])
|
|||
printf("error when creating ecore audio source.\n");
|
||||
goto end;
|
||||
}
|
||||
ecore_audio_obj_name_set(in, "wail");
|
||||
efl_name_set(in, "wail");
|
||||
ecore_audio_obj_in_samplerate_set(in, 44100);
|
||||
ecore_audio_obj_in_channels_set(in, 1);
|
||||
ecore_audio_obj_volume_set(in, 0.7);
|
||||
|
|
|
@ -272,7 +272,7 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
}
|
||||
free(tmp);
|
||||
ecore_audio_obj_name_set(in, argv[i]);
|
||||
efl_name_set(in, argv[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -283,7 +283,7 @@ main(int argc, const char *argv[])
|
|||
goto end;
|
||||
}
|
||||
tmp = strdup(argv[i]);
|
||||
ecore_audio_obj_name_set(in, basename(tmp));
|
||||
efl_name_set(in, basename(tmp));
|
||||
free(tmp);
|
||||
ret = ecore_audio_obj_source_set(in, argv[i]);
|
||||
if (!ret) {
|
||||
|
|
|
@ -50,7 +50,7 @@ main(int argc, char *argv[])
|
|||
|
||||
|
||||
in = efl_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
|
||||
ecore_audio_obj_name_set(in, basename(argv[1]));
|
||||
efl_name_set(in, basename(argv[1]));
|
||||
ret = ecore_audio_obj_source_set(in, argv[1]);
|
||||
if (!ret) {
|
||||
printf("Could not set %s as input\n", argv[1]);
|
||||
|
|
|
@ -19,19 +19,6 @@ class Ecore.Audio (Efl.Object)
|
|||
eo_prefix: ecore_audio_obj;
|
||||
data: Ecore_Audio_Object;
|
||||
methods {
|
||||
@property name {
|
||||
[[Name of the object
|
||||
|
||||
@since 1.8
|
||||
]]
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
name: string; [[Name]]
|
||||
}
|
||||
}
|
||||
@property paused {
|
||||
[[Pauses state of the object
|
||||
|
||||
|
|
|
@ -18,17 +18,6 @@
|
|||
#define MY_CLASS ECORE_AUDIO_CLASS
|
||||
#define MY_CLASS_NAME "Ecore_Audio"
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_audio_name_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, const char *name)
|
||||
{
|
||||
eina_stringshare_replace(&obj->name, name);
|
||||
}
|
||||
|
||||
EOLIAN static const char*
|
||||
_ecore_audio_name_get(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj)
|
||||
{
|
||||
return obj->name;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_audio_paused_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, Eina_Bool paused)
|
||||
|
|
|
@ -124,7 +124,7 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
|
|||
ss.rate = ecore_audio_obj_in_samplerate_get(in);
|
||||
speed = ecore_audio_obj_in_speed_get(in);
|
||||
ss.channels = ecore_audio_obj_in_channels_get(in);
|
||||
name = ecore_audio_obj_name_get(in);
|
||||
name = efl_name_get(in);
|
||||
|
||||
ss.rate = ss.rate * speed;
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
|
|||
eet_data->vio.tell = eet_snd_file_tell;
|
||||
eet_data->offset = 0;
|
||||
|
||||
in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, ecore_audio_obj_name_set(efl_added, snd_id_str), ecore_audio_obj_in_speed_set(efl_added, speed), ecore_audio_obj_vio_set(efl_added, &eet_data->vio, eet_data, _free), efl_event_callback_add(efl_added, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
|
||||
in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, efl_name_set(efl_added, snd_id_str), ecore_audio_obj_in_speed_set(efl_added, speed), ecore_audio_obj_vio_set(efl_added, &eet_data->vio, eet_data, _free), efl_event_callback_add(efl_added, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
|
||||
if (!out)
|
||||
{
|
||||
|
||||
|
@ -284,7 +284,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
|
|||
if (!strcmp(tone->name, tone_name))
|
||||
{
|
||||
in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
|
||||
ecore_audio_obj_name_set(in, "tone");
|
||||
efl_name_set(in, "tone");
|
||||
efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value);
|
||||
ecore_audio_obj_in_length_set(in, duration);
|
||||
efl_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL);
|
||||
|
|
|
@ -60,7 +60,7 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
|
|||
in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
|
||||
fail_if(!in);
|
||||
|
||||
ecore_audio_obj_name_set(in, "sample.wav");
|
||||
efl_name_set(in, "sample.wav");
|
||||
ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.wav");
|
||||
fail_if(!ret);
|
||||
|
||||
|
@ -142,7 +142,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
|
|||
in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
|
||||
fail_if(!in);
|
||||
|
||||
ecore_audio_obj_name_set(in, "tone");
|
||||
efl_name_set(in, "tone");
|
||||
|
||||
channel = ecore_audio_obj_in_channels_get(in);
|
||||
fail_if(channel != 1);
|
||||
|
@ -200,7 +200,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
|
|||
out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
|
||||
fail_if(!out);
|
||||
|
||||
ecore_audio_obj_name_set(out, "tmp.wav");
|
||||
efl_name_set(out, "tmp.wav");
|
||||
ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV);
|
||||
fail_if(!ret);
|
||||
ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.wav");
|
||||
|
@ -246,7 +246,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
|
|||
ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_AUTO);
|
||||
fail_if(!ret);
|
||||
|
||||
ecore_audio_obj_name_set(in, "sample.ogg");
|
||||
efl_name_set(in, "sample.ogg");
|
||||
ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.ogg");
|
||||
fail_if(!ret);
|
||||
|
||||
|
@ -280,7 +280,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
|
|||
out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
|
||||
fail_if(!out);
|
||||
|
||||
ecore_audio_obj_name_set(out, "tmp.wav");
|
||||
efl_name_set(out, "tmp.wav");
|
||||
ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV);
|
||||
fail_if(!ret);
|
||||
|
||||
|
@ -552,16 +552,16 @@ START_TEST(ecore_test_ecore_audio_obj)
|
|||
|
||||
fail_if(!obj);
|
||||
|
||||
name = ecore_audio_obj_name_get(obj);
|
||||
name = efl_name_get(obj);
|
||||
|
||||
fail_if(name);
|
||||
|
||||
ecore_audio_obj_name_set(obj, "In1");
|
||||
name = ecore_audio_obj_name_get(obj);
|
||||
efl_name_set(obj, "In1");
|
||||
name = efl_name_get(obj);
|
||||
|
||||
ck_assert_str_eq(name, "In1");
|
||||
|
||||
ecore_audio_obj_name_get(obj);
|
||||
efl_name_get(obj);
|
||||
|
||||
paused = ecore_audio_obj_paused_get(obj);
|
||||
fail_if(paused);
|
||||
|
|
Loading…
Reference in New Issue