mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
parent
4dcd0dacc9
commit
72d70b0f48
9 changed files with 34 additions and 18 deletions
|
|
@ -1045,12 +1045,15 @@ impl_node_port_enum_params(void *object, int seq,
|
|||
{
|
||||
a2dp_sbc_t *config = this->transport->configuration;
|
||||
struct spa_audio_info_raw info = { 0, };
|
||||
int res;
|
||||
|
||||
info.format = SPA_AUDIO_FORMAT_S16;
|
||||
if ((info.rate = a2dp_sbc_get_frequency(config)) < 0)
|
||||
if ((res = a2dp_sbc_get_frequency(config)) < 0)
|
||||
return -EIO;
|
||||
if ((info.channels = a2dp_sbc_get_channels(config)) < 0)
|
||||
info.rate = res;
|
||||
if ((res = a2dp_sbc_get_channels(config)) < 0)
|
||||
return -EIO;
|
||||
info.channels = res;
|
||||
|
||||
switch (info.channels) {
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -702,12 +702,15 @@ impl_node_port_enum_params(void *object, int seq,
|
|||
{
|
||||
a2dp_sbc_t *config = this->transport->configuration;
|
||||
struct spa_audio_info_raw info = { 0, };
|
||||
int res;
|
||||
|
||||
info.format = SPA_AUDIO_FORMAT_S16;
|
||||
if ((info.rate = a2dp_sbc_get_frequency(config)) < 0)
|
||||
if ((res = a2dp_sbc_get_frequency(config)) < 0)
|
||||
return -EIO;
|
||||
if ((info.channels = a2dp_sbc_get_channels(config)) < 0)
|
||||
info.rate = res;
|
||||
if ((res = a2dp_sbc_get_channels(config)) < 0)
|
||||
return -EIO;
|
||||
info.channels = res;
|
||||
|
||||
switch (info.channels) {
|
||||
case 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue