comparison libao2/ao_coreaudio.c @ 30242:03c1ad03f29d

MPlayer's format now correctly identifies AC3 as either little- or big-endian, remove unnecessary special workaround.
author reimar
date Mon, 11 Jan 2010 20:29:33 +0000
parents 53c43f683cd7
children 13b7aa964af6
comparison
equal deleted inserted replaced
30241:02b9c1a452e1 30242:03c1ad03f29d
326 } 326 }
327 else { 327 else {
328 // unsigned int 328 // unsigned int
329 inDesc.mFormatFlags = kAudioFormatFlagIsPacked; 329 inDesc.mFormatFlags = kAudioFormatFlagIsPacked;
330 } 330 }
331 if (AF_FORMAT_IS_AC3(format)) { 331 if ((format & AF_FORMAT_END_MASK) == AF_FORMAT_BE)
332 // Currently ac3 input (comes from hwac3) is always in native byte-order.
333 #if HAVE_BIGENDIAN
334 inDesc.mFormatFlags |= kAudioFormatFlagIsBigEndian;
335 #endif
336 }
337 else if ((format & AF_FORMAT_END_MASK) == AF_FORMAT_BE)
338 inDesc.mFormatFlags |= kAudioFormatFlagIsBigEndian; 332 inDesc.mFormatFlags |= kAudioFormatFlagIsBigEndian;
339 333
340 inDesc.mFramesPerPacket = 1; 334 inDesc.mFramesPerPacket = 1;
341 ao->packetSize = inDesc.mBytesPerPacket = inDesc.mBytesPerFrame = inDesc.mFramesPerPacket*channels*(inDesc.mBitsPerChannel/8); 335 ao->packetSize = inDesc.mBytesPerPacket = inDesc.mBytesPerFrame = inDesc.mFramesPerPacket*channels*(inDesc.mBitsPerChannel/8);
342 print_format(MSGL_V, "source:",&inDesc); 336 print_format(MSGL_V, "source:",&inDesc);