This adds support for more sample formats (U32, float BE, mu/A-law).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17572 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
cladisch 2006-02-10 09:20:08 +00:00
parent 7bb5f4e138
commit 508d589e21
1 changed files with 15 additions and 0 deletions

View File

@ -325,6 +325,12 @@ static int init(int rate_hz, int channels, int format, int flags)
case AF_FORMAT_S16_BE: case AF_FORMAT_S16_BE:
alsa_format = SND_PCM_FORMAT_S16_BE; alsa_format = SND_PCM_FORMAT_S16_BE;
break; break;
case AF_FORMAT_U32_LE:
alsa_format = SND_PCM_FORMAT_U32_LE;
break;
case AF_FORMAT_U32_BE:
alsa_format = SND_PCM_FORMAT_U32_BE;
break;
case AF_FORMAT_S32_LE: case AF_FORMAT_S32_LE:
alsa_format = SND_PCM_FORMAT_S32_LE; alsa_format = SND_PCM_FORMAT_S32_LE;
break; break;
@ -334,6 +340,15 @@ static int init(int rate_hz, int channels, int format, int flags)
case AF_FORMAT_FLOAT_LE: case AF_FORMAT_FLOAT_LE:
alsa_format = SND_PCM_FORMAT_FLOAT_LE; alsa_format = SND_PCM_FORMAT_FLOAT_LE;
break; break;
case AF_FORMAT_FLOAT_BE:
alsa_format = SND_PCM_FORMAT_FLOAT_BE;
break;
case AF_FORMAT_MU_LAW:
alsa_format = SND_PCM_FORMAT_MU_LAW;
break;
case AF_FORMAT_A_LAW:
alsa_format = SND_PCM_FORMAT_A_LAW;
break;
default: default:
alsa_format = SND_PCM_FORMAT_MPEG; //? default should be -1 alsa_format = SND_PCM_FORMAT_MPEG; //? default should be -1