mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
audiotestsrc: properties are float
This commit is contained in:
parent
4d7311aca1
commit
e47bfa02e5
2 changed files with 4 additions and 4 deletions
|
|
@ -926,8 +926,8 @@ static int process_control(struct impl *this, struct spa_pod_sequence *sequence)
|
|||
{
|
||||
struct props *p = &this->props;
|
||||
spa_pod_object_parse(&c->value,
|
||||
":", SPA_PROP_frequency, "?d", &p->freq,
|
||||
":", SPA_PROP_volume, "?d", &p->volume,
|
||||
":", SPA_PROP_frequency, "?f", &p->freq,
|
||||
":", SPA_PROP_volume, "?f", &p->volume,
|
||||
NULL);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,10 +209,10 @@ static void update_props(struct data *data)
|
|||
spa_pod_builder_control_header(&b, 0, SPA_CONTROL_Properties);
|
||||
spa_pod_builder_push_object(&b, SPA_TYPE_OBJECT_Props, 0);
|
||||
spa_pod_builder_push_prop(&b, SPA_PROP_frequency, 0);
|
||||
spa_pod_builder_double(&b, ((sin(data->freq_accum) + 1.0) * 200.0) + 440.0);
|
||||
spa_pod_builder_float(&b, ((sin(data->freq_accum) + 1.0) * 200.0) + 440.0);
|
||||
spa_pod_builder_pop(&b);
|
||||
spa_pod_builder_push_prop(&b, SPA_PROP_volume, 0);
|
||||
spa_pod_builder_double(&b, (sin(data->volume_accum) / 2.0) + 0.5);
|
||||
spa_pod_builder_float(&b, (sin(data->volume_accum) / 2.0) + 0.5);
|
||||
spa_pod_builder_pop(&b);
|
||||
spa_pod_builder_pop(&b);
|
||||
pod = spa_pod_builder_pop(&b);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue