edje_multisense: Remove unnecessary calls to eet_{open,close}
authorDaniel Willmann <d.willmann@samsung.com>
Thu, 4 Apr 2013 10:46:35 +0000 (11:46 +0100)
committerDaniel Willmann <d.willmann@samsung.com>
Thu, 4 Apr 2013 10:50:41 +0000 (11:50 +0100)
We have the Eet_File already open in ed->file->ef so use that.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
src/lib/edje/edje_multisense.c

index 04ba014..fd474f0 100644 (file)
@@ -94,7 +94,6 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
        if (!strcmp(sample->name, sample_name))
          {
             struct _edje_multisense_eet_data *eet_data;
-            Eet_File *ef;
 
             snprintf(snd_id_str, sizeof(snd_id_str), "edje/sounds/%i", sample->id);
             in = ecore_audio_input_add(ECORE_AUDIO_TYPE_SNDFILE);
@@ -102,10 +101,8 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
             ecore_audio_input_speed_set(in, speed);
 
             eet_data = calloc(1, sizeof(struct _edje_multisense_eet_data));
-            ef = eet_open(ed->file->path, EET_FILE_MODE_READ);
 
-            eet_data->data = eet_read(ef, snd_id_str, (int *)&eet_data->length);
-            eet_close(ef);
+            eet_data->data = eet_read_direct(ed->file->ef, snd_id_str, (int *)&eet_data->length);
 
             /* action->speed */