summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-11 19:26:33 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-11 19:26:33 +0000
commit10321db5c0a745ac827befb508417918ca6c9fb2 (patch)
tree0d6634610d3f5a3e060afcfd2018d0f9aced127c
parent6910cdaae18a9b97527ca0978a9b33a3e52866b1 (diff)
downloadmpv-10321db5c0a745ac827befb508417918ca6c9fb2.tar.bz2
mpv-10321db5c0a745ac827befb508417918ca6c9fb2.tar.xz
Use af_fmt2bits instead of reimplementing it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30277 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libao2/ao_coreaudio.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c
index 122607ec63..6a481724fe 100644
--- a/libao2/ao_coreaudio.c
+++ b/libao2/ao_coreaudio.c
@@ -314,23 +314,7 @@ int b_alive;
inDesc.mSampleRate=rate;
inDesc.mFormatID=ao->b_supports_digital ? kAudioFormat60958AC3 : kAudioFormatLinearPCM;
inDesc.mChannelsPerFrame=channels;
- switch(format&AF_FORMAT_BITS_MASK){
- case AF_FORMAT_8BIT:
- inDesc.mBitsPerChannel=8;
- break;
- case AF_FORMAT_16BIT:
- inDesc.mBitsPerChannel=16;
- break;
- case AF_FORMAT_24BIT:
- inDesc.mBitsPerChannel=24;
- break;
- case AF_FORMAT_32BIT:
- inDesc.mBitsPerChannel=32;
- break;
- default:
- ao_msg(MSGT_AO, MSGL_WARN, "Unsupported format (0x%08x)\n", format);
- goto err_out;
- }
+ inDesc.mBitsPerChannel=af_fmt2bits(format);
if((format&AF_FORMAT_POINT_MASK)==AF_FORMAT_F) {
// float