Psychoacoustic decay coefficients can now be included in the static modes
diff --git a/libcelt/modes.c b/libcelt/modes.c
index 49d8fef..07ad8cf 100644
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -69,6 +69,8 @@
    return CELT_OK;
 }
 
+#ifndef STATIC_MODES
+
 #define PBANDS 8
 #define MIN_BINS 4
 /* Defining 25 critical bands for the full 0-20 kHz audio bandwidth
@@ -101,7 +103,7 @@
    };
 
 
-   static int *compute_ebands(celt_int32_t Fs, int frame_size, int *nbEBands)
+static int *compute_ebands(celt_int32_t Fs, int frame_size, int *nbEBands)
 {
    int *eBands;
    int i, res, min_width, lin, low, high;
@@ -215,7 +217,7 @@
    mode->allocVectors = allocVectors;
 }
 
-
+#endif /* STATIC_MODES */
 
 CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int lookahead, int *error)
 {
@@ -302,12 +304,13 @@
 #endif
    mode->window = window;
 
+   psydecay_init(&mode->psy, MAX_PERIOD/2, mode->Fs);
+
    mode->marker_start = MODEVALID;
    mode->marker_end = MODEVALID;
 #endif
    mdct_init(&mode->mdct, 2*mode->mdctSize);
    compute_alloc_cache(mode);
-   psydecay_init(&mode->psy, MAX_PERIOD/2, mode->Fs);
    if (error)
       *error = CELT_OK;
    return mode;
@@ -315,6 +318,7 @@
 
 void celt_mode_destroy(CELTMode *mode)
 {
+#ifndef STATIC_MODES
    int i;
    const int *prevPtr = NULL;
    for (i=0;i<mode->nbEBands;i++)
@@ -327,8 +331,6 @@
    }
    celt_free((int**)mode->bits);
    mdct_clear(&mode->mdct);
-   psydecay_clear(&mode->psy);
-#ifndef STATIC_MODES
    if (check_mode(mode) != CELT_OK)
       return;
    celt_free((int*)mode->eBands);
@@ -340,6 +342,7 @@
    mode->marker_start = MODEFREED;
    mode->marker_end = MODEFREED;
    celt_free((CELTMode *)mode);
+   psydecay_clear(&mode->psy);
 #endif
 }