mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
Add sync and async support in *testsrc
Make minumum alsa latency configurable.
This commit is contained in:
parent
01c13adab5
commit
5c32690cc8
13 changed files with 186 additions and 153 deletions
|
|
@ -117,7 +117,6 @@ spa_alsa_set_format (SpaALSAState *state, SpaAudioInfo *fmt, SpaPortFormatFlags
|
|||
SpaAudioInfoRaw *info = &fmt->info.raw;
|
||||
snd_pcm_t *hndl;
|
||||
unsigned int periods;
|
||||
SpaALSAProps *props = &state->props;
|
||||
|
||||
if ((err = spa_alsa_open (state)) < 0)
|
||||
return err;
|
||||
|
|
@ -195,8 +194,6 @@ set_swparams (SpaALSAState *state)
|
|||
snd_pcm_sw_params_t *params;
|
||||
snd_pcm_uframes_t boundary;
|
||||
|
||||
SpaALSAProps *props = &state->props;
|
||||
|
||||
snd_pcm_sw_params_alloca (¶ms);
|
||||
|
||||
/* get the current params */
|
||||
|
|
@ -618,7 +615,7 @@ spa_alsa_start (SpaALSAState *state, bool xrun_recover)
|
|||
state->source.rmask = 0;
|
||||
spa_loop_add_source (state->data_loop, &state->source);
|
||||
|
||||
state->threshold = 1024;
|
||||
state->threshold = state->props.min_latency;
|
||||
|
||||
if (state->stream == SND_PCM_STREAM_PLAYBACK) {
|
||||
state->alsa_started = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue