ecore_audio : fix to write as much as requested length 31/111831/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Fri, 20 Jan 2017 09:29:58 +0000 (18:29 +0900)
committerJiwon Kim <jiwon177.kim@samsung.com>
Tue, 24 Jan 2017 08:37:58 +0000 (00:37 -0800)
Change-Id: I7e7ee2333313ea3a2189dc5a633f6e229d91d0a0
(cherry picked from commit 13086f7f7a0422d6a3386394eee9ec31a2439395)

src/lib/ecore_audio/ecore_audio_obj_out_tizen.c

index aa7f083..d76e1e1 100644 (file)
@@ -102,7 +102,7 @@ static Eina_Bool _module_load(Ecore_Audio_Out_Tizen_Data *td)
    return EINA_TRUE;
 }
 
-static void _stream_write_cb(void *handle, size_t len EINA_UNUSED, void *data)
+static void _stream_write_cb(void *handle, size_t len, void *data)
 {
    Eo *in = data;
    Ecore_Audio_Out_Tizen_Data *_td;
@@ -110,9 +110,8 @@ static void _stream_write_cb(void *handle, size_t len EINA_UNUSED, void *data)
 
    void *buf;
    ssize_t bread = 0;
-   size_t wlen;
+   size_t wlen = len;
 
-   _td->func->get_buffer_size(handle, &wlen);
    buf = malloc(wlen);
    eo_do(in, bread = ecore_audio_obj_in_read(buf, wlen));