aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-02-28 17:25:23 +0300
committerWohlstand <admin@wohlnet.ru>2017-02-28 17:25:23 +0300
commitda68b78d315f8ff5430819c05fa3d1224e671eab (patch)
tree2bac5f474f3fc7b5c9e4e25983e414779b0c7a9c
parent285fd4e367ca7383ab57fc81f9e84731a67825bb (diff)
downloadlibADLMIDI-da68b78d315f8ff5430819c05fa3d1224e671eab.tar.gz
libADLMIDI-da68b78d315f8ff5430819c05fa3d1224e671eab.tar.bz2
libADLMIDI-da68b78d315f8ff5430819c05fa3d1224e671eab.zip
Change long double into double because of no necessary for it
-rw-r--r--src/adlmidi.cpp2
-rw-r--r--src/adlmidi.h8
-rw-r--r--src/adlmidi_midiplay.cpp6
-rw-r--r--src/adlmidi_private.hpp10
4 files changed, 13 insertions, 13 deletions
diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp
index dd42fb6..5bb384d 100644
--- a/src/adlmidi.cpp
+++ b/src/adlmidi.cpp
@@ -383,7 +383,7 @@ ADLMIDI_EXPORT int adl_play(ADL_MIDIPlayer *device, int sampleCount, short *out)
}
else
{
- const long double eat_delay = device->delay < device->maxdelay ? device->delay : device->maxdelay;
+ const double eat_delay = device->delay < device->maxdelay ? device->delay : device->maxdelay;
device->delay -= eat_delay;
device->carry += device->PCM_RATE * eat_delay;
n_periodCountStereo = static_cast<ssize_t>(device->carry);
diff --git a/src/adlmidi.h b/src/adlmidi.h
index 0a4ed91..89e853f 100644
--- a/src/adlmidi.h
+++ b/src/adlmidi.h
@@ -52,13 +52,13 @@ struct ADL_MIDIPlayer
unsigned int SkipForward;
unsigned int QuitWithoutLooping;
unsigned int ScaleModulators;
- long double delay;
- long double carry;
+ double delay;
+ double carry;
/* The lag between visual content and audio content equals */
/* the sum of these two buffers. */
- long double mindelay;
- long double maxdelay;
+ double mindelay;
+ double maxdelay;
/* For internal usage */
int stored_samples; /* num of collected samples */
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index f0c3f00..b207790 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -158,7 +158,7 @@ uint64_t MIDIplay::ReadVarLen(size_t tk)
}
-long double MIDIplay::Tick(long double s, long double granularity)
+double MIDIplay::Tick(double s, double granularity)
{
if(CurrentPosition.began)
CurrentPosition.wait -= s;
@@ -1264,7 +1264,7 @@ void MIDIplay::NoteOff(uint16_t MidCh, uint8_t note)
}
-void MIDIplay::UpdateVibrato(long double amount)
+void MIDIplay::UpdateVibrato(double amount)
{
for(size_t a = 0, b = Ch.size(); a < b; ++a)
if(Ch[a].vibrato && !Ch[a].activenotes.empty())
@@ -1292,7 +1292,7 @@ uint64_t MIDIplay::ChooseDevice(const std::string &name)
return n;
}
-void MIDIplay::UpdateArpeggio(long double) // amount = amount of time passed
+void MIDIplay::UpdateArpeggio(double) // amount = amount of time passed
{
// If there is an adlib channel that has multiple notes
// simulated on the same channel, arpeggio them.
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index 907dcb4..8848f14 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -173,7 +173,7 @@ class MIDIplay
{
bool began;
char padding[7];
- long double wait;
+ double wait;
struct TrackInfo
{
size_t ptr;
@@ -200,7 +200,7 @@ class MIDIplay
uint8_t panning, vibrato, sustain;
char ____padding[6];
double bend, bendsense;
- long double vibpos, vibspeed, vibdepth;
+ double vibpos, vibspeed, vibdepth;
int64_t vibdelay;
uint8_t lastlrpn, lastmrpn;
bool nrpn;
@@ -454,7 +454,7 @@ public:
* Input: granularity = don't expect intervals smaller than this, in seconds
* Output: desired number of seconds until next call
*/
- long double Tick(long double s, long double granularity);
+ double Tick(double s, double granularity);
private:
enum
@@ -491,8 +491,8 @@ private:
//void UpdatePortamento(unsigned MidCh)
void NoteUpdate_All(uint16_t MidCh, unsigned props_mask);
void NoteOff(uint16_t MidCh, uint8_t note);
- void UpdateVibrato(long double amount);
- void UpdateArpeggio(long double /*amount*/);
+ void UpdateVibrato(double amount);
+ void UpdateArpeggio(double /*amount*/);
public:
uint64_t ChooseDevice(const std::string &name);