Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Commit

Permalink
alsa: update to new pod api
Browse files Browse the repository at this point in the history
  • Loading branch information
wtay committed Jan 16, 2019
1 parent 5a8c6d4 commit ea1f9e1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions alsa-plugins/pcm_pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,13 @@ static void on_stream_format_changed(void *data, const struct spa_pod *format)
pw_log_info("buffer_size:%lu period_size:%lu buffers:%u stride:%u size:%u min_avail:%lu",
io->buffer_size, io->period_size, buffers, stride, size, pw->min_avail);

params[n_params++] = spa_pod_builder_object(&b,
params[n_params++] = spa_pod_builder_add_object(&b,
SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
SPA_PARAM_BUFFERS_buffers, &SPA_POD_CHOICE_RANGE_Int(buffers, MIN_BUFFERS, MAX_BUFFERS),
SPA_PARAM_BUFFERS_blocks, &SPA_POD_Int(1),
SPA_PARAM_BUFFERS_size, &SPA_POD_CHOICE_RANGE_Int(size, size, INT_MAX),
SPA_PARAM_BUFFERS_stride, &SPA_POD_Int(stride),
SPA_PARAM_BUFFERS_align, &SPA_POD_Int(16),
0);
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(buffers, MIN_BUFFERS, MAX_BUFFERS),
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(size, size, INT_MAX),
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(stride),
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));

pw_stream_finish_format(pw->stream, 0, params, n_params);
}
Expand Down

0 comments on commit ea1f9e1

Please sign in to comment.