[MPlayer-cvslog] r30277 - trunk/libao2/ao_coreaudio.c
reimar
subversion at mplayerhq.hu
Mon Jan 11 20:26:33 CET 2010
Author: reimar
Date: Mon Jan 11 20:26:33 2010
New Revision: 30277
Log:
Use af_fmt2bits instead of reimplementing it.
Modified:
trunk/libao2/ao_coreaudio.c
Modified: trunk/libao2/ao_coreaudio.c
==============================================================================
--- trunk/libao2/ao_coreaudio.c Mon Jan 11 20:23:18 2010 (r30276)
+++ trunk/libao2/ao_coreaudio.c Mon Jan 11 20:26:33 2010 (r30277)
@@ -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
More information about the MPlayer-cvslog
mailing list