Revert "Pulsesink: Allow chunks up to bufsize instead of segsize"
This reverts commit 1e2c1467ae042a3c6bb1a6bc0c07aeff13ec5edb. The commit causes pulsesink to ignore the latency-time baseaudiosink property.
This commit is contained in:
parent
9b15f9c6a1
commit
11bcac7c90
@ -1351,11 +1351,11 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
|
|||||||
|
|
||||||
towrite = out_samples * bps;
|
towrite = out_samples * bps;
|
||||||
|
|
||||||
/* Only ever write bufsize bytes at once. This will
|
/* Only ever write segsize bytes at once. This will
|
||||||
* also limit the PA shm buffer to bufsize
|
* also limit the PA shm buffer to segsize
|
||||||
*/
|
*/
|
||||||
if (towrite > bufsize)
|
if (towrite > buf->spec.segsize)
|
||||||
towrite = bufsize;
|
towrite = buf->spec.segsize;
|
||||||
|
|
||||||
if ((pbuf->m_writable < towrite) || (offset != pbuf->m_lastoffset)) {
|
if ((pbuf->m_writable < towrite) || (offset != pbuf->m_lastoffset)) {
|
||||||
/* if no room left or discontinuity in offset,
|
/* 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 */
|
/* 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 */
|
/* 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,
|
GST_LOG_OBJECT (psink, "Limiting buffering to %" G_GSIZE_FORMAT,
|
||||||
pbuf->m_writable);
|
pbuf->m_writable);
|
||||||
@ -1425,9 +1425,9 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
|
|||||||
pbuf->m_writable);
|
pbuf->m_writable);
|
||||||
|
|
||||||
/* Just to make sure that we didn't get more than requested */
|
/* 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 */
|
/* limit buffering to latency-time value */
|
||||||
pbuf->m_writable = bufsize;
|
pbuf->m_writable = buf->spec.segsize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user