[empathy] audio-src, audio-sink: Use lower latency values on pulsesrc/pulsesink
- From: Arun Raghavan <arunsr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] audio-src, audio-sink: Use lower latency values on pulsesrc/pulsesink
- Date: Mon, 21 Nov 2011 18:21:08 +0000 (UTC)
commit 24882e924af2c0d8576970440d92ac5b4eb25bc8
Author: Arun Raghavan <arun raghavan collabora co uk>
Date: Mon Nov 21 23:27:08 2011 +0530
audio-src,audio-sink: Use lower latency values on pulsesrc/pulsesink
This sets the pulsesink and pulsesrc buffer/latency parameters to be
lower and more voip-friendly. If the system cannot provide or keep up
with these values, PulseAudio will automatically try to adapt and
provide larger values that are achievable.
https://bugzilla.gnome.org/show_bug.cgi?id=663124
src/empathy-audio-sink.c | 4 ++++
src/empathy-audio-src.c | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-audio-sink.c b/src/empathy-audio-sink.c
index d912e1d..5ab14b5 100644
--- a/src/empathy-audio-sink.c
+++ b/src/empathy-audio-sink.c
@@ -220,6 +220,10 @@ create_sink (EmpathyGstAudioSink *self)
empathy_call_set_stream_properties (sink, self->priv->echo_cancel);
+ /* Set latency (buffering on the PulseAudio side) of 40ms and transfer data
+ * in 10ms chunks */
+ g_object_set (sink, "buffer-time", 40000, "latency-time", 10000, NULL);
+
return sink;
}
diff --git a/src/empathy-audio-src.c b/src/empathy-audio-src.c
index 635c87d..aa271fa 100644
--- a/src/empathy-audio-src.c
+++ b/src/empathy-audio-src.c
@@ -331,6 +331,9 @@ create_src (void)
empathy_call_set_stream_properties (src, TRUE);
+ /* Set latency (buffering on the PulseAudio side) of 20ms */
+ g_object_set (src, "buffer-time", 20000, NULL);
+
return src;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]