diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2017-12-10 00:24:02 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2017-12-10 00:24:02 +0300 |
commit | 51d6e05b7e7bc6fad529e9e023ceca9af34ed910 (patch) | |
tree | 2074bd760ff007b4b9db28c7f1f7151d395030fe | |
parent | b5be0ef0b188ab5afeef825d80a0b00bfff30023 (diff) | |
parent | 4ab6c7b2d81960b124974ddca5733a07c8dd5fc8 (diff) | |
download | libADLMIDI-51d6e05b7e7bc6fad529e9e023ceca9af34ed910.tar.gz libADLMIDI-51d6e05b7e7bc6fad529e9e023ceca9af34ed910.tar.bz2 libADLMIDI-51d6e05b7e7bc6fad529e9e023ceca9af34ed910.zip |
Merge branch 'master' into get-rid-of-backup-buffer
# Conflicts:
# src/adlmidi.cpp
-rw-r--r-- | projects/watcom/.gitignore | 12 | ||||
-rw-r--r-- | projects/watcom/ADLMIDI.tgt | 345 | ||||
-rw-r--r-- | projects/watcom/bass.mid | bin | 0 -> 444 bytes | |||
-rw-r--r-- | projects/watcom/dmxopl3.wop | bin | 0 -> 15959 bytes | |||
-rw-r--r-- | projects/watcom/libADLMIDI.tgt | 275 | ||||
-rw-r--r-- | projects/watcom/libADLMIDI.wpj | 63 | ||||
-rw-r--r-- | projects/watcom/nin-hlah.mid | bin | 0 -> 62164 bytes | |||
-rw-r--r-- | projects/watcom/onestop.mid | bin | 0 -> 40075 bytes | |||
-rw-r--r-- | projects/watcom/playmidi.tgt | 322 | ||||
-rw-r--r-- | projects/watcom/ttd10.mid | bin | 0 -> 62952 bytes | |||
-rw-r--r-- | src/adlmidi_midiplay.cpp | 3 | ||||
-rw-r--r-- | src/adlmidi_private.hpp | 2 | ||||
-rw-r--r-- | utils/midiplay/adlmidiplay.cpp | 2 | ||||
-rwxr-xr-x | utils/midiplay/wave_writer.c | 2 |
14 files changed, 1021 insertions, 5 deletions
diff --git a/projects/watcom/.gitignore b/projects/watcom/.gitignore new file mode 100644 index 0000000..a8d82c5 --- /dev/null +++ b/projects/watcom/.gitignore @@ -0,0 +1,12 @@ +*.obj +*.lib +*.exe +*.elf +*.lb1 +*.ERR +*.err +*.mk +*.mk1 +*.lk1 +*.map +*.sym diff --git a/projects/watcom/ADLMIDI.tgt b/projects/watcom/ADLMIDI.tgt new file mode 100644 index 0000000..4c3e335 --- /dev/null +++ b/projects/watcom/ADLMIDI.tgt @@ -0,0 +1,345 @@ +40
+targetIdent
+0
+MProject
+1
+MComponent
+0
+2
+WString
+3
+LIB
+3
+WString
+5
+n_2sn
+1
+0
+1
+4
+MCommand
+0
+5
+MCommand
+0
+6
+MItem
+11
+ADLMIDI.lib
+7
+WString
+3
+LIB
+8
+WVList
+2
+9
+MCState
+10
+WString
+4
+WLIB
+11
+WString
+25
+???s?Strip LINNUM records
+1
+1
+12
+MVState
+13
+WString
+4
+WLIB
+14
+WString
+16
+???s?Page bound:
+1
+15
+WString
+4
+1024
+0
+16
+WVList
+1
+17
+ActionStates
+18
+WString
+5
+&Make
+19
+WVList
+0
+-1
+1
+1
+0
+20
+WPickList
+11
+21
+MItem
+3
+*.c
+22
+WString
+4
+COBJ
+23
+WVList
+3
+24
+MVState
+25
+WString
+3
+WCC
+26
+WString
+25
+n????Include directories:
+1
+27
+WString
+46
+"$(%watcom)/h;$(%watcom)/h/nt" "../../include"
+0
+28
+MRState
+29
+WString
+3
+WCC
+30
+WString
+33
+??2??80386 register-based calling
+1
+1
+31
+MRState
+32
+WString
+3
+WCC
+33
+WString
+39
+??2??Pentium Pro register-based calling
+1
+0
+34
+WVList
+1
+35
+ActionStates
+36
+WString
+5
+&Make
+37
+WVList
+0
+-1
+1
+1
+0
+38
+MItem
+27
+..\..\src\adlmidi_mus2mid.c
+39
+WString
+4
+COBJ
+40
+WVList
+0
+41
+WVList
+0
+21
+1
+1
+0
+42
+MItem
+27
+..\..\src\adlmidi_xmi2mid.c
+43
+WString
+4
+COBJ
+44
+WVList
+0
+45
+WVList
+0
+21
+1
+1
+0
+46
+MItem
+21
+..\..\src\nukedopl3.c
+47
+WString
+4
+COBJ
+48
+WVList
+0
+49
+WVList
+0
+21
+1
+1
+0
+50
+MItem
+5
+*.cpp
+51
+WString
+6
+CPPOBJ
+52
+WVList
+1
+53
+MVState
+54
+WString
+3
+WPP
+55
+WString
+25
+n????Include directories:
+1
+56
+WString
+47
+"$(%watcom)/h;$(%watcom)/h/nt" "../../include"
+0
+57
+WVList
+0
+-1
+1
+1
+0
+58
+MItem
+21
+..\..\src\adldata.cpp
+59
+WString
+6
+CPPOBJ
+60
+WVList
+0
+61
+WVList
+0
+50
+1
+1
+0
+62
+MItem
+21
+..\..\src\adlmidi.cpp
+63
+WString
+6
+CPPOBJ
+64
+WVList
+0
+65
+WVList
+0
+50
+1
+1
+0
+66
+MItem
+26
+..\..\src\adlmidi_load.cpp
+67
+WString
+6
+CPPOBJ
+68
+WVList
+0
+69
+WVList
+0
+50
+1
+1
+0
+70
+MItem
+30
+..\..\src\adlmidi_midiplay.cpp
+71
+WString
+6
+CPPOBJ
+72
+WVList
+0
+73
+WVList
+0
+50
+1
+1
+0
+74
+MItem
+26
+..\..\src\adlmidi_opl3.cpp
+75
+WString
+6
+CPPOBJ
+76
+WVList
+0
+77
+WVList
+0
+50
+1
+1
+0
+78
+MItem
+29
+..\..\src\adlmidi_private.cpp
+79
+WString
+6
+CPPOBJ
+80
+WVList
+0
+81
+WVList
+0
+50
+1
+1
+0
diff --git a/projects/watcom/bass.mid b/projects/watcom/bass.mid Binary files differnew file mode 100644 index 0000000..422cbc9 --- /dev/null +++ b/projects/watcom/bass.mid diff --git a/projects/watcom/dmxopl3.wop b/projects/watcom/dmxopl3.wop Binary files differnew file mode 100644 index 0000000..eee2fab --- /dev/null +++ b/projects/watcom/dmxopl3.wop diff --git a/projects/watcom/libADLMIDI.tgt b/projects/watcom/libADLMIDI.tgt new file mode 100644 index 0000000..d384a4f --- /dev/null +++ b/projects/watcom/libADLMIDI.tgt @@ -0,0 +1,275 @@ +40
+targetIdent
+0
+MProject
+1
+MComponent
+0
+2
+WString
+3
+LIB
+3
+WString
+5
+d_2sn
+1
+0
+1
+4
+MCommand
+0
+5
+MCommand
+0
+6
+MItem
+14
+libADLMIDI.lib
+7
+WString
+3
+LIB
+8
+WVList
+0
+9
+WVList
+1
+10
+ActionStates
+11
+WString
+5
+&Make
+12
+WVList
+0
+-1
+1
+1
+0
+13
+WPickList
+10
+14
+MItem
+3
+*.c
+15
+WString
+4
+COBJ
+16
+WVList
+1
+17
+MVState
+18
+WString
+3
+WCC
+19
+WString
+25
+d????Include directories:
+1
+20
+WString
+30
+"$(%watcom)/h" "../../include"
+0
+21
+WVList
+1
+22
+ActionStates
+23
+WString
+5
+&Make
+24
+WVList
+0
+-1
+1
+1
+0
+25
+MItem
+27
+..\..\src\adlmidi_mus2mid.c
+26
+WString
+4
+COBJ
+27
+WVList
+0
+28
+WVList
+0
+14
+1
+1
+0
+29
+MItem
+27
+..\..\src\adlmidi_xmi2mid.c
+30
+WString
+4
+COBJ
+31
+WVList
+0
+32
+WVList
+0
+14
+1
+1
+0
+33
+MItem
+5
+*.cpp
+34
+WString
+6
+CPPOBJ
+35
+WVList
+1
+36
+MVState
+37
+WString
+3
+WPP
+38
+WString
+25
+d????Include directories:
+1
+39
+WString
+30
+"$(%watcom)/h" "../../include"
+0
+40
+WVList
+0
+-1
+1
+1
+0
+41
+MItem
+21
+..\..\src\adldata.cpp
+42
+WString
+6
+CPPOBJ
+43
+WVList
+0
+44
+WVList
+0
+33
+1
+1
+0
+45
+MItem
+21
+..\..\src\adlmidi.cpp
+46
+WString
+6
+CPPOBJ
+47
+WVList
+0
+48
+WVList
+0
+33
+1
+1
+0
+49
+MItem
+26
+..\..\src\adlmidi_load.cpp
+50
+WString
+6
+CPPOBJ
+51
+WVList
+0
+52
+WVList
+0
+33
+1
+1
+0
+53
+MItem
+30
+..\..\src\adlmidi_midiplay.cpp
+54
+WString
+6
+CPPOBJ
+55
+WVList
+0
+56
+WVList
+0
+33
+1
+1
+0
+57
+MItem
+26
+..\..\src\adlmidi_opl3.cpp
+58
+WString
+6
+CPPOBJ
+59
+WVList
+0
+60
+WVList
+0
+33
+1
+1
+0
+61
+MItem
+29
+..\..\src\adlmidi_private.cpp
+62
+WString
+6
+CPPOBJ
+63
+WVList
+0
+64
+WVList
+0
+33
+1
+1
+0
diff --git a/projects/watcom/libADLMIDI.wpj b/projects/watcom/libADLMIDI.wpj new file mode 100644 index 0000000..b7bfc41 --- /dev/null +++ b/projects/watcom/libADLMIDI.wpj @@ -0,0 +1,63 @@ +40
+projectIdent
+0
+VpeMain
+1
+WRect
+-24
+270
+10288
+9680
+2
+MProject
+3
+MCommand
+0
+4
+MCommand
+0
+2
+5
+WFileName
+11
+ADLMIDI.tgt
+6
+WFileName
+12
+playmidi.tgt
+7
+WVList
+2
+8
+VComponent
+9
+WRect
+160
+270
+5712
+4360
+0
+0
+10
+WFileName
+11
+ADLMIDI.tgt
+0
+10
+11
+VComponent
+12
+WRect
+1712
+810
+5712
+4360
+0
+0
+13
+WFileName
+12
+playmidi.tgt
+0
+3
+11
diff --git a/projects/watcom/nin-hlah.mid b/projects/watcom/nin-hlah.mid Binary files differnew file mode 100644 index 0000000..ebf8b59 --- /dev/null +++ b/projects/watcom/nin-hlah.mid diff --git a/projects/watcom/onestop.mid b/projects/watcom/onestop.mid Binary files differnew file mode 100644 index 0000000..c677319 --- /dev/null +++ b/projects/watcom/onestop.mid diff --git a/projects/watcom/playmidi.tgt b/projects/watcom/playmidi.tgt new file mode 100644 index 0000000..d1c5b42 --- /dev/null +++ b/projects/watcom/playmidi.tgt @@ -0,0 +1,322 @@ +40
+targetIdent
+0
+MProject
+1
+MComponent
+0
+2
+WString
+4
+NEXE
+3
+WString
+5
+nc2en
+1
+0
+1
+4
+MCommand
+0
+5
+MCommand
+0
+6
+MItem
+12
+playmidi.exe
+7
+WString
+4
+NEXE
+8
+WVList
+2
+9
+MVState
+10
+WString
+7
+WINLINK
+11
+WString
+22
+?????Other options(,):
+1
+12
+WString
+12
+commit st=1m
+0
+13
+MVState
+14
+WString
+7
+WINLINK
+15
+WString
+18
+?????Libraries(,):
+1
+16
+WString
+7
+ADLMIDI
+0
+17
+WVList
+5
+18
+ActionStates
+19
+WString
+7
+Sam&ple
+20
+WVList
+0
+21
+ActionStates
+22
+WString
+13
+Remote D&ebug
+23
+WVList
+2
+24
+MRState
+25
+WString
+6
+RDEBUG
+26
+WString
+13
+????9Windowed
+1
+0
+27
+MRState
+28
+WString
+6
+RDEBUG
+29
+WString
+19
+????9Character mode
+1
+1
+30
+ActionStates
+31
+WString
+12
+Local &Debug
+32
+WVList
+1
+33
+MVState
+34
+WString
+6
+WDEBUG
+35
+WString
+28
+?????Application parameters:
+1
+36
+WString
+9
+ttd10.mid
+0
+37
+ActionStates
+38
+WString
+5
+&Make
+39
+WVList
+0
+40
+ActionStates
+41
+WString
+4
+&Run
+42
+WVList
+1
+43
+MVState
+44
+WString
+3
+RUN
+45
+WString
+28
+?????Application parameters:
+1
+46
+WString
+9
+ttd10.mid
+0
+-1
+1
+1
+0
+47
+WPickList
+4
+48
+MItem
+3
+*.c
+49
+WString
+4
+COBJ
+50
+WVList
+1
+51
+MVState
+52
+WString
+3
+WCC
+53
+WString
+25
+n????Include directories:
+1
+54
+WString
+47
+"$(%watcom)/h;$(%watcom)/h/nt" "../../include"
+0
+55
+WVList
+0
+-1
+1
+1
+0
+56
+MItem
+34
+..\..\utils\midiplay\wave_writer.c
+57
+WString
+4
+COBJ
+58
+WVList
+0
+59
+WVList
+0
+48
+1
+1
+0
+60
+MItem
+5
+*.cpp
+61
+WString
+6
+CPPOBJ
+62
+WVList
+2
+63
+MVState
+64
+WString
+3
+WPP
+65
+WString
+25
+n????Include directories:
+1
+66
+WString
+47
+"$(%watcom)/h;$(%watcom)/h/nt" "../../include"
+0
+67
+MVState
+68
+WString
+3
+WPP
+69
+WString
+23
+?????Macro definitions:
+1
+70
+WString
+16
+OUTPUT_WAVE_ONLY
+0
+71
+WVList
+0
+-1
+1
+1
+0
+72
+MItem
+36
+..\..\utils\midiplay\adlmidiplay.cpp
+73
+WString
+6
+CPPOBJ
+74
+WVList
+2
+75
+MRState
+76
+WString
+3
+WPP
+77
+WString
+33
+??2??80386 register-based calling
+1
+1
+78
+MRState
+79
+WString
+3
+WPP
+80
+WString
+39
+??2??Pentium Pro register-based calling
+1
+0
+81
+WVList
+0
+60
+1
+1
+0
diff --git a/projects/watcom/ttd10.mid b/projects/watcom/ttd10.mid Binary files differnew file mode 100644 index 0000000..eeb47cc --- /dev/null +++ b/projects/watcom/ttd10.mid diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 69db6b0..dacb2b1 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -241,7 +241,6 @@ void MIDIplay::MidiTrackRow::sortEvents(bool *noteStates) for(std::set<size_t>::iterator j = markAsOn.begin(); j != markAsOn.end(); j++) noteStates[*j] = true; - } /***********************************************************************************/ @@ -2056,7 +2055,7 @@ void MIDIplay::HandleEvent(size_t tk, const MIDIplay::MidiEvent &evt, int &statu } } -long MIDIplay::CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t) +long MIDIplay::CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t) const { long s = -ch[c].koff_time_until_neglible; diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 2442fc2..46187bc 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -934,7 +934,7 @@ private: // Determine how good a candidate this adlchannel // would be for playing a note from this instrument. - long CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t /*MidCh*/); + long CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t /*MidCh*/) const; // A new note will be played on this channel using this instrument. // Kill existing notes on this channel (or don't, if we do arpeggio) diff --git a/utils/midiplay/adlmidiplay.cpp b/utils/midiplay/adlmidiplay.cpp index 2548636..69b3698 100644 --- a/utils/midiplay/adlmidiplay.cpp +++ b/utils/midiplay/adlmidiplay.cpp @@ -238,8 +238,8 @@ int main(int argc, char **argv) return 0; } - #ifndef HARDWARE_OPL3 long sampleRate = 44100; + #ifndef HARDWARE_OPL3 //const unsigned MaxSamplesAtTime = 512; // 512=dbopl limitation // How long is SDL buffer, in seconds? // The smaller the value, the more often SDL_AudioCallBack() diff --git a/utils/midiplay/wave_writer.c b/utils/midiplay/wave_writer.c index 0bfaf68..e8ee10c 100755 --- a/utils/midiplay/wave_writer.c +++ b/utils/midiplay/wave_writer.c @@ -53,7 +53,7 @@ int wave_open( long sample_rate, const char* filename ) return -1; } -#ifndef _WIN32 +#if !defined(_WIN32) || defined(__WATCOMC__) file = fopen( filename, "wb" ); #else wchar_t widePath[MAX_PATH]; |