In case you're still interested in playing around with it (I may have goofed in my haste to test), I'm attaching a code excerpt which decodes the layer III side information from the bitstream, immediately following the header (and CRC, if there is one.) This isn't the entire frame, as the main_data portion can be located before the header and continues after the side information. The main_data_begin is a negative-offset pointer from the beginning of the frame to the beginning of the main_data. Code to decode the main_data (which includes the Huffman codes) is not included.

The bit_read() routine is supposed to read the number of specified bits from the stream and return their value. The code should be enough to show you where the global_gain field is, among others. To understand all the fields though you really need to have a copy of the MPEG audio spec.

I don't know why the BBS isn't registering my attachment, so get the code from here.

Cheers,
-v