mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:55:43 +01:00
Remove xfer_align
The xfer_align is the obsolete feature now. Remove it from aplay and speaker-test to avoid deprecated calls.
This commit is contained in:
parent
4cb74aed89
commit
9abeb5843a
2 changed files with 1 additions and 17 deletions
|
@ -863,7 +863,6 @@ static void set_params(void)
|
|||
snd_pcm_uframes_t buffer_size;
|
||||
int err;
|
||||
size_t n;
|
||||
snd_pcm_uframes_t xfer_align;
|
||||
unsigned int rate;
|
||||
snd_pcm_uframes_t start_threshold, stop_threshold;
|
||||
snd_pcm_hw_params_alloca(¶ms);
|
||||
|
@ -965,11 +964,6 @@ static void set_params(void)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
snd_pcm_sw_params_current(handle, swparams);
|
||||
err = snd_pcm_sw_params_get_xfer_align(swparams, &xfer_align);
|
||||
if (err < 0) {
|
||||
error(_("Unable to obtain xfer align\n"));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (avail_min < 0)
|
||||
n = chunk_size;
|
||||
else
|
||||
|
@ -977,7 +971,7 @@ static void set_params(void)
|
|||
err = snd_pcm_sw_params_set_avail_min(handle, swparams, n);
|
||||
|
||||
/* round up to closest transfer boundary */
|
||||
n = (buffer_size / xfer_align) * xfer_align;
|
||||
n = buffer_size;
|
||||
if (start_delay <= 0) {
|
||||
start_threshold = n + (double) rate * start_delay / 1000000;
|
||||
} else
|
||||
|
@ -995,9 +989,6 @@ static void set_params(void)
|
|||
err = snd_pcm_sw_params_set_stop_threshold(handle, swparams, stop_threshold);
|
||||
assert(err >= 0);
|
||||
|
||||
err = snd_pcm_sw_params_set_xfer_align(handle, swparams, xfer_align);
|
||||
assert(err >= 0);
|
||||
|
||||
if (snd_pcm_sw_params(handle, swparams) < 0) {
|
||||
error(_("unable to install sw params:"));
|
||||
snd_pcm_sw_params_dump(swparams, log);
|
||||
|
|
|
@ -404,13 +404,6 @@ static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams) {
|
|||
return err;
|
||||
}
|
||||
|
||||
/* align all transfers to 1 sample */
|
||||
err = snd_pcm_sw_params_set_xfer_align(handle, swparams, 1);
|
||||
if (err < 0) {
|
||||
fprintf(stderr, _("Unable to set transfer align for playback: %s\n"), snd_strerror(err));
|
||||
return err;
|
||||
}
|
||||
|
||||
/* write the parameters to the playback device */
|
||||
err = snd_pcm_sw_params(handle, swparams);
|
||||
if (err < 0) {
|
||||
|
|
Loading…
Reference in a new issue