mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
audioconvert: use position rate as default rate
This commit is contained in:
parent
c14881fbe2
commit
f026e95585
4 changed files with 38 additions and 5 deletions
|
|
@ -96,6 +96,8 @@ struct impl {
|
|||
struct spa_log *log;
|
||||
struct spa_cpu *cpu;
|
||||
|
||||
struct spa_io_position *io_position;
|
||||
|
||||
uint64_t info_all;
|
||||
struct spa_node_info info;
|
||||
struct spa_param_info params[8];
|
||||
|
|
@ -236,7 +238,20 @@ static int impl_node_enum_params(void *object, int seq,
|
|||
|
||||
static int impl_node_set_io(void *object, uint32_t id, void *data, size_t size)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
struct impl *this = object;
|
||||
|
||||
spa_return_val_if_fail(this != NULL, -EINVAL);
|
||||
|
||||
spa_log_debug(this->log, NAME " %p: io %d %p/%zd", this, id, data, size);
|
||||
|
||||
switch (id) {
|
||||
case SPA_IO_Position:
|
||||
this->io_position = data;
|
||||
break;
|
||||
default:
|
||||
return -ENOENT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue