aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Sieren <matthias@s-r-n.de>2015-11-10 20:41:03 +0100
committerMatt Sieren <matthias@s-r-n.de>2015-11-10 20:41:03 +0100
commitc15ea47d03feca87e379a3f735b8ede057b32fa0 (patch)
tree0b61cdd6adcb221a6eef71c5717c4609b6ee8caf
parentfba2ae1dd01c41319fc5c967b486e781447aa3ec (diff)
Added runtime assertion for OGG
New users might not end up digging through the actual implementation to uncomment the VORBIS definition right away. The runtime assertion will fire if a user calls loadOGG without the definition, thus reminding to uncomment.
-rw-r--r--maximilian.cpp2
-rwxr-xr-xmaximilian.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/maximilian.cpp b/maximilian.cpp
index adbb97d..8884e52 100644
--- a/maximilian.cpp
+++ b/maximilian.cpp
@@ -560,6 +560,8 @@ bool maxiSample::loadOgg(string fileName, int channel) {
}
}
return result; // this should probably be something more descriptive
+#else
+ assert(false); // called but VORBIS not defined!
#endif
return 0;
}
diff --git a/maximilian.h b/maximilian.h
index c292598..fad99f2 100755
--- a/maximilian.h
+++ b/maximilian.h
@@ -40,6 +40,7 @@
#include <iostream>
#include <fstream>
#include <string.h>
+#include <cassert>
#include <cstdlib>
#include "math.h"
#ifdef _WIN32 //|| _WIN64