add defines for max buffer size

This commit is contained in:
Wim Taymans 2019-10-24 12:51:34 +02:00
parent f30b4bf506
commit 81fc595e3d
5 changed files with 11 additions and 8 deletions

View file

@ -151,8 +151,8 @@ struct impl {
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) == 0)
static const uint32_t default_min_latency = 128;
static const uint32_t default_max_latency = 1024;
static const uint32_t default_min_latency = MIN_LATENCY;
static const uint32_t default_max_latency = MAX_LATENCY;
static void reset_props(struct props *props)
{

View file

@ -127,8 +127,8 @@ struct impl {
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_OUTPUT && (p) == 0)
static const uint32_t default_min_latency = 128;
static const uint32_t default_max_latency = 1024;
static const uint32_t default_min_latency = MIN_LATENCY;
static const uint32_t default_max_latency = MAX_LATENCY;
static void reset_props(struct props *props)
{

View file

@ -40,6 +40,8 @@ extern "C" {
#define BLUEZ_MEDIA_ENDPOINT_INTERFACE BLUEZ_SERVICE ".MediaEndpoint1"
#define BLUEZ_MEDIA_TRANSPORT_INTERFACE BLUEZ_SERVICE ".MediaTransport1"
#define MIN_LATENCY 128
#define MAX_LATENCY 1024
#define ENDPOINT_INTROSPECT_XML \
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \

View file

@ -134,8 +134,8 @@ struct impl {
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) == 0)
static const uint32_t default_min_latency = 128;
static const uint32_t default_max_latency = 1024;
static const uint32_t default_min_latency = MIN_LATENCY;
static const uint32_t default_max_latency = MAX_LATENCY;
static void reset_props(struct props *props)
{

View file

@ -51,6 +51,7 @@ static void reset_props(struct props *props)
props->mute = DEFAULT_MUTE;
}
#define MAX_SAMPLES 1024
#define MAX_BUFFERS 16
struct buffer {
@ -381,9 +382,9 @@ impl_node_port_enum_params(void *object, int seq,
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(2, 1, MAX_BUFFERS),
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(
1024 * this->bpf,
MAX_SAMPLES * this->bpf,
16 * this->bpf,
INT32_MAX / this->bpf),
INT32_MAX),
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(0),
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
break;