From 380d08e1a234efb17cf15a6b6c2d00c52e4fc648 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 18 Oct 2017 02:22:01 +0300 Subject: 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 --- src/adlmidi_opl3.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/adlmidi_opl3.cpp') 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[] = {""}; +#endif + static const unsigned short Operators[23 * 2] = { // Channels 0-2 -- cgit v1.2.3