summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2013-09-30 10:25:41 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2013-09-30 10:25:41 +0300
commitd4f4833db71a2566b79ed343070854a1bd4c916b (patch)
tree57b58cf5d8a3c640a0607dae5d6d1e9288b1b045 /src
parentc4ba81f5006174c35a52b1090b2c654cf8bdb55c (diff)
downloadxine-lib-d4f4833db71a2566b79ed343070854a1bd4c916b.tar.gz
xine-lib-d4f4833db71a2566b79ed343070854a1bd4c916b.tar.bz2
audio_alsa_out: snd_pcm_sw_params_set_xfer_align() is deprecated
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) {