mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
test: pass device in args
This commit is contained in:
parent
1d8504565a
commit
01246f399e
1 changed files with 3 additions and 3 deletions
|
|
@ -277,7 +277,7 @@ do_invoke (SpaLoop *loop,
|
|||
}
|
||||
|
||||
static SpaResult
|
||||
make_nodes (AppData *data)
|
||||
make_nodes (AppData *data, const char *device)
|
||||
{
|
||||
SpaResult res;
|
||||
SpaProps *props;
|
||||
|
|
@ -295,7 +295,7 @@ make_nodes (AppData *data)
|
|||
|
||||
spa_pod_builder_init (&b, buffer, sizeof (buffer));
|
||||
spa_pod_builder_props (&b, &f[0], data->type.props,
|
||||
SPA_POD_PROP (&f[1], data->type.props_device, 0, SPA_POD_TYPE_STRING, 1, "hw:1"),
|
||||
SPA_POD_PROP (&f[1], data->type.props_device, 0, SPA_POD_TYPE_STRING, 1, device ? device : "hw:0"),
|
||||
SPA_POD_PROP (&f[1], data->type.props_min_latency, 0, SPA_POD_TYPE_INT, 1, 64));
|
||||
props = SPA_POD_BUILDER_DEREF (&b, f[0].ref, SpaProps);
|
||||
|
||||
|
|
@ -490,7 +490,7 @@ main (int argc, char *argv[])
|
|||
|
||||
init_type (&data.type, data.map);
|
||||
|
||||
if ((res = make_nodes (&data)) < 0) {
|
||||
if ((res = make_nodes (&data, argc > 1 ? argv[1] : NULL)) < 0) {
|
||||
printf ("can't make nodes: %d\n", res);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue