Improve some debug

This commit is contained in:
Wim Taymans 2019-10-02 18:02:07 +02:00
parent 6e0ffb0c47
commit e04d58ee3a
12 changed files with 24 additions and 21 deletions

View file

@ -804,14 +804,13 @@ impl_node_port_use_buffers(void *object,
if (direction != this->direction)
port_id++;
spa_log_debug(this->log, NAME" %p: %d %d:%d", this,
n_buffers, direction, port_id);
if ((res = spa_node_port_use_buffers(this->target,
direction, port_id, flags, buffers, n_buffers)) < 0)
return res;
spa_log_debug(this->log, NAME" %p: %d %d:%d", this,
n_buffers, direction, port_id);
if (n_buffers > 0 && this->use_converter) {
if (port_id == 0)
res = negotiate_buffers(this);

View file

@ -918,7 +918,7 @@ static inline int handle_monitor(struct impl *this, const void *data, int n_samp
if (SPA_FLAG_IS_SET(dd->flags, SPA_DATA_FLAG_DYNAMIC))
dd->data = (void*)data;
else
memcpy(dd->data, data, size);
spa_memcpy(dd->data, data, size);
return res;
}

View file

@ -72,7 +72,7 @@ DEFINE_RESAMPLER(copy,arch) \
for (c = 0; c < r->channels; c++) { \
const float *s = src[c]; \
float *d = dst[c]; \
memcpy(&d[offs], &s[index + n_taps2], \
spa_memcpy(&d[offs], &s[index + n_taps2], \
to_copy * sizeof(float)); \
} \
index += to_copy; \

View file

@ -171,7 +171,7 @@ static void impl_native_process(struct resample *r,
* we have less, refill the history. */
refill = SPA_MIN(*in_len, n_taps-1);
for (c = 0; c < r->channels; c++)
memcpy(&history[c][hist], s[c], refill * sizeof(float));
spa_memcpy(&history[c][hist], s[c], refill * sizeof(float));
if (hist + refill < n_taps) {
/* not enough in the history, keep the input in
@ -206,7 +206,7 @@ static void impl_native_process(struct resample *r,
/* not enough input data remaining for more output,
* copy to history */
for (c = 0; c < r->channels; c++)
memcpy(history[c], &s[c][in], remain * sizeof(float));
spa_memcpy(history[c], &s[c][in], remain * sizeof(float));
} else {
/* we have enough input data remaining to produce
* more output ask to resubmit. */
@ -230,7 +230,7 @@ static void impl_native_process(struct resample *r,
if (remain) {
/* move history */
for (c = 0; c < r->channels; c++)
memmove(history[c], &history[c][in], remain * sizeof(float));
spa_memmove(history[c], &history[c][in], remain * sizeof(float));
}
spa_log_trace_fp(r->log, "native %p: in:%d remain:%d", r, in, remain);

View file

@ -740,7 +740,7 @@ static int impl_node_process(void *object)
b = &port->buffers[io->buffer_id];
src = &b->outbuf->datas[0];
memcpy(dst, src->data, n_frames * port->stride);
spa_memcpy(dst, src->data, n_frames * port->stride);
io->status = SPA_STATUS_NEED_DATA;

View file

@ -758,7 +758,7 @@ static int impl_node_process(void *object)
src = jack_port_get_buffer(port->jack_port, n_frames);
d = &b->outbuf->datas[0];
memcpy(d->data, src, n_frames * port->stride);
spa_memcpy(d->data, src, n_frames * port->stride);
d->chunk->offset = 0;
d->chunk->size = n_frames * port->stride;
d->chunk->stride = port->stride;