an audio decoder is provided with a programmable and re - configurable downmixing process . in one embodiment , the audio decoder includes a control module and a data path . the data path is configured to read , scale , add , and write audio samples to and from various audio channel frame buffers . the control module implements state diagrams which specify various control signals for directing the operations of the data path . the control module implements state diagrams for directing windowing and downmixing operations . the order in which these operations are performed may be reconfigurable , i . e . downmixing may be performed before or after windowing . this reconfigurability advantageously permits the system designer to trade a slight audio quality enhancement for a decreased memory requirement for some speaker configurations . the downmixing operation requires scaling coefficients which are provided by the control module . in one embodiment , the control module implements a standardized set of equations with a minimal number of downmixing coefficients , which advantageously allows the decoder to implement fully programmable downmix modes for both mpeg and dolby standards while minimizing decoder complexity . the coefficients may be set according to a downmix mode and bitstream - specified parameters , or in another embodiment , the coefficients are set by the user .