mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
parent
4dcd0dacc9
commit
72d70b0f48
9 changed files with 34 additions and 18 deletions
|
|
@ -199,7 +199,7 @@ static void sanitize_map(snd_pcm_chmap_t* map)
|
|||
uint32_t i, j, pos;
|
||||
|
||||
for (i = 0; i < map->channels; i++) {
|
||||
if (map->pos[i] < 0 || map->pos[i] > SND_CHMAP_LAST)
|
||||
if (map->pos[i] > SND_CHMAP_LAST)
|
||||
map->pos[i] = SND_CHMAP_UNKNOWN;
|
||||
|
||||
p = 1LL << map->pos[i];
|
||||
|
|
|
|||
|
|
@ -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