Lines Matching defs:nbytes
1140 void pa_sink_input_drop(pa_sink_input *i, size_t nbytes /* in sink sample spec */) {
1146 pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
1147 pa_assert(nbytes > 0);
1150 pa_log_debug("dropping %lu", (unsigned long) nbytes);
1153 pa_memblockq_drop(i->thread_info.render_memblockq, nbytes);
1156 * on nbytes will not work here because of rounding. */
1190 void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sample spec */) {
1198 pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
1201 pa_log_debug("rewind(%lu, %lu)", (unsigned long) nbytes, (unsigned long) i->thread_info.rewrite_nbytes);
1205 sink_input_nbytes = pa_resampler_request(i->thread_info.resampler, nbytes);
1207 if (nbytes > 0 && !i->thread_info.dont_rewind_render) {
1208 pa_log_debug("Have to rewind %lu bytes on render memblockq.", (unsigned long) nbytes);
1209 pa_memblockq_rewind(i->thread_info.render_memblockq, nbytes);
1228 max_rewrite = nbytes;
1229 if (nbytes > 0)
1320 void pa_sink_input_update_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */) {
1327 pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
1329 pa_memblockq_set_maxrewind(i->thread_info.render_memblockq, nbytes);
1331 max_rewind = pa_resampler_request(i->thread_info.resampler, nbytes);
1343 void pa_sink_input_update_max_request(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */) {
1347 pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
1350 i->update_max_request(i, pa_resampler_request(i->thread_info.resampler, nbytes));
1654 void pa_sink_input_set_property_arbitrary(pa_sink_input *i, const char *key, const uint8_t *value, size_t nbytes) {
1664 if (value && nbytes == old_nbytes && !memcmp(value, old_value, nbytes))
1677 pa_proplist_set(i->proplist, key, value, nbytes);
1696 size_t nbytes;
1713 pa_proplist_get(p, key, (const void **) &value, &nbytes);
1714 pa_sink_input_set_property_arbitrary(i, key, value, nbytes);
1723 pa_proplist_get(p, key, (const void **) &value, &nbytes);
1724 pa_sink_input_set_property_arbitrary(i, key, value, nbytes);
2426 size_t nbytes /* in our sample spec */,
2445 /* nbytes = 0 means maximum rewind request */
2456 nbytes = PA_MAX(i->thread_info.rewrite_nbytes, nbytes);
2459 pa_log_debug("request rewrite %zu", nbytes);
2470 if (nbytes <= 0) {
2478 nbytes = i->sink->thread_info.max_rewind;
2480 nbytes += lbq;
2483 nbytes = pa_resampler_request(i->thread_info.resampler, nbytes);
2486 /* For virtual sinks there are two situations where nbytes may exceed max_rewind:
2501 if (nbytes > i->thread_info.playing_for)
2502 nbytes = (size_t) i->thread_info.playing_for;
2504 i->thread_info.rewrite_nbytes = nbytes;
2516 /* nbytes is -1 if some earlier rewind request had rewrite == false. */
2517 if (nbytes != (size_t) -1) {
2520 nbytes = pa_resampler_result(i->thread_info.resampler, nbytes);
2522 if (nbytes > lbq)
2523 pa_sink_request_rewind(i->sink, nbytes - lbq);