Revert "Pulsesink: Allow chunks up to bufsize instead of segsize"

This reverts commit 1e2c1467ae.

The commit causes pulsesink to ignore the latency-time baseaudiosink property.
This commit is contained in:
Sebastian Dröge 2011-04-08 14:35:04 +02:00
parent 9b15f9c6a1
commit 11bcac7c90

View file

@ -1351,11 +1351,11 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
towrite = out_samples * bps;
/* Only ever write bufsize bytes at once. This will
* also limit the PA shm buffer to bufsize
/* Only ever write segsize bytes at once. This will
* also limit the PA shm buffer to segsize
*/
if (towrite > bufsize)
towrite = bufsize;
if (towrite > buf->spec.segsize)
towrite = buf->spec.segsize;
if ((pbuf->m_writable < towrite) || (offset != pbuf->m_lastoffset)) {
/* if no room left or discontinuity in offset,
@ -1404,9 +1404,9 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
}
/* make sure we only buffer up latency-time samples */
if (pbuf->m_writable > bufsize) {
if (pbuf->m_writable > buf->spec.segsize) {
/* limit buffering to latency-time value */
pbuf->m_writable = bufsize;
pbuf->m_writable = buf->spec.segsize;
GST_LOG_OBJECT (psink, "Limiting buffering to %" G_GSIZE_FORMAT,
pbuf->m_writable);
@ -1425,9 +1425,9 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
pbuf->m_writable);
/* Just to make sure that we didn't get more than requested */
if (pbuf->m_writable > bufsize) {
if (pbuf->m_writable > buf->spec.segsize) {
/* limit buffering to latency-time value */
pbuf->m_writable = bufsize;
pbuf->m_writable = buf->spec.segsize;
}
}