From: Andre Noll Date: Sun, 20 Aug 2006 13:49:36 +0000 (+0200) Subject: osx_write: decrypt format settings. X-Git-Tag: v0.2.14~47 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=ee055536fd64fa1c382d0c8f81c242ef2e8a79db;p=paraslash.git osx_write: decrypt format settings. What a sick kind of programming that was. Change it to readable, but equivalent, code. --- diff --git a/osx_writer.c b/osx_writer.c index 2af553db..c4a97e4b 100644 --- a/osx_writer.c +++ b/osx_writer.c @@ -227,8 +227,10 @@ static int osx_writer_open(struct writer_node *wn) * We produce 2-channel audio. Now if we have a mega-super-hyper card for our * audio, it is its problem to convert it to 8-, 16-, 32- or 1024-channel data. */ - format.mBytesPerFrame = (format.mFramesPerPacket = 1) - * (format.mBytesPerPacket = (format.mChannelsPerFrame = 2) * sizeof(float)); + format.mFramesPerPacket = 1; + format.mChannelsPerFrame = 2; + format.mBytesPerPacket = format.mChannelsPerFrame * sizeof(float); + format.mBytesPerFrame = format.mFramesPerPacket * format.mBytesPerPacket; /* one of the most constant constants of the whole computer history */ format.mBitsPerChannel = sizeof(float) * 8; ret = -E_STREAM_FORMAT;