X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=osx_writer.c;fp=osx_writer.c;h=54a1acd1e98e3c3ce597982cf7f05d56842e698b;hb=b5ff683a297e5223357c4edd968cc8e4ec17ed4f;hp=c4a97e4b5ae9c0f2575f8239bb79c43dab45a8f7;hpb=ee055536fd64fa1c382d0c8f81c242ef2e8a79db;p=paraslash.git diff --git a/osx_writer.c b/osx_writer.c index c4a97e4b..54a1acd1 100644 --- a/osx_writer.c +++ b/osx_writer.c @@ -51,6 +51,7 @@ struct private_osx_writer_data { osx_buffer *from; /* Current buffers */ osx_buffer *to; unsigned samplerate; + unsigned channels; }; @@ -223,12 +224,12 @@ static int osx_writer_open(struct writer_node *wn) format.mFormatFlags = kLinearPCMFormatFlagIsFloat | kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsBigEndian; - /* - * 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. - */ + if (!conf->channels_given && wng->channels) + powd->channels = *wng->channels; + else + powd->channels = conf->channels_arg; + format.mChannelsPerFrame = powd->channels; 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 */