[pulseaudio-commits] r1498 - /branches/lennart/src/pulsecore/sink.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Jun 24 09:17:31 PDT 2007


Author: lennart
Date: Sun Jun 24 18:17:30 2007
New Revision: 1498

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1498&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Limit silence buffer size for pa_sink_render()

Modified:
    branches/lennart/src/pulsecore/sink.c

Modified: branches/lennart/src/pulsecore/sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
sink.c?rev=3D1498&root=3Dpulseaudio&r1=3D1497&r2=3D1498&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/sink.c (original)
+++ branches/lennart/src/pulsecore/sink.c Sun Jun 24 18:17:30 2007
@@ -46,6 +46,7 @@
 #include "sink.h"
 =

 #define MAX_MIX_CHANNELS 32
+#define SILENCE_BUFFER_LENGTH (64*1024)
 =

 static PA_DEFINE_CHECK_TYPE(pa_sink, sink_check_type, pa_msgobject_check_t=
ype);
 =

@@ -363,6 +364,9 @@
     n =3D fill_mix_info(s, info, MAX_MIX_CHANNELS);
 =

     if (n =3D=3D 0) {
+
+        if (length > SILENCE_BUFFER_LENGTH)
+            length =3D SILENCE_BUFFER_LENGTH;
 =

         if (!s->silence || pa_memblock_get_length(s->silence) < length) {
             if (s->silence)




More information about the pulseaudio-commits mailing list