try
{
decode_frame();
- format = (priv->frame.header.mode==MAD_MODE_SINGLE_CHANNEL ? MONO16 : STEREO16);
+ format = create_format(2, MAD_NCHANNELS(&priv->frame.header));
freq = priv->frame.header.samplerate;
}
catch(...)
unsigned Mp3Decoder::read(char *buf, unsigned len)
{
- unsigned nchan = (format==STEREO16 ? 2 : 1);
+ unsigned nchan = get_n_channels(format);
mad_pcm &pcm = priv->synth.pcm;
unsigned pos = 0;