public override bool read_sampledata(Bitstream stream)
{
bool returnvalue = base.read_sampledata(stream);
if (channel2_allocation != 0)
if (groupingtable[1] != null)
{
int samplecode = stream.get_bits(channel2_codelength[0]);
// create requantized samples:
samplecode += samplecode << 1;
/*
float[] target = channel2_samples;
float[] source = channel2_groupingtable[0];
int tmp = 0;
int temp = 0;
target[tmp++] = source[samplecode + temp];
temp++;
target[tmp++] = source[samplecode + temp];
temp++;
target[tmp] = source[samplecode + temp];
// memcpy (channel2_samples, channel2_groupingtable + samplecode, 3 * sizeof (real));
*/
float[] target = channel2_samples;
float[] source = groupingtable[1];
int tmp = 0;
int temp = samplecode;
target[tmp] = source[temp];
temp++; tmp++;
target[tmp] = source[temp];
temp++; tmp++;
target[tmp] = source[temp];
}
else
{
channel2_samples[0] = (float) ((stream.get_bits(channel2_codelength[0])) * channel2_factor[0] - 1.0);
channel2_samples[1] = (float) ((stream.get_bits(channel2_codelength[0])) * channel2_factor[0] - 1.0);
channel2_samples[2] = (float) ((stream.get_bits(channel2_codelength[0])) * channel2_factor[0] - 1.0);
}
return returnvalue;
}