

#ifndef MODES_H
#define MODES_H

//#include "ssc_types.h"
#include "audio.h"
#include "ssc_macro.h"
#include "ssc_imdct.h"
#include "rc_decode.h"

#define MAX_PERIOD 1024

#ifndef OVERLAP
#define OVERLAP(mode) ((mode)->overlap)
#endif

#ifndef FRAMESIZE
#define FRAMESIZE(mode) ((mode)->mdctSize)
#endif


struct SSCCustomMode {
   int Fs;
   short          overlap;

   short          nbEBands;
   const short   *eBands;   /**< Definition for each "pseudo-critical band" */

   int         nbShortMdcts;
   int         shortMdctSize;

   int          nbAllocVectors; /**< Number of lines in the matrix below */
   const unsigned char   *allocVectors;   /**< Number of bits in each band for several rates */
   const short *logN;
   const short *window;
   const kiss_fft_state *kfft[2];

};


extern AUDIOMode *ssc_custom_mode_create(int Fs, int frame_size, int *error);

#endif
