summaryrefslogtreecommitdiffstats
path: root/libtdemid/track.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-13 09:38:34 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-05-15 18:46:42 +0900
commitad58630b34fc61754c763cf951004ef27e38d33d (patch)
tree168cf1d101c4583c84d02c116cd305763118277b /libtdemid/track.cpp
parentbedc43ef09d9569fb7643849e8f24dd46c379eba (diff)
downloadtdelibs-ad58630b34fc61754c763cf951004ef27e38d33d.tar.gz
tdelibs-ad58630b34fc61754c763cf951004ef27e38d33d.zip
Replace TRUE/FALSE with boolean values true/false
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'libtdemid/track.cpp')
-rw-r--r--libtdemid/track.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/libtdemid/track.cpp b/libtdemid/track.cpp
index 44375b637..116ddb687 100644
--- a/libtdemid/track.cpp
+++ b/libtdemid/track.cpp
@@ -30,13 +30,6 @@
#include "midispec.h"
#include "midfile.h"
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#define T2MS(ticks) (((double)ticks)*(double)60000L)/((double)tempoToMetronomeTempo(tempo)*(double)tPCN)
#define MS2T(ms) (((ms)*(double)tempoToMetronomeTempo(tempo)*(double)tPCN)/((double)60000L))
@@ -235,9 +228,9 @@ void MidiTrack::readEvent(MidiEvent *ev)
ev->note = *ptrdata;ptrdata++;currentpos++;
ev->vel = *ptrdata;ptrdata++;currentpos++;
if (ev->vel==0)
- note[ev->chn][ev->note]=FALSE;
+ note[ev->chn][ev->note]=false;
else
- note[ev->chn][ev->note]=TRUE;
+ note[ev->chn][ev->note]=true;
#ifdef TRACKDEBUG2
if (ev->chn==6) {
@@ -252,7 +245,7 @@ void MidiTrack::readEvent(MidiEvent *ev)
#endif
ev->note = *ptrdata;ptrdata++;currentpos++;
ev->vel = *ptrdata;ptrdata++;currentpos++;
- note[ev->chn][ev->note]=FALSE;
+ note[ev->chn][ev->note]=false;
break;
case (MIDI_KEY_PRESSURE) :
@@ -334,7 +327,7 @@ void MidiTrack::readEvent(MidiEvent *ev)
case (ME_END_OF_TRACK) :
i=0;
j=0;
- while ((i<16)&&(note[i][j]==FALSE))
+ while ((i<16)&&(note[i][j]==false))
{
j++;
if (j==128) { j=0; i++; };
@@ -346,7 +339,7 @@ void MidiTrack::readEvent(MidiEvent *ev)
ev->command=MIDI_NOTEOFF;
ev->note = j;
ev->vel = 0;
- note[ev->chn][ev->note]=FALSE;
+ note[ev->chn][ev->note]=false;
fprintf(stderr,"Note Off(simulated)\n");
return;
}
@@ -504,7 +497,7 @@ void MidiTrack::clear(void)
for (int i=0;i<16;i++)
for (int j=0;j<128;j++)
- note[i][j]=FALSE;
+ note[i][j]=false;
delta_ticks = wait_ticks = ~0;
time_at_previous_tempochange=0;
@@ -526,7 +519,7 @@ void MidiTrack::init(void)
for (int i=0;i<16;i++)
for (int j=0;j<128;j++)
- note[i][j]=FALSE;
+ note[i][j]=false;
delta_ticks=readVariableLengthValue();
if (endoftrack) return;