[vlc-commits] PulseAudio: use pa_usec_to_bytes() where applicable
Rémi Denis-Courmont
git at videolan.org
Thu Jul 21 20:42:56 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 21 21:03:59 2011 +0300| [57fc3ed8fd0463db0ac0633023fbc9efb4e96cec] | committer: Rémi Denis-Courmont
PulseAudio: use pa_usec_to_bytes() where applicable
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57fc3ed8fd0463db0ac0633023fbc9efb4e96cec
---
modules/audio_output/pulse.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index bb557e2..5ffbd60 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -592,7 +592,6 @@ static int Open(vlc_object_t *obj)
| PA_STREAM_AUTO_TIMING_UPDATE
| PA_STREAM_VARIABLE_RATE;
- const uint32_t byterate = pa_bytes_per_second(&ss);
struct pa_buffer_attr attr;
attr.maxlength = -1;
/* PulseAudio assumes that tlength bytes are available in the buffer. Thus
@@ -601,7 +600,7 @@ static int Open(vlc_object_t *obj)
* underrun on hardware with large buffers. VLC keeps at least
* AOUT_MIN_PREPARE and at most AOUT_MAX_PREPARE worth of audio buffers.
* TODO? tlength could be adaptively increased to reduce wakeups. */
- attr.tlength = byterate * AOUT_MIN_PREPARE_TIME / CLOCK_FREQ;
+ attr.tlength = pa_usec_to_bytes(AOUT_MIN_PREPARE_TIME, &ss);
attr.prebuf = 0; /* trigger manually */
attr.minreq = -1;
attr.fragsize = 0; /* not used for output */
More information about the vlc-commits
mailing list