diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-11-26 03:47:52 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-11-26 03:47:52 +0300 |
commit | b10fe6dca8cbec3a9aabb230bf42574171062121 (patch) | |
tree | d9ce9bf37473af25cff9b7fcd8fac9d9fe67207d | |
parent | 5fa684bd2732f638763cd62bed831ccc6aafc0bf (diff) | |
download | libADLMIDI-b10fe6dca8cbec3a9aabb230bf42574171062121.tar.gz libADLMIDI-b10fe6dca8cbec3a9aabb230bf42574171062121.tar.bz2 libADLMIDI-b10fe6dca8cbec3a9aabb230bf42574171062121.zip |
Attempt to fix compatibility with C++98
-rw-r--r-- | src/adlmidi_opl3.cpp | 2 | ||||
-rw-r--r-- | src/adlmidi_private.hpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index 2d1f3e8..ab2d7c0 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -338,7 +338,7 @@ void OPL3::Touch_Real(unsigned c, unsigned volume, uint8_t brightness) if(brightness != 127) { - brightness = static_cast<uint8_t>(std::round(127.0 * std::sqrt((static_cast<double>(brightness)) * (1.0 / 127.0))) / 2.0); + brightness = static_cast<uint8_t>(::round(127.0 * std::sqrt((static_cast<double>(brightness)) * (1.0 / 127.0))) / 2.0); if(!do_modulator) modulator = (modulator | 63) - brightness + brightness * (modulator & 63) / 63; if(!do_carrier) diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 8058824..65a32c8 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -91,6 +91,7 @@ typedef int32_t ssize_t; #include <vector> // vector #include <deque> // deque #include <cmath> // exp, log, ceil +#include <tgmath.h> #include <stdio.h> #include <stdlib.h> #include <limits> // numeric_limit |