#include <stdlib.h>
typedef struct RTPh
  {
  unsigned int V:2; /* version */
  unsigned int P:1; /* padding */
  unsigned int X:1; /* extended header */
  unsigned int CC:4; /* contributing sources count */
  unsigned int M:1; /* marker */
  unsigned int PT:7; /* payload type */
  unsigned int SN:16; /* sequence number */
  unsigned int TS:32; /* timestamp */
  unsigned int SSRC:32; /* source id */
  } RTPheader;

typedef struct MSh
  {
  unsigned int FFN:32; /* first frame # */
  unsigned int numFrames:16; /* how many frames */
  unsigned int lastFrameOffset:16; /* the offset of the first frame in the next packet */
  } MSheader;

typedef struct mp3h
  {
  unsigned int sync:12; /* sync word */
  unsigned int ID:1; /* id */
  unsigned int L:2; /* layer# */
  unsigned int PB:1; /* protection bit */
  unsigned int BRI:4; /* bitrate index */
  unsigned int SF:2; /* sampling frequency */
  unsigned int PaB:1; /* padding bit */
  unsigned int PrB:1; /* protection bit */
  unsigned int M:2; /* mode */
  unsigned int ME:2; /* mode extension */
  unsigned int CR:1; /* copyright */
  unsigned int CO:1; /* copy or original */
  unsigned int E:2; /* emphasis */
  unsigned int offset:9; /* not in header, but we use it */
  unsigned int padding:7; /* rest of side info, irrelevant */
  char useless[30];
  } mp3header;

int bitRates[16]={0,32000,40000,48000,56000,64000,80000,96000,112000,128000,160000,192000,224000,256000,320000,-1};
int samplingFrequencies[4]={44100,48000,32000,0};

