From 114e56b3342e57b48d824af19e869f58c71546eb Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 8 Mar 2018 09:51:37 +0200 Subject: [PATCH] Moved old NukedOPL to own namespace This fixes linking issues on non-MSVC targets and improves code navigation --- src/sound/oplsynth/nukedopl3.cpp | 7 ++++++- src/sound/oplsynth/nukedopl3.h | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sound/oplsynth/nukedopl3.cpp b/src/sound/oplsynth/nukedopl3.cpp index c99c5c55ba..990418cd8b 100644 --- a/src/sound/oplsynth/nukedopl3.cpp +++ b/src/sound/oplsynth/nukedopl3.cpp @@ -62,6 +62,9 @@ // Envelope generator // +namespace OPL3 +{ + typedef Bit16s(*envelope_sinfunc)(Bit16u phase, Bit16u envelope); typedef void(*envelope_genfunc)(opl_slot *slott); @@ -1017,6 +1020,8 @@ NukedOPL3::NukedOPL3(bool stereo) { Reset(); } +} // namespace OPL3 + OPLEmul *NukedOPL3Create(bool stereo) { - return new NukedOPL3(stereo); + return new OPL3::NukedOPL3(stereo); } diff --git a/src/sound/oplsynth/nukedopl3.h b/src/sound/oplsynth/nukedopl3.h index 3c3c65895a..76f34dcda0 100644 --- a/src/sound/oplsynth/nukedopl3.h +++ b/src/sound/oplsynth/nukedopl3.h @@ -32,6 +32,9 @@ #include "opl.h" #include "musicblock.h" +namespace OPL3 +{ + typedef uintptr_t Bitu; typedef intptr_t Bits; typedef uint32_t Bit32u; @@ -233,3 +236,5 @@ public: NukedOPL3(bool stereo); }; + +} // namespace OPL3