-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/pr/205'
* origin/pr/205: (24 commits) Fix audio quality problems Pass streams to stream callbacks Avoid crashing during shutdown Do not rely on pw_context_get_support() on modern PipeWire Drop support for PipeWire < 0.3.30 Fix package descriptions Set node.rate for streams Add utility program to run any PipeWire stream Use libvchan_send and libvchan_recv for all-or-nothing ops Allow capturing vchan size in one go Better error reporting Avoid zeroing out recorded samples if underrun Atomically send initial stream states Use a #define for the stream rate Do not send QUBES_PA_SINK_UNCORK_CMD on overrun Fix error message when spa_format_parse() fails Downgrade unknown ID errors to warnings Reduce usage of confusing 'direction' flag Cleanup license metadata Obtain rate_match and position SPA IOs ...
- Loading branch information
Showing
7 changed files
with
879 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* SPDX-FileCopyrightText: Copyright © 2021-2023 Wim Taymans */ | ||
/* SPDX-FileCopyrightText: Copyright © 2021-2023 Demi Marie Obenour */ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* C11 headers */ | ||
#include <stddef.h> | ||
#include <stdlib.h> | ||
|
||
/* glibc headers */ | ||
#include <err.h> | ||
|
||
#include <pipewire/pipewire.h> | ||
#include <pipewire/impl-module.h> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
pw_init(&argc, &argv); | ||
if (argc < 3 || (argc & 1) == 0) | ||
errx(1, "Usage: module-loader MODULE ARGS [MODULE ARGS...]\nTotal number of arguments must be even."); | ||
struct pw_main_loop *loop = pw_main_loop_new(NULL); | ||
if (!loop) | ||
err(1, "pw_main_loop_new"); | ||
struct pw_context *context = pw_context_new(pw_main_loop_get_loop(loop), NULL, 0); | ||
if (!context) | ||
err(1, "pw_context_new"); | ||
struct pw_impl_module **modules = calloc(argc >> 1, sizeof(*modules)); | ||
if (!modules) | ||
err(1, "calloc(%d, %zu)", argc, sizeof(*modules)); | ||
for (int i = 1; i < argc - 1; i += 2) { | ||
if ((modules[i / 2] = pw_context_load_module(context, argv[i], argv[i + 1], NULL)) == NULL) | ||
err(1, "pw_context_load_module"); | ||
} | ||
int e = pw_main_loop_run(loop); | ||
if (e < 0) { | ||
errno = -e; | ||
err(1, "pw_main_loop_run()"); | ||
} | ||
pw_context_destroy(context); | ||
pw_main_loop_destroy(loop); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.