summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out_pulse.c7
1 files changed, 5 insertions, 2 deletions
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 73f9c72..2916de4 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
@@ -82,11 +82,14 @@ static void _write_cb(pa_stream *stream, size_t len, void *data)
82 82
83 bread = ecore_audio_obj_in_read(in, buf, wlen); 83 bread = ecore_audio_obj_in_read(in, buf, wlen);
84 84
85 EPA_CALL(pa_stream_write)(stream, buf, bread, NULL, 0, PA_SEEK_RELATIVE); 85 if ((bread < (int)len) && bread)
86 if (bread < (int)len)
87 { 86 {
87 memset((char *)buf + bread, 0, wlen - bread);
88 EPA_CALL(pa_stream_write)(stream, buf, wlen, NULL, 0, PA_SEEK_RELATIVE);
88 EPA_CALL(pa_operation_unref)(EPA_CALL(pa_stream_trigger)(stream, NULL, NULL)); 89 EPA_CALL(pa_operation_unref)(EPA_CALL(pa_stream_trigger)(stream, NULL, NULL));
89 } 90 }
91 else
92 EPA_CALL(pa_stream_write)(stream, buf, bread, NULL, 0, PA_SEEK_RELATIVE);
90} 93}
91 94
92static void _update_samplerate_cb(void *data EINA_UNUSED, const Efl_Event *event) 95static void _update_samplerate_cb(void *data EINA_UNUSED, const Efl_Event *event)