An audio codec losslessly encodes audio data into a sequence of analysis
windows in a scalable bitstream. This is suitably done by separating the
audio data into MSB and LSB portions and encoding each with a different
lossless algorithm. An authoring tool compares the buffered payload to an
allowed payload for each window and selectively scales the losslessly
encoded audio data, suitably the LSB portion, in the non-conforming
windows to reduce the encoded payload, hence buffered payload. This
approach satisfies the media bit rate and buffer capacity constraints
without having to filter the original audio data, reencode or otherwise
disrupt the lossless bitstream.