summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-01-16 17:39:08 +0100
committerWim Taymans <wtaymans@redhat.com>2019-01-16 17:42:44 +0100
commitfa2d87792547a70642e47e267f9444b15c648b2f (patch)
tree894ea22fea91166b6c369293aa10cdd9797eac03
parente4bde735523fa5d0d88868391364d2e3d744d40c (diff)
audiotestsrc: use macros for parser
-rw-r--r--spa/plugins/audiotestsrc/audiotestsrc.c12
-rw-r--r--spa/plugins/test/fakesink.c2
-rw-r--r--spa/plugins/volume/volume.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/spa/plugins/audiotestsrc/audiotestsrc.c b/spa/plugins/audiotestsrc/audiotestsrc.c
index 5330de9c..1c2d9266 100644
--- a/spa/plugins/audiotestsrc/audiotestsrc.c
+++ b/spa/plugins/audiotestsrc/audiotestsrc.c
@@ -254,10 +254,10 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
}
spa_pod_parse_object(param,
SPA_TYPE_OBJECT_Props, NULL,
- SPA_PROP_live, "?b", &p->live,
- SPA_PROP_waveType, "?i", &p->wave,
- SPA_PROP_frequency, "?d", &p->freq,
- SPA_PROP_volume, "?d", &p->volume);
+ SPA_PROP_live, SPA_POD_OPT_Bool(&p->live),
+ SPA_PROP_waveType, SPA_POD_OPT_Int(&p->wave),
+ SPA_PROP_frequency, SPA_POD_OPT_Float(&p->freq),
+ SPA_PROP_volume, SPA_POD_OPT_Float(&p->volume));
if (p->live)
this->info.flags |= SPA_PORT_INFO_FLAG_LIVE;
@@ -925,8 +925,8 @@ static int process_control(struct impl *this, struct spa_pod_sequence *sequence)
struct props *p = &this->props;
spa_pod_parse_object(&c->value,
SPA_TYPE_OBJECT_Props, NULL,
- SPA_PROP_frequency, "?f", &p->freq,
- SPA_PROP_volume, "?f", &p->volume);
+ SPA_PROP_frequency, SPA_POD_OPT_Float(&p->freq),
+ SPA_PROP_volume, SPA_POD_OPT_Float(&p->volume));
break;
}
default:
diff --git a/spa/plugins/test/fakesink.c b/spa/plugins/test/fakesink.c
index 47bdffb0..f3c3362f 100644
--- a/spa/plugins/test/fakesink.c
+++ b/spa/plugins/test/fakesink.c
@@ -167,7 +167,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
}
spa_pod_parse_object(param,
SPA_TYPE_OBJECT_Props, NULL,
- SPA_PROP_live, "?b", &this->props.live);
+ SPA_PROP_live, SPA_POD_OPT_Bool(&this->props.live));
if (this->props.live)
this->info.flags |= SPA_PORT_INFO_FLAG_LIVE;
diff --git a/spa/plugins/volume/volume.c b/spa/plugins/volume/volume.c
index 0f04e443..cc882aec 100644
--- a/spa/plugins/volume/volume.c
+++ b/spa/plugins/volume/volume.c
@@ -207,8 +207,8 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
}
spa_pod_parse_object(param,
SPA_TYPE_OBJECT_Props, NULL,
- SPA_PROP_volume, "?d", &p->volume,
- SPA_PROP_mute, "?b", &p->mute);
+ SPA_PROP_volume, SPA_POD_OPT_Float(&p->volume),
+ SPA_PROP_mute, SPA_POD_OPT_Bool(&p->mute));
break;
}
default: