mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
format: make helper functions to create formats
Use helper functions to create a fully specified format.
This commit is contained in:
parent
80de83f38a
commit
514528f2c7
24 changed files with 158 additions and 430 deletions
|
|
@ -112,14 +112,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
data.remote = pw_stream_get_remote(data.stream);
|
||||
|
||||
params[0] = spa_pod_builder_object(&b,
|
||||
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
||||
"I", SPA_MEDIA_TYPE_audio,
|
||||
"I", SPA_MEDIA_SUBTYPE_raw,
|
||||
":", SPA_FORMAT_AUDIO_format, "I", SPA_AUDIO_FORMAT_F32,
|
||||
":", SPA_FORMAT_AUDIO_layout, "I", SPA_AUDIO_LAYOUT_INTERLEAVED,
|
||||
":", SPA_FORMAT_AUDIO_channels, "i", DEFAULT_CHANNELS,
|
||||
":", SPA_FORMAT_AUDIO_rate, "i", DEFAULT_RATE);
|
||||
params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat,
|
||||
&SPA_AUDIO_INFO_RAW_INIT(
|
||||
.format = SPA_AUDIO_FORMAT_F32,
|
||||
.layout = SPA_AUDIO_LAYOUT_INTERLEAVED,
|
||||
.channels = DEFAULT_CHANNELS,
|
||||
.rate = DEFAULT_RATE ));
|
||||
|
||||
pw_stream_connect(data.stream,
|
||||
PW_DIRECTION_OUTPUT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue