Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/celt-0.7.0.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2009-06-21 17:47:51 +0400
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2009-06-21 17:47:51 +0400
commit640f7fd8e3f25256ef502511316a33bb40ad5f94 (patch)
tree74fa18481c16c12f0924ce5275c1dfbd9910e2ee
parent2014ca380e0190ec4f68b7a9d720227fff0225c4 (diff)
Gives an error when trying to create a stereo mode with DISABLE_STEREO defined.
-rw-r--r--libcelt/modes.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libcelt/modes.c b/libcelt/modes.c
index c3c21e0..693780e 100644
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -418,6 +418,17 @@ CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int *e
#endif
#endif /* !STATIC_MODES */
+
+#ifdef DISABLE_STEREO
+ if (channels > 1)
+ {
+ celt_warning("Stereo support was disable from this build");
+ if (error)
+ *error = CELT_BAD_ARG;
+ return NULL;
+ }
+#endif
+
mdct_init(&mode->mdct, 2*mode->mdctSize);
mode->fft = pitch_state_alloc(MAX_PERIOD);