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:
Takashi Iwai 2008-01-08 18:39:06 +01:00
parent 4cb74aed89
commit 9abeb5843a
2 changed files with 1 additions and 17 deletions

View file

@ -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(&params);
@ -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);

View file

@ -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) {