aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_opl3.cpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-10-18 02:22:01 +0300
committerWohlstand <admin@wohlnet.ru>2017-10-18 02:22:01 +0300
commit380d08e1a234efb17cf15a6b6c2d00c52e4fc648 (patch)
tree563567a5615623db8e9e3acdffa3be8f44cb84ba /src/adlmidi_opl3.cpp
parentd7b33b8d4fc3efe90d8e388d451966fa4baefba6 (diff)
downloadlibADLMIDI-380d08e1a234efb17cf15a6b6c2d00c52e4fc648.tar.gz
libADLMIDI-380d08e1a234efb17cf15a6b6c2d00c52e4fc648.tar.bz2
libADLMIDI-380d08e1a234efb17cf15a6b6c2d00c52e4fc648.zip
Smooth finalizing, rewinding, and a bit more crash safety
* Smooth finalizing of song when loop is disabled (old ugly hack has been removed :wink:) * Added an ability to reset song position to begin (very helpful when song reaches the end) * Avoided possible crashes on attempt to fetch sample data without opening of MIDI file
Diffstat (limited to 'src/adlmidi_opl3.cpp')
-rw-r--r--src/adlmidi_opl3.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp
index 7ae2486..d03b942 100644
--- a/src/adlmidi_opl3.cpp
+++ b/src/adlmidi_opl3.cpp
@@ -23,6 +23,30 @@
#include "adlmidi_private.hpp"
+#ifdef DISABLE_EMBEDDED_BANKS
+/*
+ Dummy data which replaces adldata.cpp banks database
+*/
+
+const struct adldata adl[]
+{
+ {0, 0, 0, 0, 0, 0}
+};
+
+const struct adlinsdata adlins[] =
+{
+ {0, 0, 0, 0, 0, 0, 0.0}
+};
+
+int maxAdlBanks()
+{
+ return 0;
+}
+
+const unsigned short banks[][256] = {{0}};
+const char* const banknames[] = {"<Embedded banks are disabled>"};
+#endif
+
static const unsigned short Operators[23 * 2] =
{
// Channels 0-2