mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Remove some hardcoded channel number values
Mostly related to the number of channels.
This commit is contained in:
parent
5cfd461ba2
commit
722776cf65
5 changed files with 8 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ static void rtp_opus_process_capture(void *data)
|
|||
static int rtp_opus_init(struct impl *impl, enum spa_direction direction)
|
||||
{
|
||||
int err;
|
||||
unsigned char mapping[64];
|
||||
unsigned char mapping[SPA_AUDIO_MAX_CHANNELS];
|
||||
uint32_t i;
|
||||
|
||||
if (impl->psamples >= 2880)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@
|
|||
PW_LOG_TOPIC_EXTERN(log_stream);
|
||||
#define PW_LOG_TOPIC_DEFAULT log_stream
|
||||
|
||||
#define MAX_BUFFERS 64
|
||||
#define MAX_BUFFERS 64u
|
||||
#define MAX_VALUES 256u
|
||||
|
||||
#define MASK_BUFFERS (MAX_BUFFERS-1)
|
||||
|
||||
|
|
@ -72,7 +73,7 @@ struct control {
|
|||
struct pw_stream_control control;
|
||||
struct spa_pod *info;
|
||||
unsigned int emitted:1;
|
||||
float values[64];
|
||||
float values[MAX_VALUES];
|
||||
};
|
||||
|
||||
struct stream {
|
||||
|
|
@ -1354,6 +1355,7 @@ static int node_event_param(void *object, int seq,
|
|||
if ((values = spa_pod_get_array(&prop->value, &n_values)) == NULL ||
|
||||
!spa_pod_is_float(SPA_POD_ARRAY_CHILD(&prop->value)))
|
||||
continue;
|
||||
n_values = SPA_MIN(n_values, MAX_VALUES);
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue