summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio_out/audio_alsa_out.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index 2f6e742c3..8a462e47c 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -574,6 +574,10 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"audio_alsa_out: Unable to determine current swparams: %s\n", snd_strerror(err));
goto close;
}
+
+#if defined(SND_LIB_VERSION) && SND_LIB_VERSION >= 0x010016
+ /* snd_pcm_sw_params_set_xfer_align() is deprecated, alignment is always 1 */
+#else
/* align all transfers to 1 sample */
err = snd_pcm_sw_params_set_xfer_align(this->audio_fd, swparams, 1);
if (err < 0) {
@@ -581,6 +585,8 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"audio_alsa_out: Unable to set transfer alignment: %s\n", snd_strerror(err));
goto close;
}
+#endif
+
/* allow the transfer when at least period_size samples can be processed */
err = snd_pcm_sw_params_set_avail_min(this->audio_fd, swparams, period_size);
if (err < 0) {