From 10321db5c0a745ac827befb508417918ca6c9fb2 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 11 Jan 2010 19:26:33 +0000 Subject: Use af_fmt2bits instead of reimplementing it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30277 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_coreaudio.c | 18 +----------------- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3