ecore_audio_pulse: Fix small bug that would delay PA stream deletion
authorDaniel Willmann <d.willmann@samsung.com>
Wed, 17 Apr 2013 19:35:10 +0000 (20:35 +0100)
committerDaniel Willmann <d.willmann@samsung.com>
Thu, 18 Apr 2013 18:16:40 +0000 (19:16 +0100)
In case of short reads just make sure that playback is started
immediately. No need to drain just yet as that just causes issues with
delayed removals of streams.

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

index 4a3f9f8..c103b73 100644 (file)
@@ -85,8 +85,9 @@ static void _write_cb(pa_stream *stream, size_t len, void *data)
   pa_stream_write(stream, buf, bread, free, 0, PA_SEEK_RELATIVE);
   if (bread < len)
     {
+      pa_operation_unref(pa_stream_trigger(stream, NULL, NULL));
       //in->ended = EINA_TRUE;
-      pa_operation_unref(pa_stream_drain(stream, NULL, NULL));
+      //pa_operation_unref(pa_stream_drain(stream, NULL, NULL));
     }
 }