aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lib/midi/MIDITYPE.PAS
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-27 13:28:57 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-27 13:28:57 +0000
commit1ba91d5a0e1df7419a561f6dcf16a0839509a5e7 (patch)
tree3f76e96fc5a3f5b738dabce28642ff2415748ccb /Game/Code/lib/midi/MIDITYPE.PAS
parente9fd8ce40b4cbf006695fd6e56f84071407843c9 (diff)
downloadusdx-1ba91d5a0e1df7419a561f6dcf16a0839509a5e7.tar.gz
usdx-1ba91d5a0e1df7419a561f6dcf16a0839509a5e7.tar.xz
usdx-1ba91d5a0e1df7419a561f6dcf16a0839509a5e7.zip
Reordering of the directories[1]: moving Game/Code to src
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1302 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/lib/midi/MIDITYPE.PAS')
-rw-r--r--Game/Code/lib/midi/MIDITYPE.PAS90
1 files changed, 0 insertions, 90 deletions
diff --git a/Game/Code/lib/midi/MIDITYPE.PAS b/Game/Code/lib/midi/MIDITYPE.PAS
deleted file mode 100644
index b1ec1bdd..00000000
--- a/Game/Code/lib/midi/MIDITYPE.PAS
+++ /dev/null
@@ -1,90 +0,0 @@
-{ $Header: /MidiComp/MIDITYPE.PAS 2 10/06/97 7:33 Davec $ }
-
-{ Written by David Churcher <dchurcher@cix.compulink.co.uk>,
- released to the public domain. }
-
-
-unit Miditype;
-
-interface
-
-{$IFDEF FPC}
- {$MODE Delphi}
- {$H+} // use AnsiString
-{$ENDIF}
-
-uses
- Classes,
- Windows,
- Messages,
- MMSystem,
- MidiDefs,
- Circbuf;
-
-type
- {-------------------------------------------------------------------}
- { A MIDI input/output event }
- TMyMidiEvent = class(TPersistent)
- public
- MidiMessage: Byte; { MIDI message status byte }
- Data1: Byte; { MIDI message data 1 byte }
- Data2: Byte; { MIDI message data 2 byte }
- Time: DWORD; { Time in ms since midiInOpen }
- SysexLength: Word; { Length of sysex data (0 if none) }
- Sysex: PChar; { Pointer to sysex data buffer }
- destructor Destroy; override; { Frees sysex data buffer if nec. }
- end;
- PMyMidiEvent = ^TMyMidiEvent;
-
- {-------------------------------------------------------------------}
- { Encapsulates the MIDIHDR with its memory handle and sysex buffer }
- PMyMidiHdr = ^TMyMidiHdr;
- TMyMidiHdr = class(TObject)
- public
- hdrHandle: THandle;
- hdrPointer: PMIDIHDR;
- sysexHandle: THandle;
- sysexPointer: Pointer;
- constructor Create(BufferSize: Word);
- destructor Destroy; override;
- end;
-
-implementation
-
-{-------------------------------------------------------------------}
-{ Free any sysex buffer associated with the event }
-destructor TMyMidiEvent.Destroy;
-begin
- if (Sysex <> Nil) then
- Freemem(Sysex, SysexLength);
-
- inherited Destroy;
-end;
-
-{-------------------------------------------------------------------}
-{ Allocate memory for the sysex header and buffer }
-constructor TMyMidiHdr.Create(BufferSize:Word);
-begin
- inherited Create;
-
- if BufferSize > 0 then
- begin
- hdrPointer := GlobalSharedLockedAlloc(sizeof(TMIDIHDR), hdrHandle);
- sysexPointer := GlobalSharedLockedAlloc(BufferSize, sysexHandle);
-
- hdrPointer^.lpData := sysexPointer;
- hdrPointer^.dwBufferLength := BufferSize;
- end;
-end;
-
-{-------------------------------------------------------------------}
-destructor TMyMidiHdr.Destroy;
-begin
- GlobalSharedLockedFree( hdrHandle, hdrPointer );
- GlobalSharedLockedFree( sysexHandle, sysexPointer );
- inherited Destroy;
-end;
-
-
-
-end.