From e8b243a80c2d116ed02639a0eea84725451aba51 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Santos Souza de Miranda Date: Tue, 24 Mar 2026 21:04:16 -0300 Subject: [PATCH] Changed Types of the static members of the OPL3Tunning class to use integers instead of float --- lib/YMF262/include/YMF262/OPL3Tunning.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/YMF262/include/YMF262/OPL3Tunning.h b/lib/YMF262/include/YMF262/OPL3Tunning.h index 184b09b..0154c64 100644 --- a/lib/YMF262/include/YMF262/OPL3Tunning.h +++ b/lib/YMF262/include/YMF262/OPL3Tunning.h @@ -18,15 +18,8 @@ private: * \f] * Index 0 corresponds to Octave1, index 7 to Octave8. */ - static constexpr float POW2_BLOCKMINUS1[8] = { - 1.0f, - 2.0f, - 4.0f, - 8.0f, - 16.0f, - 32.0f, - 64.0f, - 128.0f, + static constexpr uint16_t POW2_BLOCKMINUS1[8] = { + 1,2,4,8,16,32,64,128 }; /*! @@ -42,9 +35,13 @@ private: /*! * @brief Calculated Sampling Frequency + * * This Number is dependent on the Clock and is also used on the formula to calculate the F-Number + * * \f[ + * f_s = \frac{T_{CLOCK}}{288} + * \f] */ - static constexpr float FS = TCLOCK / 288; + static constexpr uint32_t FS = TCLOCK / 288; };