mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-29 12:10:06 +01:00
si-adapter: use the clock rate defined in pipewire.conf
This commit is contained in:
parent
7bc8302740
commit
5f9212c344
1 changed files with 9 additions and 1 deletions
|
|
@ -313,7 +313,15 @@ si_adapter_activate_execute_step (WpSessionItem * item,
|
|||
|
||||
/* now choose the DSP format: keep the chanels but use F32 plannar @ 48K */
|
||||
self->format.format = SPA_AUDIO_FORMAT_F32P;
|
||||
self->format.rate = 48000;
|
||||
self->format.rate = ({
|
||||
g_autoptr (WpCore) core = wp_proxy_get_core (WP_PROXY (self->node));
|
||||
g_autoptr (WpProperties) props = wp_core_get_remote_properties (core);
|
||||
const gchar *rate_str = wp_properties_get (props, "default.clock.rate");
|
||||
rate_str ? atoi (rate_str) : 48000;
|
||||
});
|
||||
|
||||
wp_debug_object (item, "format: F32P %uch @ %u",
|
||||
self->format.channels, self->format.rate);
|
||||
|
||||
port_format = format_audio_raw_build (&self->format);
|
||||
pod = wp_spa_pod_new_object ("PortConfig", "PortConfig",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue