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