[pulseaudio-commits] r2456 - in /trunk/src/pulsecore: source.c source.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sat May 17 02:12:46 PDT 2008
Author: lennart
Date: Sat May 17 11:12:45 2008
New Revision: 2456
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2456&root=pulseaudio&view=rev
Log:
add new function pa_source_set_latency_range(), fix type of requested_latency
Modified:
trunk/src/pulsecore/source.c
trunk/src/pulsecore/source.h
Modified: trunk/src/pulsecore/source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/source.c?rev=2456&root=pulseaudio&r1=2455&r2=2456&view=diff
==============================================================================
--- trunk/src/pulsecore/source.c (original)
+++ trunk/src/pulsecore/source.c Sat May 17 11:12:45 2008
@@ -786,4 +786,23 @@
if (s->update_requested_latency)
s->update_requested_latency(s);
-}
+
+ if (s->monitor_of)
+ pa_sink_invalidate_requested_latency(s->monitor_of);
+}
+
+void pa_source_set_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t max_latency) {
+ pa_source_assert_ref(s);
+
+ if (min_latency == (pa_usec_t) -1)
+ min_latency = DEFAULT_MIN_LATENCY;
+
+ if (max_latency == (pa_usec_t) -1)
+ max_latency = min_latency;
+
+ pa_assert(!min_latency || !max_latency ||
+ min_latency <= max_latency);
+
+ s->min_latency = min_latency;
+ s->max_latency = max_latency;
+}
Modified: trunk/src/pulsecore/source.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/source.h?rev=2456&root=pulseaudio&r1=2455&r2=2456&view=diff
==============================================================================
--- trunk/src/pulsecore/source.h (original)
+++ trunk/src/pulsecore/source.h Sat May 17 11:12:45 2008
@@ -111,7 +111,7 @@
pa_bool_t soft_muted;
pa_bool_t requested_latency_valid;
- size_t requested_latency;
+ pa_usec_t requested_latency;
/* Then number of bytes this source will be rewound for at
* max */
@@ -180,6 +180,8 @@
void pa_source_set_asyncmsgq(pa_source *s, pa_asyncmsgq *q);
void pa_source_set_rtpoll(pa_source *s, pa_rtpoll *p);
+void pa_source_set_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t max_latency);
+
void pa_source_detach(pa_source *s);
void pa_source_attach(pa_source *s);
More information about the pulseaudio-commits
mailing list