osx_buffer *from; /* Current buffers */
osx_buffer *to;
unsigned samplerate;
+ unsigned channels;
};
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 */