final boolean hasInPoint = bitStream.readBit();
final long inPoint = hasInPoint ? bitStream.readUI32() : 0;
final long outPoint = hasOutPoint ? bitStream.readUI32() : 0;
final int loopCount = hasLoops ? bitStream.readUI16() : 0;
final int envPoints = hasEnvelope ? bitStream.readUI8() : 0;
final SoundEnvelope envelopeRecords[] = new SoundEnvelope[envPoints];
for (int i = 0; i < envPoints; i++)
{
envelopeRecords[i] = new SoundEnvelope();
envelopeRecords[i].setPos44(bitStream.readUI32());
envelopeRecords[i].setLeftLevel(bitStream.readUI16());
envelopeRecords[i].setRightLevel(bitStream.readUI16());
}