Commit bba10a0e authored by Monty Montgomery's avatar Monty Montgomery

Update 24 bit sample handling in alsa plugin to deal with packed and unpacked formats.


git-svn-id: http://svn.xiph.org/trunk/ao@19478 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent d292396b
dnl Process this file with autoconf to produce a configure script.
AC_INIT([libao],[1.2.1],[monty@xiph.org])
AC_INIT([libao],[1.2.2],[monty@xiph.org])
AM_INIT_AUTOMAKE([gnu 1.6])
AM_MAINTAINER_MODE
......@@ -10,7 +10,7 @@ AM_DISABLE_STATIC
dnl Library versioning
LIB_CURRENT=5
LIB_REVISION=0
LIB_REVISION=1
LIB_AGE=1
AC_SUBST(LIB_CURRENT)
AC_SUBST(LIB_REVISION)
......
......@@ -209,7 +209,7 @@ static inline int alsa_get_sample_bitformat(int bitwidth, int bigendian, ao_devi
break;
case 16 : ret = SND_PCM_FORMAT_S16;
break;
case 24 : ret = SND_PCM_FORMAT_S24;
case 24 : ret = bigendian?SND_PCM_FORMAT_S24_3BE:SND_PCM_FORMAT_S24_3LE;
break;
case 32 : ret = SND_PCM_FORMAT_S32;
break;
......@@ -348,6 +348,11 @@ static inline int alsa_set_hwparams(ao_device *device,
break;
}
case SND_PCM_FORMAT_S24:
/* there are packed and unpacked '24 bit' formats, try the unpacked */
if (!snd_pcm_hw_params_set_format(internal->pcm_handle,
params, SND_PCM_FORMAT_S24)){
break;
}
if (!snd_pcm_hw_params_set_format(internal->pcm_handle,
params, SND_PCM_FORMAT_S32)){
adebug("snd_pcm_hw_params_set_format() unable to open %d bit playback.\n",format->bits);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment