Remove some hardcoded channel number values

Mostly related to the number of channels.
This commit is contained in:
Wim Taymans 2025-04-04 15:04:09 +02:00
parent 5cfd461ba2
commit 722776cf65
5 changed files with 8 additions and 6 deletions

View file

@ -1777,7 +1777,7 @@ struct acp_card *acp_card_new(uint32_t index, const struct acp_dict *props)
impl->auto_port = true;
impl->ignore_dB = false;
impl->rate = DEFAULT_RATE;
impl->pro_channels = 64;
impl->pro_channels = ACP_MAX_CHANNELS;
if (props) {
if ((s = acp_dict_lookup(props, "api.alsa.use-ucm")) != NULL)

View file

@ -31,7 +31,6 @@ SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.audiomixer");
#define MAX_BUFFERS 64
#define MAX_PORTS 512
#define MAX_CHANNELS 64
#define MAX_ALIGN MIX_OPS_MAX_ALIGN
#define PORT_DEFAULT_VOLUME 1.0

View file

@ -17,6 +17,7 @@ extern "C" {
#include <spa/support/plugin.h>
#include <spa/monitor/device.h>
#include <spa/utils/hook.h>
#include <spa/param/audio/raw.h>
#include <dbus/dbus.h>
@ -655,7 +656,7 @@ struct spa_bt_transport {
struct spa_list bap_transport_linked;
uint32_t n_channels;
uint32_t channels[64];
uint32_t channels[SPA_AUDIO_MAX_CHANNELS];
struct spa_bt_transport_volume volumes[SPA_BT_VOLUME_ID_TERM];