shithub: opus

Download patch

ref: 8f6d12beeca253d40a39b4565a9a639abd20bc52
parent: 6c12497c77f31c290b43eadd12911349202ee2f3
author: Jean-Marc Valin <[email protected]>
date: Sat Nov 6 08:11:18 EDT 2010

Adding float|fixed suffixes to static mode files

--- a/libcelt/dump_modes.c
+++ b/libcelt/dump_modes.c
@@ -289,6 +289,12 @@
    }
 }
 
+#ifdef FIXED_POINT
+#define BASENAME "static_modes_fixed"
+#else
+#define BASENAME "static_modes_float"
+#endif
+
 int main(int argc, char **argv)
 {
    int i, nb;
@@ -308,10 +314,10 @@
       frame   = atoi(argv[2*i+2]);
       m[i] = celt_mode_create(Fs, frame, NULL);
    }
-   file = fopen("static_modes.c", "w");
+   file = fopen(BASENAME ".c", "w");
    dump_modes(file, m, nb);
    fclose(file);
-   file = fopen("static_modes.h", "w");
+   file = fopen(BASENAME ".h", "w");
    dump_header(file, m, nb);
    fclose(file);
    for (i=0;i<nb;i++)
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -112,7 +112,11 @@
 #endif
 
 #ifdef STATIC_MODES
-#include "static_modes.c"
+#ifdef FIXED_POINT
+#include "static_modes_fixed.c"
+#else
+#include "static_modes_float.c"
+#endif
 #endif
 
 #ifndef M_PI