----------========= FILE STRUCTURE AUDIO MPEG FILE ===========-----------
file

	a file has one or more 'frames'.

	a frame has a 'frame header' and 'frame data'
--------------------------------------------------------------------------
frame length

	the frame length depends on the format and can vary per frame.
	the frame ends before the next sync header (see frame header).
--------------------------------------------------------------------------
frame header

	the frame header of an audio mpeg file consist of 4 bytes, which
	are at the beginning of a frame. They don't have to be the same
	for every frame. (p.e. the bit 'padding' can change per frame)

	byte       0        1        2        3
	binary 11111111 111xabbc ddddeefg hhjjkmpp

		1 - sync header
		x - mpeg 2 type
		a - version
		b - layer
		c - error protection
		d - bit rate index
		e - sample rate index
		f - padding
		g - extension
		h - channel mode
		j - mode extension
		k - copyright
		m - original
		p - emphasis
--------------------------------------------------------------------------
1 - sync header

	must be 11111111 111xxxxx
--------------------------------------------------------------------------
x - mpeg 2 type

	0 = mpg-2.5
	1 = mpg-1 or mpg-2
--------------------------------------------------------------------------
a - version

	0 = mpg-2 (x = 1) or 2.5 (x = 0)
	1 = mpg-1
--------------------------------------------------------------------------
b - layer

	0 = layer-1
	3 = layer-2
	2 = layer-3
--------------------------------------------------------------------------
c - error protection

	0 = on
	1 = off
--------------------------------------------------------------------------
d - bit rate

	MPEG  |         1         |     2,2.5
	Layer |   1     2     3   |   1       2,3
	----------------------------------------------
	(hex) |                   |   
	$0    |    0     0     0  |   0         0
	$1    |   32    32    32  |   32        8
	$2    |   64    48    40  |   48       16
	$3    |   96    56    48  |   56       24
	$4    |  128    64    56  |   64       32
	$5    |  160    80    64  |   80       40
	$6    |  192    96    80  |   90       48
	$7    |  224   112    96  |  112       56
	$8    |  256   128   112  |  128       64
	$9    |  288   160   128  |  144       80
	$a    |  320   192   160  |  160       96
	$b    |  352   224   192  |  176      112
	$c    |  384   256   224  |  192      128
	$d    |  416   320   256  |  224      144
	$e    |  448   384   320  |  256      160
	$f    |    0     0    0   |    0        0
	
--------------------------------------------------------------------------
e - sample rate

	      mpg-1     mpg-2     mpg-2.5
	0 = 44.1 kHz    22 kHz    11 kHz
	1 =   48 kHz    24 kHz    12 kHz
	2 =   32 kHz    16 kHz    08 Khz
--------------------------------------------------------------------------
f - padding

	1 = unused bits are filled (padding required)
	0 = all bits in frame are used
--------------------------------------------------------------------------
g - extension 

	0 = none
	1 = private
--------------------------------------------------------------------------
h - channel mode

	0 = stereo
	1 = joint stereo
	2 = dual channel
	3 = mono
--------------------------------------------------------------------------
j = mode extension

	when encoding with joint stereo, this specifies to which freq.band
	it is bound.

            layer-1&2  layer-3
	0 =     4         0
	1 =     8         4
        2 =    12         8
        3 =    16        16
--------------------------------------------------------------------------
k - copyright

	0 = no
	1 = yes
--------------------------------------------------------------------------
m - original

	0 = no
	1 = yes
--------------------------------------------------------------------------
p - emphasis

	0 = none
	1 = 50/15 microseconds
	3 = CITT j.17
--------------------------------------------------------------------------
