mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez: use function to get the channel position from a name
This commit is contained in:
parent
6465a63bf6
commit
7177f8269d
1 changed files with 1 additions and 7 deletions
|
|
@ -253,14 +253,8 @@ static const struct surround_encoder_mapping surround_encoders[] = {
|
|||
static uint32_t bt_channel_from_name(const char *name)
|
||||
{
|
||||
size_t i;
|
||||
enum spa_audio_channel position = SPA_AUDIO_CHANNEL_UNKNOWN;
|
||||
enum spa_audio_channel position = spa_type_audio_channel_from_short_name(name);
|
||||
|
||||
for (i = 0; spa_type_audio_channel[i].name; i++) {
|
||||
if (spa_streq(name, spa_debug_type_short_name(spa_type_audio_channel[i].name))) {
|
||||
position = spa_type_audio_channel[i].type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < SPA_N_ELEMENTS(audio_locations); i++) {
|
||||
if (position == audio_locations[i].position)
|
||||
return audio_locations[i].mask;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue