small cleanups

This commit is contained in:
Wim Taymans 2018-05-17 17:26:09 +02:00
parent 65e00631da
commit c61d579d99
9 changed files with 34 additions and 19 deletions

View file

@ -601,7 +601,8 @@ static int impl_node_process(struct spa_node *node)
spa_list_append(&this->ready, &b->link);
SPA_FLAG_UNSET(b->flags, BUFFER_FLAG_OUT);
this->threshold = b->buf->datas[0].chunk->size / this->frame_size;
this->threshold = SPA_MIN(b->buf->datas[0].chunk->size / this->frame_size,
this->props.max_latency);
spa_alsa_write(this, 0);

View file

@ -47,7 +47,7 @@ int spa_alsa_close(struct state *state)
if (!state->opened)
return 0;
spa_log_info(state->log, "Device closing");
spa_log_info(state->log, "Device '%s' closing", state->props.device);
CHECK(snd_pcm_close(state->hndl), "close failed");
close(state->timerfd);