mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
prefer 48KHz and 32 bit samples when we can
This commit is contained in:
parent
f5f1a435cc
commit
2e0e68e46e
5 changed files with 10 additions and 8 deletions
|
|
@ -195,7 +195,7 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
|
|||
prop = spa_pod_builder_deref(&b,
|
||||
spa_pod_builder_push_prop(&b, state->type.format_audio.rate, SPA_POD_PROP_RANGE_NONE));
|
||||
|
||||
spa_pod_builder_int(&b, SPA_CLAMP(44100, min, max));
|
||||
spa_pod_builder_int(&b, SPA_CLAMP(48000, min, max));
|
||||
if (min != max) {
|
||||
spa_pod_builder_int(&b, min);
|
||||
spa_pod_builder_int(&b, max);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#include "module-media-session/audio-dsp.h"
|
||||
|
||||
#define DEFAULT_CHANNELS 2
|
||||
#define DEFAULT_SAMPLE_RATE 44100
|
||||
#define DEFAULT_SAMPLE_RATE 48000
|
||||
#define DEFAULT_BUFFER_SIZE (64 * sizeof(float))
|
||||
#define MAX_BUFFER_SIZE (1024 * sizeof(float))
|
||||
|
||||
|
|
|
|||
|
|
@ -495,9 +495,9 @@ static int port_enum_formats(struct spa_node *node,
|
|||
type->param.idEnumFormat, type->spa_format,
|
||||
"I", t->media_type.audio,
|
||||
"I", t->media_subtype.raw,
|
||||
":", t->format_audio.format, "Ieu", t->audio_format.S16,
|
||||
SPA_POD_PROP_ENUM(2, t->audio_format.S16,
|
||||
t->audio_format.S32),
|
||||
":", t->format_audio.format, "Ieu", t->audio_format.S32,
|
||||
SPA_POD_PROP_ENUM(2, t->audio_format.S32,
|
||||
t->audio_format.S16),
|
||||
":", t->format_audio.layout, "i", SPA_AUDIO_LAYOUT_INTERLEAVED,
|
||||
":", t->format_audio.rate, "iru", n->sample_rate,
|
||||
SPA_POD_PROP_MIN_MAX(1, INT32_MAX),
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s
|
|||
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
uint32_t i, offset, n_params;
|
||||
uint32_t max_buffers;
|
||||
size_t minsize = 1024, stride = 0;
|
||||
size_t minsize = 8192, stride = 0;
|
||||
size_t data_sizes[1];
|
||||
ssize_t data_strides[1];
|
||||
|
||||
|
|
@ -670,7 +670,8 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s
|
|||
minsize, stride, max_buffers);
|
||||
} else {
|
||||
pw_log_warn("no buffers param");
|
||||
minsize = 1024;
|
||||
minsize = 8192;
|
||||
max_buffers = 4;
|
||||
}
|
||||
|
||||
/* when one of the ports can allocate buffer memory, set the minsize to
|
||||
|
|
|
|||
|
|
@ -654,8 +654,9 @@ static void node_process(void *data, int status)
|
|||
|
||||
if (node->driver) {
|
||||
if (!node->exported) {
|
||||
if (node->rt.driver->state->pending == 0 || !node->remote)
|
||||
if (node->rt.driver->state->pending == 0 || !node->remote) {
|
||||
spa_graph_run(node->rt.driver);
|
||||
}
|
||||
else
|
||||
spa_graph_node_trigger(&node->rt.node);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue