shithub: opus

Download patch

ref: 5484a280634011425dbdb5d5d676420a7aaaeaf1
parent: 7830cf1bd2c71bad9aa296254cf5c5f9842e8b8e
author: Gregory Maxwell <[email protected]>
date: Mon Oct 28 07:04:57 EDT 2013

Add a little missive when compiling without optimization.

The library really depends on all the little fixed point math functions
 being inlined in order to get acceptable performance. It turns out that
 it's very easy for someone to compile with optimization disable when
 twiddling cflags or cooking up their own build system.

--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -26,11 +26,15 @@
 */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
 #endif
 
 #ifndef OPUS_BUILD
-#error "OPUS_BUILD _MUST_ be defined to build Opus. This probably means you need other defines as well, as in a config.h. See the included build files for details."
+# error "OPUS_BUILD _MUST_ be defined to build Opus. This probably means you need other defines as well, as in a config.h. See the included build files for details."
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ >= 2) && !defined(__OPTIMIZE__)
+# pragma message "You appear to be compiling without optimization, if so opus will be very slow."
 #endif
 
 #include <stdarg.h>