summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-14 21:14:52 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-15 13:11:00 -0500
commit30e52e9413fbd0f108e5ebbd76fcf6b4d08a6760 (patch)
treeb6fbad82c9910688074c1a4304ec3b6b5800823d /src
parentac909ac04c680955eb6ce78a2c59865953b347bd (diff)
ecore_audio: remove "name" property
Diffstat (limited to 'src')
-rw-r--r--src/examples/ecore/ecore_audio_custom.c2
-rw-r--r--src/examples/ecore/ecore_audio_playback.c4
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c2
-rw-r--r--src/lib/ecore_audio/ecore_audio.eo13
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj.c11
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out_pulse.c2
-rw-r--r--src/lib/edje/edje_multisense.c4
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c18
8 files changed, 16 insertions, 40 deletions
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 9d88c75..8089918 100644
--- a/src/examples/ecore/ecore_audio_custom.c
+++ b/src/examples/ecore/ecore_audio_custom.c
@@ -64,7 +64,7 @@ main(int argc, const char *argv[])
64 printf("error when creating ecore audio source.\n"); 64 printf("error when creating ecore audio source.\n");
65 goto end; 65 goto end;
66 } 66 }
67 ecore_audio_obj_name_set(in, "wail"); 67 efl_name_set(in, "wail");
68 ecore_audio_obj_in_samplerate_set(in, 44100); 68 ecore_audio_obj_in_samplerate_set(in, 44100);
69 ecore_audio_obj_in_channels_set(in, 1); 69 ecore_audio_obj_in_channels_set(in, 1);
70 ecore_audio_obj_volume_set(in, 0.7); 70 ecore_audio_obj_volume_set(in, 0.7);
diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c
index 5945393..3171303 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -272,7 +272,7 @@ main(int argc, const char *argv[])
272 } 272 }
273 } 273 }
274 free(tmp); 274 free(tmp);
275 ecore_audio_obj_name_set(in, argv[i]); 275 efl_name_set(in, argv[i]);
276 } 276 }
277 else 277 else
278 { 278 {
@@ -283,7 +283,7 @@ main(int argc, const char *argv[])
283 goto end; 283 goto end;
284 } 284 }
285 tmp = strdup(argv[i]); 285 tmp = strdup(argv[i]);
286 ecore_audio_obj_name_set(in, basename(tmp)); 286 efl_name_set(in, basename(tmp));
287 free(tmp); 287 free(tmp);
288 ret = ecore_audio_obj_source_set(in, argv[i]); 288 ret = ecore_audio_obj_source_set(in, argv[i]);
289 if (!ret) { 289 if (!ret) {
diff --git a/src/examples/ecore/ecore_audio_to_ogg.c b/src/examples/ecore/ecore_audio_to_ogg.c
index fec1cc5..194e31e 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+++ b/src/examples/ecore/ecore_audio_to_ogg.c
@@ -50,7 +50,7 @@ main(int argc, char *argv[])
50 50
51 51
52 in = efl_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 52 in = efl_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
53 ecore_audio_obj_name_set(in, basename(argv[1])); 53 efl_name_set(in, basename(argv[1]));
54 ret = ecore_audio_obj_source_set(in, argv[1]); 54 ret = ecore_audio_obj_source_set(in, argv[1]);
55 if (!ret) { 55 if (!ret) {
56 printf("Could not set %s as input\n", argv[1]); 56 printf("Could not set %s as input\n", argv[1]);
diff --git a/src/lib/ecore_audio/ecore_audio.eo b/src/lib/ecore_audio/ecore_audio.eo
index 230804b..988ba00 100644
--- a/src/lib/ecore_audio/ecore_audio.eo
+++ b/src/lib/ecore_audio/ecore_audio.eo
@@ -19,19 +19,6 @@ class Ecore.Audio (Efl.Object)
19 eo_prefix: ecore_audio_obj; 19 eo_prefix: ecore_audio_obj;
20 data: Ecore_Audio_Object; 20 data: Ecore_Audio_Object;
21 methods { 21 methods {
22 @property name {
23 [[Name of the object
24
25 @since 1.8
26 ]]
27 set {
28 }
29 get {
30 }
31 values {
32 name: string; [[Name]]
33 }
34 }
35 @property paused { 22 @property paused {
36 [[Pauses state of the object 23 [[Pauses state of the object
37 24
diff --git a/src/lib/ecore_audio/ecore_audio_obj.c b/src/lib/ecore_audio/ecore_audio_obj.c
index 5c7abe2..e2f3c81 100644
--- a/src/lib/ecore_audio/ecore_audio_obj.c
+++ b/src/lib/ecore_audio/ecore_audio_obj.c
@@ -18,17 +18,6 @@
18#define MY_CLASS ECORE_AUDIO_CLASS 18#define MY_CLASS ECORE_AUDIO_CLASS
19#define MY_CLASS_NAME "Ecore_Audio" 19#define MY_CLASS_NAME "Ecore_Audio"
20 20
21EOLIAN static void
22_ecore_audio_name_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, const char *name)
23{
24 eina_stringshare_replace(&obj->name, name);
25}
26
27EOLIAN static const char*
28_ecore_audio_name_get(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj)
29{
30 return obj->name;
31}
32 21
33EOLIAN static void 22EOLIAN static void
34_ecore_audio_paused_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, Eina_Bool paused) 23_ecore_audio_paused_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, Eina_Bool paused)
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 2916de4..5d61e0e 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
@@ -124,7 +124,7 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
124 ss.rate = ecore_audio_obj_in_samplerate_get(in); 124 ss.rate = ecore_audio_obj_in_samplerate_get(in);
125 speed = ecore_audio_obj_in_speed_get(in); 125 speed = ecore_audio_obj_in_speed_get(in);
126 ss.channels = ecore_audio_obj_in_channels_get(in); 126 ss.channels = ecore_audio_obj_in_channels_get(in);
127 name = ecore_audio_obj_name_get(in); 127 name = efl_name_get(in);
128 128
129 ss.rate = ss.rate * speed; 129 ss.rate = ss.rate * speed;
130 130
diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index 58734e7..9227ff7 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -199,7 +199,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
199 eet_data->vio.tell = eet_snd_file_tell; 199 eet_data->vio.tell = eet_snd_file_tell;
200 eet_data->offset = 0; 200 eet_data->offset = 0;
201 201
202 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)); 202 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));
203 if (!out) 203 if (!out)
204 { 204 {
205 205
@@ -284,7 +284,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
284 if (!strcmp(tone->name, tone_name)) 284 if (!strcmp(tone->name, tone_name))
285 { 285 {
286 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 286 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
287 ecore_audio_obj_name_set(in, "tone"); 287 efl_name_set(in, "tone");
288 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value); 288 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value);
289 ecore_audio_obj_in_length_set(in, duration); 289 ecore_audio_obj_in_length_set(in, duration);
290 efl_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL); 290 efl_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL);
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 1a88adf..23f638a 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -60,7 +60,7 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
60 in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 60 in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
61 fail_if(!in); 61 fail_if(!in);
62 62
63 ecore_audio_obj_name_set(in, "sample.wav"); 63 efl_name_set(in, "sample.wav");
64 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.wav"); 64 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.wav");
65 fail_if(!ret); 65 fail_if(!ret);
66 66
@@ -142,7 +142,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
142 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 142 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
143 fail_if(!in); 143 fail_if(!in);
144 144
145 ecore_audio_obj_name_set(in, "tone"); 145 efl_name_set(in, "tone");
146 146
147 channel = ecore_audio_obj_in_channels_get(in); 147 channel = ecore_audio_obj_in_channels_get(in);
148 fail_if(channel != 1); 148 fail_if(channel != 1);
@@ -200,7 +200,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
200 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 200 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
201 fail_if(!out); 201 fail_if(!out);
202 202
203 ecore_audio_obj_name_set(out, "tmp.wav"); 203 efl_name_set(out, "tmp.wav");
204 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV); 204 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV);
205 fail_if(!ret); 205 fail_if(!ret);
206 ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.wav"); 206 ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.wav");
@@ -246,7 +246,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
246 ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_AUTO); 246 ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_AUTO);
247 fail_if(!ret); 247 fail_if(!ret);
248 248
249 ecore_audio_obj_name_set(in, "sample.ogg"); 249 efl_name_set(in, "sample.ogg");
250 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.ogg"); 250 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.ogg");
251 fail_if(!ret); 251 fail_if(!ret);
252 252
@@ -280,7 +280,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
280 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 280 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
281 fail_if(!out); 281 fail_if(!out);
282 282
283 ecore_audio_obj_name_set(out, "tmp.wav"); 283 efl_name_set(out, "tmp.wav");
284 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV); 284 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV);
285 fail_if(!ret); 285 fail_if(!ret);
286 286
@@ -552,16 +552,16 @@ START_TEST(ecore_test_ecore_audio_obj)
552 552
553 fail_if(!obj); 553 fail_if(!obj);
554 554
555 name = ecore_audio_obj_name_get(obj); 555 name = efl_name_get(obj);
556 556
557 fail_if(name); 557 fail_if(name);
558 558
559 ecore_audio_obj_name_set(obj, "In1"); 559 efl_name_set(obj, "In1");
560 name = ecore_audio_obj_name_get(obj); 560 name = efl_name_get(obj);
561 561
562 ck_assert_str_eq(name, "In1"); 562 ck_assert_str_eq(name, "In1");
563 563
564 ecore_audio_obj_name_get(obj); 564 efl_name_get(obj);
565 565
566 paused = ecore_audio_obj_paused_get(obj); 566 paused = ecore_audio_obj_paused_get(obj);
567 fail_if(paused); 567 fail_if(paused);