asdfuser pushed a commit to branch master.

commit af13c1f60fef9ec158a77897d045e7dd5165c52f
Author: Daniel Willmann <[email protected]>
Date:   Thu Apr 4 11:46:35 2013 +0100

    edje_multisense: Remove unnecessary calls to eet_{open,close}
    
    We have the Eet_File already open in ed->file->ef so use that.
    
    Signed-off-by: Daniel Willmann <[email protected]>
---
 src/lib/edje/edje_multisense.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index 04ba014..fd474f0 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -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 */
 

-- 

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html

Reply via email to