Subversion Repositories musikbox

Compare Revisions

No changes between revisions

Regard whitespace Rev 1 → Rev 2

/trunk/Config.ddp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Config.dfm
0,0 → 1,74
object ConfigForm: TConfigForm
Left = 189
Top = 117
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Konfiguration'
ClientHeight = 313
ClientWidth = 361
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object btnAbbrechen: TButton
Left = 8
Top = 280
Width = 113
Height = 25
Cancel = True
Caption = 'Abbrechen'
TabOrder = 0
OnClick = btnAbbrechenClick
end
object btnSpeichern: TButton
Left = 240
Top = 280
Width = 113
Height = 25
Caption = 'Speichern'
Default = True
TabOrder = 1
OnClick = btnSpeichernClick
end
object grpMusikOrdner: TGroupBox
Left = 8
Top = 8
Width = 345
Height = 257
Caption = 'Musikordner'
TabOrder = 2
object lstMusikOrdner: TListBox
Left = 16
Top = 24
Width = 201
Height = 209
ItemHeight = 13
TabOrder = 0
end
object btnOrdnerErstellen: TButton
Left = 232
Top = 24
Width = 97
Height = 25
Caption = 'Neuer Ordner'
TabOrder = 1
OnClick = btnOrdnerErstellenClick
end
object btnOrdnerEntfernen: TButton
Left = 230
Top = 56
Width = 99
Height = 25
Caption = 'Entfernen'
TabOrder = 2
OnClick = btnOrdnerEntfernenClick
end
end
end
/trunk/Config.pas
0,0 → 1,138
unit Config;
 
interface
 
uses
Windows, Messages, SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls,
ActnList, StdActns, ShlObj;
 
type
TConfigForm = class(TForm)
btnAbbrechen: TButton;
btnSpeichern: TButton;
grpMusikOrdner: TGroupBox;
lstMusikOrdner: TListBox;
btnOrdnerErstellen: TButton;
btnOrdnerEntfernen: TButton;
procedure btnAbbrechenClick(Sender: TObject);
procedure btnSpeichernClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnOrdnerEntfernenClick(Sender: TObject);
procedure btnOrdnerErstellenClick(Sender: TObject);
private
lg_StartFolder: String;
end;
 
var
ConfigForm: TConfigForm;
 
implementation
 
uses
Main;
 
{$R *.dfm}
 
procedure TConfigForm.btnAbbrechenClick(Sender: TObject);
begin
close;
end;
 
procedure TConfigForm.btnSpeichernClick(Sender: TObject);
var
i: integer;
begin
setlength(MainForm.MusikArray, 0);
for i := 0 to lstMusikOrdner.Items.Count-1 do
begin
setlength(MainForm.MusikArray, length(MainForm.MusikArray)+1);
MainForm.MusikArray[length(MainForm.MusikArray)-1] := lstMusikOrdner.Items.Strings[i];
end;
 
MainForm.InitDirectories();
MainForm.SchreibeEinstellung();
 
close;
end;
 
procedure TConfigForm.FormShow(Sender: TObject);
var
i: integer;
begin
lstMusikOrdner.Items.Clear;
for i := 0 to length(MainForm.MusikArray)-1 do
lstMusikOrdner.Items.Add(MainForm.MusikArray[i]);
end;
 
procedure TConfigForm.btnOrdnerEntfernenClick(Sender: TObject);
begin
if lstMusikOrdner.ItemIndex <> -1 then
lstMusikOrdner.Items.Delete(lstMusikOrdner.ItemIndex);
end;
 
///////////////////////////////////////////////////////////////////
// Call back function used to set the initial browse directory.
///////////////////////////////////////////////////////////////////
function BrowseForFolderCallBack(Wnd: HWND; uMsg: UINT;
lParam, lpData: LPARAM): Integer stdcall;
begin
if uMsg = BFFM_INITIALIZED then
SendMessage(Wnd,BFFM_SETSELECTION,1,Integer(@configform.lg_StartFolder[1]));
result := 0;
end;
 
///////////////////////////////////////////////////////////////////
// This function allows the user to browse for a folder
//
// Arguments:-
// browseTitle : The title to display on the browse dialog.
// NewFolder : Allow to create a new folder
// initialFolder : Optional argument. Use to specify the folder
// initially selected when the dialog opens.
//
// Returns: The empty string if no folder was selected (i.e. if the
// user clicked cancel), otherwise the full folder path.
///////////////////////////////////////////////////////////////////
function BrowseForFolder(const browseTitle: String; const NewFolder: boolean = false;
const initialFolder: String =''): String;
var
browse_info: TBrowseInfo;
folder: array[0..MAX_PATH] of char;
find_context: PItemIDList;
const
BIF_NEWDIALOGSTYLE=$40;
begin
FillChar(browse_info,SizeOf(browse_info),#0);
configform.lg_StartFolder := initialFolder;
browse_info.pszDisplayName := @folder[0];
browse_info.lpszTitle := PChar(browseTitle);
if NewFolder then
browse_info.ulFlags := BIF_RETURNONLYFSDIRS or BIF_NEWDIALOGSTYLE
else
browse_info.ulFlags := BIF_RETURNONLYFSDIRS;
browse_info.hwndOwner := Application.Handle;
if initialFolder <> '' then
browse_info.lpfn := BrowseForFolderCallBack;
find_context := SHBrowseForFolder(browse_info);
if Assigned(find_context) then
begin
if SHGetPathFromIDList(find_context,folder) then
result := folder
else
result := '';
GlobalFreePtr(find_context);
end
else
result := '';
end;
 
procedure TConfigForm.btnOrdnerErstellenClick(Sender: TObject);
var
fol: string;
begin
fol := BrowseForFolder('Neuen Ordner hinzufügen', true, 'C:\');
if fol <> '' then
lstMusikOrdner.Items.Add(fol);
end;
 
end.
/trunk/Info.ddp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Info.dfm
0,0 → 1,322
object InfoForm: TInfoForm
Left = 255
Top = 151
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
Caption = #220'ber...'
ClientHeight = 161
ClientWidth = 383
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object lblInfo1: TLabel
Left = 48
Top = 8
Width = 132
Height = 13
Caption = 'ViaThinkSoft MusikBox'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
Transparent = True
end
object lblInfo2: TLabel
Left = 48
Top = 24
Width = 71
Height = 13
Caption = 'Version 1.5.0.0'
Transparent = True
end
object lblInfo3: TLabel
Left = 48
Top = 48
Width = 303
Height = 13
Caption = #169' Copyright 2005 - 2007 ViaThinkSoft. Alle Rechte vorbehalten!'
Transparent = True
end
object lblInfo4: TLabel
Left = 48
Top = 64
Width = 139
Height = 13
Caption = 'Projektleiter: Daniel Marschall'
Transparent = True
end
object imgCD: TImage
Left = 8
Top = 8
Width = 32
Height = 32
AutoSize = True
Picture.Data = {
055449636F6E0000010003001010000001000800680500003600000020201000
01000400E80200009E0500002020000001000800A80800008608000028000000
1000000020000000010008000000000040010000000000000000000000010000
0000000000000000000080000080000000808000800000008000800080800000
C0C0C000C0DCC000F0CAA600D4F0FF00B1E2FF008ED4FF006BC6FF0048B8FF00
25AAFF0000AAFF000092DC00007AB90000629600004A730000325000D4E3FF00
B1C7FF008EABFF006B8FFF004873FF002557FF000055FF000049DC00003DB900
003196000025730000195000D4D4FF00B1B1FF008E8EFF006B6BFF004848FF00
2525FF000000FE000000DC000000B900000096000000730000005000E3D4FF00
C7B1FF00AB8EFF008F6BFF007348FF005725FF005500FF004900DC003D00B900
310096002500730019005000F0D4FF00E2B1FF00D48EFF00C66BFF00B848FF00
AA25FF00AA00FF009200DC007A00B900620096004A00730032005000FFD4FF00
FFB1FF00FF8EFF00FF6BFF00FF48FF00FF25FF00FE00FE00DC00DC00B900B900
960096007300730050005000FFD4F000FFB1E200FF8ED400FF6BC600FF48B800
FF25AA00FF00AA00DC009200B9007A009600620073004A0050003200FFD4E300
FFB1C700FF8EAB00FF6B8F00FF487300FF255700FF005500DC004900B9003D00
960031007300250050001900FFD4D400FFB1B100FF8E8E00FF6B6B00FF484800
FF252500FE000000DC000000B9000000960000007300000050000000FFE3D400
FFC7B100FFAB8E00FF8F6B00FF734800FF572500FF550000DC490000B93D0000
963100007325000050190000FFF0D400FFE2B100FFD48E00FFC66B00FFB84800
FFAA2500FFAA0000DC920000B97A000096620000734A000050320000FFFFD400
FFFFB100FFFF8E00FFFF6B00FFFF4800FFFF2500FEFE0000DCDC0000B9B90000
969600007373000050500000F0FFD400E2FFB100D4FF8E00C6FF6B00B8FF4800
AAFF2500AAFF000092DC00007AB90000629600004A73000032500000E3FFD400
C7FFB100ABFF8E008FFF6B0073FF480057FF250055FF000049DC00003DB90000
319600002573000019500000D4FFD400B1FFB1008EFF8E006BFF6B0048FF4800
25FF250000FE000000DC000000B90000009600000073000000500000D4FFE300
B1FFC7008EFFAB006BFF8F0048FF730025FF570000FF550000DC490000B93D00
009631000073250000501900D4FFF000B1FFE2008EFFD4006BFFC60048FFB800
25FFAA0000FFAA0000DC920000B97A000096620000734A0000503200D4FFFF00
B1FFFF008EFFFF006BFFFF0048FFFF0025FFFF0000FEFE0000DCDC0000B9B900
009696000073730000505000F2F2F200E6E6E600DADADA00CECECE00C2C2C200
B6B6B600AAAAAA009E9E9E0092929200868686007A7A7A006E6E6E0062626200
565656004A4A4A003E3E3E0032323200262626001A1A1A000E0E0E00F0FBFF00
A4A0A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
FFFFFF0000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000BEBEBEBEBEBE00
00000000000000C6BEBEBEBEBEBEBEBEC6000000000000BEBEBEBEBEBEBEBEBE
BE0000000000FDFDBEBEC60000C6BEBEFAFA00000000FDFDFDFD00000000FAFA
FAFA00000000FAFAFAFA00000000FDFDFDFD00000000FAFABEBEC60000C6BEBE
FDFD0000000000BEBEBEBEBEBEBEBEBEBE000000000000C6BEBEBEBEBEBEBEBE
C60000000000000000BEBEBEBEBEBE0000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000FFFFFFFFF81FFFFFE007FFFFC003FFFF8001FFFF8001FFFF0000FFFF
0000FFFF0000FFFF0000FFFF8001FFFF8001FFFFC003FFFFE007FFFFF81FFFFF
FFFFFFFF28000000200000004000000001000400000000008002000000000000
0000000010000000000000000000000000008000008000000080800080000000
8000800080800000C0C0C000808080000000FF0000FF000000FFFF00FF000000
FF00FF00FFFF0000FFFFFF000000000000000000000000000000000000000000
0000888888888000000000000000000000800000000088800000000000000000
80000000000000000000000000000000000FAFAFAFA000000000000000000000
0AFAFAFAFAF00000000000000000000FAFAFAFAFAFA0000000000000000000FA
FAFAFAFAFAF000000000000000000FAFAFAFAFAFAFAF00000000000000000AFA
FAFAFAFAFAF88800000000000000AFAFAFAFAFAFAFA8880000A000000000FAFA
FAFAFAFAF8888F0000F00000000FAFAFAFAFA200027AFA0000000000000AFAFA
FAF72000002FFF0000000000000FAFAFAFA200000002DD0000000000000AFAFA
FA70000000007F0000000000000FAFAFAF70000000007AFAFAFA0080000AFAFA
FDD200000002AFAFAFAF0080000FAFADDFFF20000027FAFAFAFA0080000AFDDA
FAFA720002AFAFAFAFAF00000000AFAFAF8888FAFAFAFAFAFAF008000000FAFA
7888AFAFAFAFAFAFAFA0000000000FA78888FAFAFAFAFAFAFA00800000000A78
888FAFAFAFAFAFAFAF0000000000008888FAFAFAFAFAFAFAF000000000000008
8FAFAFAFAFAFAFAF00000000000000000AFAFAFAFAFAFA000000000000000000
000FAFAFAFAF0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000FFFFFFFFFFF007FFFFC001FFFF000FFFFE0018E3
FC001041F8001041F0001861E0000E59E0000249C0000249C000024980000279
80000201800382018007C3FF8007C001800380018000000180000003C0000003
C0000007E0000007E000000FF000001FF800003FFC00007FFE0000FFFF8003FF
FFE00FFFFFFFFFFFFFFFFFFF2800000020000000400000000100080000000000
8004000000000000000000000001000000000000000000000000800000800000
00808000800000008000800080800000C0C0C000C0DCC000F0CAA600D4F0FF00
B1E2FF008ED4FF006BC6FF0048B8FF0025AAFF0000AAFF000092DC00007AB900
00629600004A730000325000D4E3FF00B1C7FF008EABFF006B8FFF004873FF00
2557FF000055FF000049DC00003DB900003196000025730000195000D4D4FF00
B1B1FF008E8EFF006B6BFF004848FF002525FF000000FE000000DC000000B900
000096000000730000005000E3D4FF00C7B1FF00AB8EFF008F6BFF007348FF00
5725FF005500FF004900DC003D00B900310096002500730019005000F0D4FF00
E2B1FF00D48EFF00C66BFF00B848FF00AA25FF00AA00FF009200DC007A00B900
620096004A00730032005000FFD4FF00FFB1FF00FF8EFF00FF6BFF00FF48FF00
FF25FF00FE00FE00DC00DC00B900B900960096007300730050005000FFD4F000
FFB1E200FF8ED400FF6BC600FF48B800FF25AA00FF00AA00DC009200B9007A00
9600620073004A0050003200FFD4E300FFB1C700FF8EAB00FF6B8F00FF487300
FF255700FF005500DC004900B9003D00960031007300250050001900FFD4D400
FFB1B100FF8E8E00FF6B6B00FF484800FF252500FE000000DC000000B9000000
960000007300000050000000FFE3D400FFC7B100FFAB8E00FF8F6B00FF734800
FF572500FF550000DC490000B93D0000963100007325000050190000FFF0D400
FFE2B100FFD48E00FFC66B00FFB84800FFAA2500FFAA0000DC920000B97A0000
96620000734A000050320000FFFFD400FFFFB100FFFF8E00FFFF6B00FFFF4800
FFFF2500FEFE0000DCDC0000B9B90000969600007373000050500000F0FFD400
E2FFB100D4FF8E00C6FF6B00B8FF4800AAFF2500AAFF000092DC00007AB90000
629600004A73000032500000E3FFD400C7FFB100ABFF8E008FFF6B0073FF4800
57FF250055FF000049DC00003DB90000319600002573000019500000D4FFD400
B1FFB1008EFF8E006BFF6B0048FF480025FF250000FE000000DC000000B90000
009600000073000000500000D4FFE300B1FFC7008EFFAB006BFF8F0048FF7300
25FF570000FF550000DC490000B93D00009631000073250000501900D4FFF000
B1FFE2008EFFD4006BFFC60048FFB80025FFAA0000FFAA0000DC920000B97A00
0096620000734A0000503200D4FFFF00B1FFFF008EFFFF006BFFFF0048FFFF00
25FFFF0000FEFE0000DCDC0000B9B900009696000073730000505000F2F2F200
E6E6E600DADADA00CECECE00C2C2C200B6B6B600AAAAAA009E9E9E0092929200
868686007A7A7A006E6E6E0062626200565656004A4A4A003E3E3E0032323200
262626001A1A1A000E0E0E00F0FBFF00A4A0A000808080000000FF0000FF0000
00FFFF00FF000000FF00FF00FFFF0000FFFFFF00000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
EEEEEEEEEEEEEEEEEE000000000000000000000000000000000000000000EE00
0000000000000000EEEEEE0000000000000000000000000000000000EE000000
00000000000000000000000000000000000000000000000000000000000000BE
BEBEBEBEBEBEBE00000000000000000000000000000000000000000000BEBEBE
BEBEBEBEBEBEBE0000000000000000000000000000000000000000FFFFBEBEBE
BEBEBEBEBEBEBE00000000000000000000000000000000000000FFFFFFBEBEBE
BEBEBEBEBEBEBE000000000000000000000000000000000000BEBEFFFFFFBEBE
BEBEBEBEBEBEBEBE0000000000000000000000000000000000BEBEBEFFFFFFBE
BEBEBEBEBEBEBEB4B4B40000000000000000000000000000BEBEBEBEBEFFFFBE
BEBEBEBEBEBEBEB4B4B40000000047000000000000000000BEBEBEBEBEBEFFFF
BEBEBEBEBEB4B4B4B4B600000000470000000000000000BEBEBEBEBEBEBEBEFF
BEC8000000C8C0B6FAFA00000000000000000000000000BEBEBEBEBEBEBEBEC0
C80000000000C8FA474700000000000000000000000000BEBEBEBEBEBEBEBEC8
00000000000000C8FDFD00000000000000000000000000BEBEBEBEBEBE46C000
0000000000000000C04700000000000000000000000000BEBEBE46464647C000
0000000000000000C046BEBEBEBEBEBE0000EE00000000464646464747FDFDC8
00000000000000C8BEBEBEBEBEBEBEBE0000EE0000000046474747FDFD4747FA
C80000000000C8C0BEBEBEBEBEBEBEBE0000EE000000004747FDFD4747FAFAB6
C0C8000000C8BEFFBEBEBEBEBEBEBEBE000000000000000047474746FAB6B4B4
B4B4BEBEBEBEBEFFFFBEBEBEBEBEBE0000EE00000000000047474646B3B4B4B4
BEBEBEBEBEBEBEBEFFFFBEBEBEBEBE000000000000000000004646B3B4B4B4B4
BEBEBEBEBEBEBEBEFFFFFFBEBEBE0000EE000000000000000046B3B4B4B4B4BE
BEBEBEBEBEBEBEBEBEFFFFFFBEBE000000000000000000000000B4B4B4B4BEBE
BEBEBEBEBEBEBEBEBEBEFFFFFF0000000000000000000000000000B4B4BEBEBE
BEBEBEBEBEBEBEBEBEBEFFFF0000000000000000000000000000000000BEBEBE
BEBEBEBEBEBEBEBEBEBE000000000000000000000000000000000000000000BE
BEBEBEBEBEBEBEBE000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000FFFFFFFFFFF007FFFFC001FF
FF000FFFFE0018E3FC001041F8001041F0001861E0000E59E0000249C0000249
C00002498000027980000201800382018007C3FF8007C0018003800180000001
80000003C0000003C0000007E0000007E000000FF000001FF800003FFC00007F
FE0000FFFF8003FFFFE00FFFFFFFFFFFFFFFFFFF}
Transparent = True
end
object imgWeb: TImage
Left = 48
Top = 88
Width = 24
Height = 24
AutoSize = True
Picture.Data = {
07544269746D6170F6060000424DF60600000000000036000000280000001800
0000180000000100180000000000C0060000C40E0000C40E0000000000000000
0000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF7FFFF9CADA55A6B63
213939294242315A6329524A5A6B6BA5ADADFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF526B6300
2921183931214239214239214239294A52295A521842390018180000085A6B63
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFC6CE
CE184231295242315A4A315A4A29524A29524229524218314A294A4A21423931
6363213942001818001010C6C6C6FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFA5B5AD184A39396B5A396B5A396B5A396B5A396B5A3963523963522139
4A18314229524229524A396B732942521021210000089CADA5FF00FFFF00FFFF
00FFFF00FFFF00FFCEDED62963424A7B634A846B52846B52846B4A7B6B427B63
4A7B63183139183142295A52294A4A214A4A315A63427B941839391821290000
08C6CECEFF00FFFF00FFFF00FFFF00FF396B5A52846B5A94735A947B639C7B5A
94735A94735A947B315252294A52316352214A42295242214A4A214A42396B73
315A63102121182929001010FF00FFFF00FFFF00FF8CAD9C528C736B9C846BA5
846BA5846BAD8C6BAD846BA58463A57B183142295A4A21423921393118313121
4242214A42294A4A31636321424218292900182163737BFF00FFFF00FF528C6B
73AD8C7BB5947BB5947BB5947BB59473AD8C73B58C73B58C183939295A4A2142
39183931183931183931183131183931214A42214239183131102931001010FF
00FFCEDED66BA58484BD9484BD9C8CBDA584BD9C84BD9C84BD9C84B5948CC69C
639484183942295A4A315252214242214242183131396352315A4A214A392139
31183131001818B5BDC6A5C6B584B5948CC6A594C6AD94C6AD94C6AD94C6AD94
C6AD9CCEAD5A847352846B103139183939214A52214A4A4273634A7B6B39735A
31635229524221423918313110212173848494C6A594C6A59CCEAD9CD6B5A5CE
B5A5D6B5B5E7C6A5D6B54A736B42635AA5D6BD73A5846B9C8473A5846BA58463
9C7B528C73427B63316352295A4A294A391839391829294252528CC6A59CCEB5
A5D6BDADDEBDB5DEC6B5DEC6426B63103139395252B5DEBDA5D6B58CBDA56B9C
847BB59473AD8C63A57B5A94734A7B6B396B5A31634A29524221423918292939
5A5A9CCEADADDEBDB5DEC6BDDEC6D6F7D621395221394AE7F7DE637B6BC6E7CE
738C8484AD9484AD9484BD9C7BB5946BAD8C639C7B528C734273633163522952
42214239214A42396363A5D6BDBDDEC6C6E7CED6F7D694B5A518314A294242FF
FFFFFFFFFFE7E7DE9CBDA5BDE7CE9CCEB58CBD9C7BBD946BAD8C63A57B528C73
427B6B396B52315A4A214A391842394A6B63BDE7CEC6E7CECEEFD6CEEFD62942
4A294A5A214A42425A5A6B8484395252A5C6B5C6EFD69CCEB58CBDA584BD9473
AD8C6BA5845A94734A7B63396B5A295A4A214239184A427B948CD6E7DEC6E7CE
E7F7EFC6DECE214A52295273396373183931213931214242183131B5DEC6A5D6
BD8CC6AD84BD9C7BB5946BAD845A94734A846B396B5A295A4A215242002921C6
C6C6FF00FFBDE7CEF7FFFF849C9418314221394A315A73315A4A21423921524A
214A4A526B6BB5E7C694CEAD8CBDA57BB5946BAD8C639C7B4A846B396B5A315A
4A214242082121FF00FFFF00FFD6E7DEEFFFFFA5B5AD08294A21395229527331
5A5A214A4229424231525218393942635A84B59C94C6A57BBD946BAD8C5A947B
4A846B396B5A295A4A0829317B8C94FF00FFFF00FFF7FFFFD6E7DEFFFFFF4263
6B18394242738C315A5A294A4A294A4A21423929525218313952846B52846B7B
BD946BA5845A9473427B63396B5A295252082121FF00FFFF00FFFF00FFFF00FF
EFF7F7E7F7EFADB5B50821314A849C295252214A422139397B9484295252295A
63395A4A94CEAD7BB5946BA584528C73427B63295A4A000810DEDEDEFF00FFFF
00FFFF00FFFF00FFFF00FFEFF7F7CEDED618314A426B73315A521839318CAD9C
C6EFD62142396B947BA5DEB563948473AD8C639C7B4A846B295242001010C6C6
C6FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF7FFFF18394210313921
4A4A214A42183131425A5A39635A7BA58C426B73183139639C7B427363295A4A
082921DEDEDEFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FF6B84845A846B42635A6B8C7B4A636363847B396B6B00295A21393942
8463215242738484FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFE7F7EFB5DEC694BD9C63847B526B
736B8C849CBDA5C6D6CEFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FF}
Transparent = True
end
object lblWeb1: TLabel
Left = 80
Top = 88
Width = 133
Height = 13
Cursor = crHandPoint
Hint = 'www.daniel-marschall.de'
Caption = 'Daniel Marschall'#39's Webseite'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
OnClick = lblWeb1Click
end
object lblWeb2: TLabel
Left = 80
Top = 104
Width = 61
Height = 13
Cursor = crHandPoint
Hint = 'www.viathinksoft.de'
Caption = 'ViaThinkSoft'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
OnClick = lblWeb2Click
end
object lblClose: TButton
Left = 223
Top = 128
Width = 154
Height = 25
Cancel = True
Caption = 'Schlie'#223'en'
Default = True
TabOrder = 0
OnClick = lblCloseClick
end
object Button1: TButton
Left = 6
Top = 128
Width = 155
Height = 25
Caption = 'Update verf'#252'gbar?'
TabOrder = 1
OnClick = Button1Click
end
end
/trunk/Info.pas
0,0 → 1,151
unit Info;
 
interface
 
uses
Windows, SysUtils, Classes, Forms, StdCtrls, ExtCtrls, ShellApi,
Graphics, Controls, wininet;
 
type
TInfoForm = class(TForm)
lblInfo1: TLabel;
lblInfo2: TLabel;
lblInfo3: TLabel;
lblInfo4: TLabel;
imgCD: TImage;
imgWeb: TImage;
lblWeb1: TLabel;
lblWeb2: TLabel;
lblClose: TButton;
Button1: TButton;
procedure lblCloseClick(Sender: TObject);
procedure lblWeb1Click(Sender: TObject);
procedure lblWeb2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
end;
 
var
InfoForm: TInfoForm;
 
implementation
 
{$R *.dfm}
 
// http://www.delphipraxis.net/post43515.html
Function GetHTML(AUrl: string): string;
var
databuffer : array[0..4095] of char;
ResStr : string;
hSession, hfile: hInternet;
dwindex,dwcodelen,dwread,dwNumber: cardinal;
dwcode : array[1..20] of char;
res : pchar;
Str : pchar;
begin
ResStr:='';
if pos('http://',lowercase(AUrl))=0 then
AUrl:='http://'+AUrl;
 
// Hinzugefügt
application.ProcessMessages;
 
hSession:=InternetOpen('InetURL:/1.0',
INTERNET_OPEN_TYPE_PRECONFIG,
nil,
nil,
0);
if assigned(hsession) then
begin
// Hinzugefügt
application.ProcessMessages;
 
hfile:=InternetOpenUrl(
hsession,
pchar(AUrl),
nil,
0,
INTERNET_FLAG_RELOAD,
0);
dwIndex := 0;
dwCodeLen := 10;
 
// Hinzugefügt
application.ProcessMessages;
 
HttpQueryInfo(hfile,
HTTP_QUERY_STATUS_CODE,
@dwcode,
dwcodeLen,
dwIndex);
res := pchar(@dwcode);
dwNumber := sizeof(databuffer)-1;
if (res ='200') or (res ='302') then
begin
while (InternetReadfile(hfile,
@databuffer,
dwNumber,
DwRead)) do
begin
 
// Hinzugefügt
application.ProcessMessages;
 
if dwRead =0 then
break;
databuffer[dwread]:=#0;
Str := pchar(@databuffer);
resStr := resStr + Str;
end;
end
else
ResStr := 'Status:'+res;
if assigned(hfile) then
InternetCloseHandle(hfile);
end;
 
// Hinzugefügt
application.ProcessMessages;
 
InternetCloseHandle(hsession);
Result := resStr;
end;
 
procedure TInfoForm.Button1Click(Sender: TObject);
var
temp: string;
begin
temp := GetHTML('http://www.viathinksoft.de/update/?id=musikbox');
if copy(temp, 0, 7) = 'Status:' then
begin
Application.MessageBox('Ein Fehler ist aufgetreten. Wahrscheinlich ist keine Internetverbindung aufgebaut, oder der der ViaThinkSoft-Server temporär offline.', 'Fehler', MB_OK + MB_ICONERROR)
end
else
begin
if GetHTML('http://www.viathinksoft.de/update/?id=musikbox') <> '1.5' then
begin
if Application.MessageBox('Eine neue Programmversion ist vorhanden. Möchten Sie diese jetzt herunterladen?', 'Information', MB_YESNO + MB_ICONASTERISK) = ID_YES then
shellexecute(application.handle, 'open', pchar('http://www.viathinksoft.de/update/?id=@musikbox'), '', '', sw_normal);
end
else
begin
Application.MessageBox('Es ist keine neue Programmversion vorhanden.', 'Information', MB_OK + MB_ICONASTERISK);
end;
end;
end;
 
procedure TInfoForm.lblCloseClick(Sender: TObject);
begin
close;
end;
 
procedure TInfoForm.lblWeb1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'http://www.daniel-marschall.de/', nil, nil, SW_SHOWNORMAL);
end;
 
procedure TInfoForm.lblWeb2Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'http://www.viathinksoft.de/', nil, nil, SW_SHOWNORMAL);
end;
 
end.
/trunk/LICENSE.TXT
0,0 → 1,202
 
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
 
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 
1. Definitions.
 
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
 
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
 
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
 
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
 
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
 
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
 
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
 
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
 
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
 
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
 
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
 
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
 
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
 
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
 
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
 
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
 
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
 
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
 
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
 
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
 
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
 
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
 
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
 
END OF TERMS AND CONDITIONS
 
APPENDIX: How to apply the Apache License to your work.
 
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
 
Copyright 2007 Daniel Marschall, ViaThinkSoft
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
/trunk/Main.ddp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Main.dfm
0,0 → 1,419
object MainForm: TMainForm
Left = 236
Top = 134
BorderIcons = [biSystemMenu, biMinimize]
Caption = 'MusikBox 1.5'
ClientHeight = 400
ClientWidth = 721
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
OnCanResize = FormCanResize
OnCreate = FormCreate
OnDestroy = FormDestroy
OnResize = FormResize
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object lblOrdner: TLabel
Left = 8
Top = 8
Width = 67
Height = 13
Caption = 'Ordnerstruktur'
Transparent = True
end
object lblSongs: TLabel
Left = 232
Top = 8
Width = 30
Height = 13
Caption = 'Songs'
Transparent = True
end
object Status1: TLabel
Left = 231
Top = 362
Width = 95
Height = 13
Caption = '00:00:00 / 00:00:00'
Transparent = True
end
object Status2: TLabel
Left = 392
Top = 362
Width = 66
Height = 13
Alignment = taRightJustify
AutoSize = False
Caption = '0%'
Transparent = True
end
object lstSongs: TListBox
Left = 232
Top = 24
Width = 225
Height = 313
ItemHeight = 13
TabOrder = 0
OnClick = lstSongsClick
end
object sbrCopyright: TStatusBar
Left = 0
Top = 381
Width = 721
Height = 19
Cursor = crHandPoint
Panels = <
item
Text = #169' Copyright 2005 - 2007 ViaThinkSoft. Alle Rechte vorbehalten!'
Width = 50
end>
OnClick = sbrCopyrightClick
end
object btnStart: TButton
Left = 464
Top = 344
Width = 105
Height = 31
Caption = 'Start'
Default = True
Enabled = False
TabOrder = 2
OnClick = btnStartClick
end
object BtnStopp: TButton
Left = 648
Top = 344
Width = 65
Height = 31
Caption = 'Stopp'
Enabled = False
TabOrder = 3
OnClick = BtnStoppClick
end
object btnPause: TButton
Left = 576
Top = 344
Width = 65
Height = 31
Caption = 'Pause'
Enabled = False
TabOrder = 4
OnClick = btnPauseClick
end
object btnOrdner: TButton
Left = 120
Top = 344
Width = 105
Height = 31
Caption = 'Konfiguration'
TabOrder = 5
OnClick = btnOrdnerClick
end
object lstOrdner: TTreeView
Left = 8
Top = 24
Width = 217
Height = 313
Images = ImgList
Indent = 19
ReadOnly = True
TabOrder = 6
OnChange = lstOrdnerChange
end
object MediaPlayer: TMediaPlayer
Left = 16
Top = 64
Width = 29
Height = 30
EnabledButtons = [btPlay]
VisibleButtons = [btPlay]
Visible = False
TabOrder = 7
end
object grpPlayMode: TGroupBox
Left = 464
Top = 16
Width = 249
Height = 121
Caption = 'Spieloptionen'
TabOrder = 8
object chkRepeatSong: TCheckBox
Left = 11
Top = 24
Width = 230
Height = 17
Caption = 'Aktuellen Song in einer Schleife wiederholen'
TabOrder = 0
OnClick = chkRepeatSongClick
end
object radPlayMode1: TRadioButton
Left = 16
Top = 48
Width = 193
Height = 17
Caption = 'Songs in einer Schleife durchlaufen'
TabOrder = 1
end
object radPlayMode2: TRadioButton
Left = 16
Top = 64
Width = 193
Height = 17
Caption = 'Zuf'#228'llige Wiedergabe der Songs'
TabOrder = 2
end
object radPlayMode3: TRadioButton
Left = 16
Top = 80
Width = 193
Height = 17
Caption = 'Song einzeln spielen'
TabOrder = 3
end
end
object grpRunMode: TGroupBox
Left = 464
Top = 144
Width = 249
Height = 97
Caption = 'Startoptionen'
TabOrder = 9
object radRunMode1: TRadioButton
Left = 8
Top = 24
Width = 225
Height = 17
Caption = 'Songs sofort nach Ordnerauswahl spielen'
TabOrder = 0
end
object radRunMode2: TRadioButton
Left = 8
Top = 40
Width = 225
Height = 17
Caption = 'Song erst nach anklicken spielen'
TabOrder = 1
end
object radRunMode3: TRadioButton
Left = 8
Top = 56
Width = 233
Height = 17
Caption = 'Song erst nach anklicken von "Start" spielen'
TabOrder = 2
end
end
object grpVolume: TGroupBox
Left = 464
Top = 248
Width = 249
Height = 89
Caption = 'Lautst'#228'rke'
TabOrder = 10
object lblVolume: TLabel
Left = 8
Top = 24
Width = 50
Height = 13
Caption = 'Lautst'#228'rke'
Transparent = True
end
object VolProc: TLabel
Left = 175
Top = 24
Width = 66
Height = 13
Alignment = taRightJustify
AutoSize = False
Caption = '0%'
Transparent = True
end
object pgrVolume: TProgressBar
Left = 8
Top = 48
Width = 233
Height = 17
DragMode = dmAutomatic
Max = 1000
Smooth = True
TabOrder = 0
OnDragOver = pgrVolumeDragOver
end
end
object btnBeenden: TButton
Left = 8
Top = 344
Width = 105
Height = 31
Cancel = True
Caption = 'Beenden'
TabOrder = 11
OnClick = btnBeendenClick
end
object ggeProgress: TProgressBar
Left = 231
Top = 343
Width = 227
Height = 18
Cursor = crHandPoint
Smooth = True
TabOrder = 12
OnMouseDown = ggeProgressMouseDown
end
object ImgList: TImageList
Left = 48
Top = 32
Bitmap = {
494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000001000000001002000000000000010
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000C9C9C9009695940087868600817E7D00817E7D00AFB0AF000000
0000000000000000000000000000000000000000000000000000DFDFDF00D6D6
D600D6D6D600D6D6D600D6D6D600D6D6D600D6D6D600D6D6D600D6D6D600D6D6
D600D6D6D600D6D6D600DFDFDF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000C4C3
C200B7AFAD00FBE4DD00F6E4DF00F5E9E500F5E9E500FBF7F500D2D2D2007779
79009695940000000000000000000000000000000000C8C8C800838383006C6C
6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C6C006C6C
6C006C6C6C006C6C6C0083838300C8C8C8000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000BCBBBB00FFDA
CD00F8D3C800F7D4C800F7D9D000F6E0D900F6E2DC00F5E9E500F3F3F300FDFD
FD00D2D2D200969594000000000000000000DFDFDF001D82B5001B81B300187E
B000167CAE001379AB001076A8000D73A5000B71A300086EA000066C9E00046A
9C0002689A00016799004B4B4B00838383000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000D7C0B900F9CC
BD00F9CCBD00F8D3C800F7D9D000F7DCD300F6E0D900F5E9E500F3F3F300F6F5
F500FDFDFD007779790000000000000000002287BA0067CCFF002085B80099FF
FF006FD4FF006FD4FF006FD4FF006FD4FF006FD4FF006FD4FF006FD4FF006FD4
FF003BA0D30099FFFF00016799006D6D6D000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000C0BEBE00FBE4DD00F8D2
C500F8D2C500F9CCBD00F8D2C500F7D1D300F7D1CC00F2F1F100F3F3F300F3F3
F400F3F4F400DDDAD900ADABAA0000000000258ABD0067CCFF00278CBF0099FF
FF007BE0FF007BE0FF007BE0FF007BE0FF007BE0FF007BE0FF007BE0FF007BE0
FF0044A9DC0099FFFF0002689A006C6C6C000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000CAC2BF00F6DED600F7D9
D000F7D5CA00F7D1CC00F9D3EE00E9C6D400F6D3E400F5EBF200F3F3F300F6E4
DF00F7DCD300FFD3C400817E7D0000000000288DC00067CCFF002D92C50099FF
FF0085EBFF0085EBFF0085EBFF0085EBFF0085EBFF0085EBFF0085EBFF0085EB
FF004EB3E60099FFFF00046A9C006C6C6C000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000E1E1E100F0E2DD00F6E2DC00F6DE
D600F7D9D000F5EBF200A08B85007779790066666300F0E7E600F6D2C500F9CB
BB00F9CBBB00F9CCBD00817E7D00000000002A8FC20067CCFF003398CB0099FF
FF0091F7FF0091F7FF0091F7FF0091F7FF0091F7FF0091F7FF0091F7FF0091F7
FF0057BCEF0099FFFF00066C9E006C6C6C000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000E1E1E100F7D9D000F7D8CE00F7D5
CA00F7D4C800F5EBF20066666300817E7D0077797900E5D3CD00F7DCD300F8D2
C500F7D4C800F7D8CE008B817C00000000002D92C5006FD4FF003499CC0099FF
FF0099FFFF0099FFFF0099FFFF0099FFFF0099FFFF0099FFFF0099FFFF0099FF
FF0060C5F80099FFFF00086EA0006D6D6D000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000E6C9C000F9CBBB00F9CB
BB00F9CCBD00F5E9ED00D5D0D200666663008B817C00F5E9ED00F7D4C800F7D9
D000F7D9D000FBE4DD0096959400000000002F94C7007BE0FF002D92C500FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF0081E6FF00FFFFFF000B71A3008C8C8C000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000C9BCB700F6E4DF00F2F1
F100F3F4F400F3F4F300F5DAE900FAC8E900F9D3EE00F7D6CE00F9CBBB00F8D2
C500F7D5CA00FFE7DF00C0BEBE00000000003196C90085EBFF0081E6FF002D92
C5002D92C5002D92C5002D92C5002D92C5002D92C500288DC0002489BC002085
B8001C81B4001B81B3001B81B300DFDFDF000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000CECECE00F7F7F700F3F3
F300F3F3F300F3F4F400F6E2DC00F7DCD300F7D8CE00F7D5CA00F6D2C500F9CB
BB00F8D0C300C1B5B10000000000000000003398CB0091F7FF008EF4FF008EF4
FF008EF4FF008EF4FF008EF4FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00167CAE008C8C8C00DEDEDE00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000DAD9D900F4F4
F400F3F3F300F3F3F300F6E2DC00F6E0D900F6DED600F7D9D000F8D3C800F9CC
BD00FFDACD00B8B6B50000000000000000003499CC00FFFFFF0099FFFF0099FF
FF0099FFFF0099FFFF00FFFFFF00258ABD002287BA001F84B7001D82B5001B81
B300187EB000DFDFDF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000DCDCDC00DCDC
DC00F6F5F500F4F3F400F4E6E200F6E2DC00F6E0D900F6DED600FDDFD500E6C9
C000BDB8B600000000000000000000000000000000003499CC00FFFFFF00FFFF
FF00FFFFFF00FFFFFF002A8FC200C8C8C8000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000CECECE00CECECE00E7E3E100F4E6E200F4E6E200D7C9C500C0BEBE000000
00000000000000000000000000000000000000000000000000003499CC003398
CB003196C9002F94C700DFDFDF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000EAEAEA00DAD9D900DCDCDC0000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000424D3E000000000000003E000000
2800000040000000100000000100010000000000800000000000000000000000
000000000000000000000000FFFFFF00FFFFFFFF00000000F81FC00100000000
E007800000000000C003000000000000C0030000000000008001000000000000
8001000000000000000100000000000000010000000000008001000000000000
80010000000000008003000100000000C003000300000000C00780FF00000000
F01FC1FF00000000FC7FFFFF0000000000000000000000000000000000000000
000000000000}
end
object plyTimer: TTimer
Interval = 100
OnTimer = plyTimerTimer
Left = 16
Top = 32
end
end
/trunk/Main.pas
0,0 → 1,690
unit Main;
 
interface
 
uses
Windows, Messages, Forms, SysUtils, StdCtrls, IniFiles, MPlayer,
Gauges, ComCtrls, ImgList, Controls, Classes, ExtCtrls,
WaveControl, registry, Dialogs, math;
 
type
TStringDynArray = array of string;
 
TMainForm = class(TForm)
lblOrdner: TLabel;
lstSongs: TListBox;
lblSongs: TLabel;
sbrCopyright: TStatusBar;
btnStart: TButton;
BtnStopp: TButton;
btnPause: TButton;
btnOrdner: TButton;
lstOrdner: TTreeView;
ImgList: TImageList;
MediaPlayer: TMediaPlayer;
plyTimer: TTimer;
grpPlayMode: TGroupBox;
chkRepeatSong: TCheckBox;
radPlayMode1: TRadioButton;
radPlayMode2: TRadioButton;
radPlayMode3: TRadioButton;
grpRunMode: TGroupBox;
radRunMode1: TRadioButton;
radRunMode2: TRadioButton;
radRunMode3: TRadioButton;
grpVolume: TGroupBox;
lblVolume: TLabel;
pgrVolume: TProgressBar;
btnBeenden: TButton;
ggeProgress: TProgressBar;
Status1: TLabel;
Status2: TLabel;
VolProc: TLabel;
procedure FormShow(Sender: TObject);
procedure lstSongsClick(Sender: TObject);
procedure plyTimerTimer(Sender: TObject);
procedure btnPauseClick(Sender: TObject);
procedure BtnStoppClick(Sender: TObject);
procedure btnStartClick(Sender: TObject);
procedure pgrVolumeDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure lstOrdnerChange(Sender: TObject; Node: TTreeNode);
procedure chkRepeatSongClick(Sender: TObject);
procedure sbrCopyrightClick(Sender: TObject);
procedure btnBeendenClick(Sender: TObject);
procedure btnOrdnerClick(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormCanResize(Sender: TObject; var NewWidth, NewHeight: Integer;
var Resize: Boolean);
procedure ggeProgressMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
public
// VCL-Ersatz start
volWave: TWaveVolumeSetting;
// VCL-Ersatz ende
ini: TIniFile;
MusikArray, FormatArray: TStringDynArray;
ExtentionsArray: array of string;
ActualPath: string;
Playing: boolean;
ActualVolume: integer;
procedure ListeOrdner(ArrayElement: integer; zusatz: string; node: TTreeNode);
procedure InitDirectories();
procedure SchreibeEinstellung();
procedure NextSong();
function MCIExtensions(): string;
end;
 
var
MainForm: TMainForm;
 
implementation
 
uses Info, Config;
 
{$R *.dfm}
 
{$R windowsxp.res}
 
// http://www.delphipraxis.net/post592358.html
function IsFileDRMProtected(AFileName: String): Boolean;
var lCheckProc: function(const AFileName: PWideChar; var AIsProtected: Bool): HRESULT; stdcall;
lLibHandle: Cardinal;
lWideChar : PWideChar;
lRes : HRESULT;
lIsProtected: Bool;
begin
lLibHandle := LoadLibrary('wmvcore.dll');
if (lLibHandle > 0) then
begin
lCheckProc := GetProcAddress(lLibHandle, 'WMIsContentProtected');
if Assigned(lCheckProc) then
begin
GetMem(lWideChar, MAX_PATH * SizeOf(WideChar));
StringToWideChar(AFileName, lWideChar, MAX_PATH);
lRes := lCheckProc(lWideChar, lIsProtected);
case lRes of
S_OK: result := lIsProtected
else result := False;
end;
end
else
result := False;
end
else
result := False;
end;
 
// http://www.luckie-online.de/Delphi/Sonstiges/Explode.html
function Explode(const Separator, S: string; Limit: Integer = 0):
TStringDynArray;
var
SepLen : Integer;
F, P : PChar;
ALen, Index : Integer;
begin
SetLength(Result, 0);
if (S = '') or (Limit < 0) then
Exit;
if Separator = '' then
begin
SetLength(Result, 1);
Result[0] := S;
Exit;
end;
SepLen := Length(Separator);
ALen := Limit;
SetLength(Result, ALen);
 
Index := 0;
P := PChar(S);
while P^ <> #0 do
begin
F := P;
P := StrPos(P, PChar(Separator));
if (P = nil) or ((Limit > 0) and (Index = Limit - 1)) then
P := StrEnd(F);
if Index >= ALen then
begin
Inc(ALen, 5); // mehrere auf einmal um schneller arbeiten zu können
SetLength(Result, ALen);
end;
SetString(Result[Index], F, P - F);
Inc(Index);
if P^ <> #0 then
Inc(P, SepLen);
end;
if Index < ALen then
SetLength(Result, Index); // wirkliche Länge festlegen
end;
 
procedure TMainForm.InitDirectories();
var
i: integer;
mnod: TTreeNode;
begin
if btnStopp.Enabled then btnStopp.Click;
btnStart.Enabled := false;
mediaplayer.FileName := '';
 
lstSongs.Items.Clear;
lblSongs.Caption := 'Songs';
 
ActualPath := '';
lstOrdner.Items.Clear;
for i := 0 to length(MusikArray)-1 do
begin
if DirectoryExists(MusikArray[i]) then
begin
mnod := lstOrdner.Items.Add(nil, MusikArray[i]);
ListeOrdner(i, '', mnod);
mnod.ImageIndex := 0;
mnod.Expand(false);
end;
end;
end;
 
function TMainForm.MCIExtensions(): string;
var
Reg: TRegistry;
inifile: TIniFile;
sl: TStringList;
WindowsDir: string;
WinDir: String;
WinLen: DWord;
i: integer;
begin
sl := TStringList.Create();
 
// Registry prüfen (ab Windows NT)
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions\') then
Reg.GetValueNames(sl)
else
begin
// Win.ini, wenn Registry fehlschlägt (ab Windows 95)
SetLength(WinDir, MAX_PATH);
WinLen := GetWindowsDirectory(PChar(WinDir), MAX_PATH);
if WinLen > 0 then
begin
SetLength(WinDir, WinLen);
WindowsDir := WinDir;
end
else
RaiseLastOSError;
 
if fileexists(WindowsDir+'\win.ini') then
begin
inifile := TIniFile.Create(WindowsDir+'\win.ini');
try
if inifile.SectionExists('mci extensions') then
inifile.ReadSection('mci extensions', sl)
else
if inifile.SectionExists('MCI Extensions.BAK') then
inifile.ReadSection('MCI Extensions.BAK', sl);
finally
inifile.Free;
end;
end;
end;
Reg.CloseKey;
Reg.Free;
 
if sl.count = 0 then
begin
showmessage('Warnung! Es konnten keine MCI-Erweiterungen gefunden werden. Das Programm wird beendet.');
close;
end
else
begin
result := '';
for i := 0 to sl.count-1 do
result := result + lowercase(sl.strings[i]) + '|';
result := copy(result, 0, length(result)-1);
end;
end;
 
procedure TMainForm.FormShow(Sender: TObject);
var
MusicPath, Formats: string;
PlayMode, RunMode: integer;
RepeatPlay: boolean;
begin
// Lese INI-Einstellungen
ini := TIniFile.Create(extractfilepath(application.ExeName)+'Settings.ini');
try
MusicPath := ini.ReadString('Configuration', 'Path', '');
PlayMode := ini.ReadInteger('Configuration', 'PlayMode', 1);
RunMode := ini.ReadInteger('Configuration', 'RunMode', 1);
RepeatPlay := ini.ReadBool('Configuration', 'RepeatPlay', false);
ClientWidth := ini.ReadInteger('Configuration', 'ClientWidth', ClientWidth);
ClientHeight := ini.ReadInteger('Configuration', 'ClientHeight', ClientHeight);
finally
ini.Free;
end;
 
// MCI-Erweiterungen lesen
Formats := MCIExtensions();
 
// Anwenden von Einstellungen
if PlayMode = 1 then radPlayMode1.Checked := true;
if PlayMode = 2 then radPlayMode2.Checked := true;
if PlayMode = 3 then radPlayMode3.Checked := true;
if RunMode = 1 then radRunMode1.Checked := true;
if RunMode = 2 then radRunMode2.Checked := true;
if RunMode = 3 then radRunMode3.Checked := true;
chkRepeatSong.Checked := RepeatPlay;
chkRepeatSongClick(self);
 
// Zerteile Verzeichnisliste
MusikArray := Explode('|', MusicPath);
FormatArray := Explode('|', Formats);
 
InitDirectories();
end;
 
procedure TMainForm.ggeProgressMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (mediaplayer.FileName <> '') and (not IsFileDRMProtected(mediaplayer.filename)) then
begin
btnstart.Click;
mediaplayer.Position := round(x / ggeProgress.Width * mediaplayer.length);
mediaplayer.play;
end;
end;
 
procedure TMainForm.ListeOrdner(ArrayElement: integer; zusatz: string; node: TTreeNode);
var
SR: TSearchRec;
RootFolder: string;
mnod: TTreeNode;
begin
RootFolder := MusikArray[ArrayElement]+'\'+zusatz;
 
if AnsiLastChar(RootFolder)^ <> '\' then
RootFolder := RootFolder + '\';
 
if FindFirst(RootFolder + '*.*', faDirectory, SR) = 0 then
try
repeat
if ((SR.Attr and faDirectory) = faDirectory) and
(SR.Name <> '.') and (SR.Name <> '..') then
begin
mnod := lstOrdner.Items.AddChild(node, SR.Name);
ListeOrdner(ArrayElement, zusatz+SR.Name+'\', mnod);
mnod.ImageIndex := 1;
mnod.SelectedIndex := 1;
mnod.Expand(false);
end;
until FindNext(SR) <> 0;
finally
FindClose(SR);
end;
end;
 
procedure TMainForm.lstSongsClick(Sender: TObject);
begin
if mediaplayer.filename <> ActualPath+lstsongs.Items.Strings[lstSongs.ItemIndex]+ExtentionsArray[lstSongs.ItemIndex] then
begin
mediaplayer.filename := ActualPath+lstsongs.Items.Strings[lstSongs.ItemIndex]+ExtentionsArray[lstSongs.ItemIndex];
if BtnStopp.Enabled then BtnStopp.Click;
btnStart.Enabled := true;
if radRunMode2.Checked or radRunMode1.Checked then
BtnStart.Click;
end;
end;
 
function zweinull(inp: integer): string;
begin
if inp >= 10 then
result := inttostr(inp)
else
result := '0' + inttostr(inp);
end;
 
// Millisekunden zu hh:mm:ss
function mstotimestr(inp: integer): string;
var
h, m, s: integer;
begin
result := '';
m := (inp div 1000) div 60;
h := 0;
while m >= 60 do
begin
inc(h);
m := m - 60;
end;
s := (inp div 1000) - m * 60;
result := zweinull(h)+':'+zweinull(m)+':'+zweinull(s);
end;
 
procedure TMainForm.plyTimerTimer(Sender: TObject);
begin
pgrVolume.Position := 1000 - volWave.Position;
VolProc.Caption := inttostr(100 - round(volWave.Position / 1000 * 100))+'%';
if Playing then
begin
ggeProgress.Max := mediaplayer.Length;
ggeProgress.Position := mediaplayer.Position;
Status1.caption := mstotimestr(mediaplayer.Position) + ' / ' + mstotimestr(mediaplayer.Length);
Status2.caption := inttostr(floor(ggeprogress.Position / ggeprogress.Max * 100)) + '%';
if mediaplayer.Position >= mediaplayer.Length then
begin
mediaplayer.Rewind;
nextsong;
end;
end;
end;
 
procedure TMainForm.btnPauseClick(Sender: TObject);
begin
mediaplayer.Pause;
btnStart.Enabled := true;
btnPause.Enabled := false;
end;
 
procedure TMainForm.BtnStoppClick(Sender: TObject);
begin
Playing := false;
 
mediaplayer.Stop;
mediaplayer.close;
 
ggeProgress.Position := 0;
ggeProgress.Max := 0;
Status1.Caption := '00:00:00';
Status2.Caption := '0%';
 
BtnStopp.Enabled := false;
BtnPause.Enabled := false;
BtnStart.Enabled := true;
end;
 
// http://www.wer-weiss-was.de/theme159/article1483880.html
procedure delay(nDelay: Integer);
var
nStart : Integer;
begin
nStart := GetTickCount;
while Integer(GetTickCount)-nStart < nDelay do
begin
Application.ProcessMessages;
Sleep(0);
end;
end;
 
procedure TMainForm.btnStartClick(Sender: TObject);
begin
if IsFileDRMProtected(mediaplayer.filename) then
begin
delay(250);
NextSong;
end
else
begin
 
if btnStopp.Enabled then
mediaplayer.Play
else
begin
mediaplayer.Open;
mediaplayer.Play;
playing := true;
end;
 
BtnStart.Enabled := false;
BtnPause.Enabled := true;
BtnStopp.Enabled := true;
end;
 
end;
 
procedure TMainForm.pgrVolumeDragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
begin
pgrVolume.Position := round(pgrVolume.Max * (abs(x)/pgrVolume.Width));
ActualVolume := round(1000 * (abs(x)/pgrVolume.Width));
volWave.Position := 1000-ActualVolume;
end;
 
procedure TMainForm.lstOrdnerChange(Sender: TObject; Node: TTreeNode);
var
Path, ext: string;
Aktuell: TTreeNode;
sr: TSearchRec;
res, i: integer;
FCheck: boolean;
begin
if BtnStopp.Enabled then BtnStopp.Click;
if BtnStart.Enabled then BtnStart.Enabled := false;
 
// Pfad finden
Aktuell := lstOrdner.Selected;
lblSongs.caption := Aktuell.Text;
Path := Aktuell.Text+'\';
repeat
try
if Aktuell.Parent <> nil then
begin
Aktuell := Aktuell.Parent;
Path := Aktuell.Text+'\'+Path;
end
else
Break;
except end;
until false;
 
if ActualPath <> Path then
begin
// Liste leeren
lstSongs.Items.Clear;
setlength(ExtentionsArray, 0);
 
// Dateien auflisten
res := FindFirst(Path+'*.*', faAnyFile, sr);
try
while (res = 0) do
begin
if (sr.name <> '.') and (sr.name <> '..') then
begin
try
ext := lowercase(ExtractFileExt(sr.FindData.cFileName));
FCheck := false;
for i := 0 to length(FormatArray)-1 do
if ext = '.'+FormatArray[i] then
FCheck := true;
if FCheck then
begin
setlength(ExtentionsArray, length(ExtentionsArray)+1);
ExtentionsArray[length(ExtentionsArray)-1] := ext;
lstSongs.items.Add(copy(sr.Name, 0, length(sr.name)-4));
end;
except
end;
end;
res := FindNext(sr);
end;
finally
FindClose(sr);
end;
 
ActualPath := Path;
end;
 
if (lstSongs.Items.Count > 0) and radRunMode1.Checked then
begin
lstSongs.ItemIndex := 0;
lstSongs.Selected[0] := true;
lstSongsClick(self);
if radRunMode1.Checked then
btnStart.Click;
end;
end;
 
procedure TMainForm.chkRepeatSongClick(Sender: TObject);
begin
radPlayMode1.Enabled := not chkRepeatSong.Checked;
radPlayMode2.Enabled := not chkRepeatSong.Checked;
radPlayMode3.Enabled := not chkRepeatSong.Checked;
end;
 
procedure TMainForm.SchreibeEinstellung();
var
PlayMode, RunMode, i: integer;
RepeatPlay: boolean;
MusicPath: string;
begin
// Erkenne Eigenschaften
RepeatPlay := chkRepeatSong.Checked;
PlayMode := 1;
if radPlayMode1.Checked then PlayMode := 1;
if radPlayMode2.Checked then PlayMode := 2;
if radPlayMode3.Checked then PlayMode := 3;
RunMode := 1;
if radRunMode1.Checked then RunMode := 1;
if radRunMode2.Checked then RunMode := 2;
if radRunMode3.Checked then RunMode := 3;
 
// Arrays zusammenfassen
MusicPath := '';
for i := 0 to length(MusikArray)-1 do
MusicPath := MusicPath + '|' + MusikArray[i];
MusicPath := copy(MusicPath, 2, length(MusicPath)-1);
 
// Schreibe INI-Einstellungen
ini := TIniFile.Create(extractfilepath(application.ExeName)+'Settings.ini');
try
ini.WriteString('Configuration', 'Path', MusicPath);
ini.WriteInteger('Configuration', 'PlayMode', PlayMode);
ini.WriteInteger('Configuration', 'RunMode', RunMode);
ini.WriteBool('Configuration', 'RepeatPlay', RepeatPlay);
ini.WriteInteger('Configuration', 'ClientWidth', ClientWidth);
ini.WriteInteger('Configuration', 'ClientHeight', ClientHeight);
finally
ini.Free;
end;
end;
 
procedure TMainForm.FormCanResize(Sender: TObject; var NewWidth,
NewHeight: Integer; var Resize: Boolean);
begin
if NewHeight < (grpVolume.Top + grpVolume.Height + 8 + btnStart.height + 8 + sbrcopyright.height + GetSystemMetrics(sm_cYsize) + 8) then
NewHeight := (grpVolume.Top + grpVolume.Height + 8 + btnStart.height + 8 + sbrcopyright.height + GetSystemMetrics(sm_cYsize) + 8);
 
if NewWidth <= 720 then NewWidth := 720;
end;
 
procedure TMainForm.FormCreate(Sender: TObject);
begin
volWave := TWaveVolumeSetting.Create(self);
volWave.Parent := self;
volWave.Max := 1000;
volWave.Visible := false;
end;
 
procedure TMainForm.FormDestroy(Sender: TObject);
begin
volWave.Free;
ggeProgress.free;
end;
 
procedure TMainForm.sbrCopyrightClick(Sender: TObject);
begin
InfoForm.PopupParent := Screen.ActiveForm; // http://www.delphipraxis.net/topic75743,0,asc,0.html
InfoForm.showmodal();
end;
 
procedure TMainForm.btnBeendenClick(Sender: TObject);
begin
close;
end;
 
procedure TMainForm.btnOrdnerClick(Sender: TObject);
begin
ConfigForm.PopupParent := Screen.ActiveForm; // http://www.delphipraxis.net/topic75743,0,asc,0.html
ConfigForm.showmodal();
end;
 
procedure TMainForm.FormResize(Sender: TObject);
begin
// Höhenverwaltung
lstOrdner.Height := MainForm.ClientHeight - lstOrdner.Top - 2 * lstOrdner.Left - sbrCopyright.Height - btnBeenden.Height;
lstSongs.Height := lstOrdner.Height;
btnBeenden.Top := lstOrdner.Top + lstOrdner.Height + lstOrdner.Left;
btnOrdner.Top := btnBeenden.Top;
ggeProgress.Top := lstSongs.Top + lstSongs.Height + lstOrdner.Left;
btnStart.Top := ggeProgress.Top;
btnPause.Top := btnStart.Top;
btnStopp.Top := btnPause.Top;
status1.top := ggeProgress.Top + ggeProgress.Height + 2;
status2.top := status1.top;
 
// Breitenverwaltung
lstSongs.Width := round((MainForm.ClientWidth - 4 * lstOrdner.Left - grpPlayMode.Width) / 2);
lstOrdner.Width := lstSongs.Width;
lstSongs.Left := 2 * lstOrdner.Left + lstOrdner.Width;
grpPlayMode.Left := lstOrdner.Left + lstSongs.Left + lstSongs.Width;
grpRunMode.Left := grpPlayMode.Left;
grpVolume.Left := grpPlayMode.Left;
lblSongs.Left := lstSongs.Left;
lblOrdner.Left := lstOrdner.Left;
btnBeenden.Width := round((lstOrdner.Width - btnBeenden.Left) / 2);
btnOrdner.Width := btnBeenden.Width;
btnOrdner.Left := 2 * btnBeenden.Left + btnBeenden.Width;
ggeProgress.Width := lstSongs.Width;
ggeProgress.Left := lstSongs.Left;
status1.left := ggeProgress.Left;
status2.left := ggeProgress.left + ggeProgress.Width - status2.width;
btnStart.Left := grpPlayMode.Left;
btnStart.Width := round((grpPlayMode.Width - 2 * lstOrdner.Left) / 100 * 50);
btnPause.Width := round((grpPlayMode.Width - 2 * lstOrdner.Left) / 100 * 25);
btnStopp.Width := round((grpPlayMode.Width - 2 * lstOrdner.Left) / 100 * 25);
btnPause.Left := btnBeenden.Left + btnStart.Left + btnStart.Width;
btnStopp.Left := btnBeenden.Left + btnPause.Left + btnPause.Width;
end;
 
procedure TMainForm.NextSong();
var
actrand: integer;
begin
if chkRepeatSong.Checked then
mediaplayer.Play
else
begin
if radPlayMode2.Checked then
begin
randomize();
repeat
actrand := random(lstSongs.Items.Count);
until actrand <> lstSongs.ItemIndex;
lstSongs.ItemIndex := actrand;
lstSongs.Selected[lstSongs.ItemIndex] := true;
lstSongsClick(self);
btnStart.Click;
end;
if radPlayMode1.Checked then
begin
if lstSongs.ItemIndex+1 = lstSongs.Items.Count then
lstSongs.ItemIndex := 0
else
lstSongs.ItemIndex := lstSongs.ItemIndex+1;
lstSongs.Selected[lstSongs.ItemIndex] := true;
lstSongsClick(self);
btnStart.Click;
end;
if radPlayMode3.Checked then
begin
ggeProgress.Position := ggeProgress.Min;
BtnStart.Enabled := true;
BtnStopp.Enabled := false;
btnPause.Enabled := false;
end;
end;
end;
 
end.
/trunk/Musikbox.bdsproj
0,0 → 1,183
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{2FA78BC9-0DA9-4ACA-B44A-E1CFFD64F2E0}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">Musikbox.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath">VCL_WAVECONTROL</Directories>
<Directories Name="Packages">vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;MSI_D7_Rtl</Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">5</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1031</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName">ViaThinkSoft</VersionInfoKeys>
<VersionInfoKeys Name="FileDescription">Ein einfach zu bedienbares Musikprogramm...</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.5.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName">MusikBox</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">© Copyright 2005 - 2007 ViaThinkSoft</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks">Keine</VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename">MusikBox.exe</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">ViaThinkSoft MusikBox</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.5.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Webseite">www.viathinksoft.de</VersionInfoKeys>
<VersionInfoKeys Name="Projektleiter">Daniel Marschall - www.daniel-marschall.de</VersionInfoKeys>
</VersionInfoKeys> <Excluded_Packages>
<Excluded_Packages Name="c:\programme\borland\bds\4.0\Bin\dclib100.bpl">Borland InterBase Express Components</Excluded_Packages>
<Excluded_Packages Name="c:\programme\borland\bds\4.0\Bin\dclIntraweb_80_100.bpl">Intraweb 8.0 Design Package for Borland Development Studio 2006</Excluded_Packages>
<Excluded_Packages Name="c:\programme\borland\bds\4.0\Bin\dclIndyCore100.bpl">Indy 10 Core Design Time</Excluded_Packages>
<Excluded_Packages Name="c:\programme\borland\bds\4.0\Bin\dclsmp100.bpl">Borland Sample Components</Excluded_Packages>
<Excluded_Packages Name="c:\programme\borland\bds\4.0\Bin\dclIndyProtocols100.bpl">Indy 10 Protocols Design Time</Excluded_Packages>
<Excluded_Packages Name="c:\programme\borland\bds\4.0\Bin\dcltee100.bpl">TeeChart-Komponenten</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
</BorlandProject>
/trunk/Musikbox.cfg
0,0 → 1,42
-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J-
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-LE"D:\Eigene Dateien\Borland Studio-Projekte\Bpl"
-LN"D:\Eigene Dateien\Borland Studio-Projekte\Bpl"
-U"VCL_WAVECONTROL"
-O"VCL_WAVECONTROL"
-I"VCL_WAVECONTROL"
-R"VCL_WAVECONTROL"
-w-UNSAFE_TYPE
-w-UNSAFE_CODE
-w-UNSAFE_CAST
/trunk/Musikbox.dof
0,0 → 1,143
[FileVersion]
Version=7.0
[Compiler]
A=8
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=0
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=1
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
NamespacePrefix=
SymbolDeprecated=1
SymbolLibrary=1
SymbolPlatform=1
UnitLibrary=1
UnitPlatform=1
UnitDeprecated=1
HResultCompat=1
HidingMember=1
HiddenVirtual=1
Garbage=1
BoundsError=1
ZeroNilCompat=1
StringConstTruncated=1
ForLoopVarVarPar=1
TypedConstVarPar=1
AsgToTypedConst=1
CaseLabelRange=1
ForVariable=1
ConstructingAbstract=1
ComparisonFalse=1
ComparisonTrue=1
ComparingSignedUnsigned=1
CombiningSignedUnsigned=1
UnsupportedConstruct=1
FileOpen=1
FileOpenUnitSrc=1
BadGlobalSymbol=1
DuplicateConstructorDestructor=1
InvalidDirective=1
PackageNoLink=1
PackageThreadVar=1
ImplicitImport=1
HPPEMITIgnored=1
NoRetVal=1
UseBeforeDef=1
ForLoopVarUndef=1
UnitNameMismatch=1
NoCFGFileFound=1
MessageDirective=1
ImplicitVariants=1
UnicodeToLocale=1
LocaleToUnicode=1
ImagebaseMultiple=1
SuspiciousTypecast=1
PrivatePropAccessor=1
UnsafeType=0
UnsafeCode=0
UnsafeCast=0
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;MSI_D7_Rtl
Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Language]
ActiveLang=
ProjectLang=
RootDir=
[Version Info]
IncludeVerInfo=1
AutoIncBuild=0
MajorVer=1
MinorVer=3
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1031
CodePage=1252
[Version Info Keys]
CompanyName=ViaThinkSoft
FileDescription=Ein einfach zu bedienbares Musikprogramm...
FileVersion=1.3.0.0
InternalName=MusikBox
LegalCopyright=© Copyright 2005 ViaThinkSoft
LegalTrademarks=Keine
OriginalFilename=MusikBox.exe
ProductName=ViaThinkSoft MusikBox
ProductVersion=1.3.0.0
Webseite=www.viathinksoft.de
Projektleiter=Daniel Marschall - www.d-m-home.de
[Excluded Packages]
C:\WINDOWS\system32\dclShXV2D7.bpl=Shell+ Components v2.2
C:\WINDOWS\system32\dclShXDbV2D7.bpl=Shell+ DB Components 2.2
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
/trunk/Musikbox.dpr
0,0 → 1,31
program Musikbox;
 
{$Description 'ViaThinkSoft MusikBox 1.5'}
 
uses
Forms,
Windows,
Dialogs,
Main in 'Main.pas' {MainForm},
Info in 'Info.pas' {InfoForm},
Config in 'Config.pas' {ConfigForm};
 
{$R *.res}
 
var
mHandle: THandle;
 
begin
mHandle := CreateMutex(Nil, True, 'ViaThinkSoft MusikBox');
if GetLastError = ERROR_ALREADY_EXISTS then
ShowMessage('Programm läuft bereits!');
if mHandle <> 0 Then
CloseHandle(mHandle);
 
Application.Initialize;
Application.Title := 'ViaThinkSoft MusikBox';
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TInfoForm, InfoForm);
Application.CreateForm(TConfigForm, ConfigForm);
Application.Run;
end.
/trunk/Musikbox.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Musikbox.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Output/MusikBoxSetup.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Readme.txt
0,0 → 1,65
 
Allgemeine Kurzhinweise
-----------------------
 
Ordner, die nicht vorhanden sind, werden bei der Ordnerliste nicht angezeigt.
 
Die Funktionen von ViaThinkSoft MusikBox sind selbsterklärend. Sollten Probleme mit Musikformaten auftreten, können diese in der Konfiguration ausgeblendet werden.
 
Die Idendifikation der Musikstücke erfolgt nur über den Dateinamen, nicht über MP3-Tags.
 
 
Changelog
---------
 
Änderungen an 1.5 (20. Februar 2007)
Kleinere Fehlerkorrekturen
 
Änderungen an 1.4
Quelltext nun kompatibel mit Turbo Delphi Explorer
Kleiner Fehler behoben beim neu Anklicken nach Ordnerstrukturspeicherung
Lautstärkeregelung verbessert
Setup eingeführt
Zeitangabe / Scrollfunktion
Geschützte WMA's werden erkannt und nicht abgespielt
Größenveränderung begrenzt
 
Änderungen an 1.3
Ein Fehler bei der MCI-Erweiterungserkennung verhinderte,
dass das Programm korrekt auf einem eingeschränkten
Konto ausgeführt werden konnte.
Bei den Erweiterungen wird Groß- und Kleinschreibung nicht mehr beachtet
 
Änderungen an 1.2
MCI-Formate nicht mehr in INI gespeichert: dynamische Auslesung
Größenänderung möglich
Verbesserung der Progress-Bar
 
Änderungen an 1.1
Mutexname verändert
Dynamische Farbgebung entfernt
Fenster Desktop-Mittig
Schreibfehler bei Konfiguration beseitigt
Bei Pause wird Start anklickbar
Beschreibung bei Ordner-Dialog
Sofortige Auswirkung bei Ändern der Konfiguration
Ordnerliste neutral nach erneutem Öffnen
 
Änderungen an 1.0
Erste Veröffentlichung
 
 
Bekannte Probleme
-----------------
 
* DRM geschützte Titel können nicht abgespielt werden
* Unbekanntes Problem verursacht Fehler bei Zeitanzeige
* Linke Seite: Offene Ordner anderes Symbol geben
 
 
Kontakt
-------
 
Daniel Marschall
info@daniel-marschall.de
www.daniel-marschall.de
/trunk/Ressourcen/0-cd.bmp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Ressourcen/1-ordner.bmp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Ressourcen/Alt-Background/Musik.bmp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Ressourcen/Alt-Background/SunMusik.bmp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Ressourcen/Intern.txt
0,0 → 1,28
 
ENTWICKELT MIT DELPHI 7
Es wird die XP-Manifest VCL verwendet
 
Verwendete Komponenten
----------------------
 
Dieser Quelltext verwendet folgende fremde VCLs:
 
TBrowseForFolder 1.0
http://www.torry.net/vcl/dialogs/stddialogs/brwsfldr.zip
 
Wave Control 1.0
http://www.torry.net/vcl/mmedia/audio/mwavcontl.zip
 
Gedanken:
---------
 
Lautstärke-Regelung
"Automatisch zum nächsten Ordner springen"
Vor/Zurück-Buttons
 
Alte Farben
-----------
 
Form: $00EDBF96
ListBox: $00F2D3B7
Forecolor: $00E9B687
/trunk/Ressourcen/cd.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Ressourcen/welt.bmp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Setup.iss
0,0 → 1,61
; (De)Coder Script für InnoSetup
; Fehler bei Uninstallation: ReadOnly, Anwendung in Benutzung
 
[Setup]
AppName=MusikBox
AppVerName=MusikBox
AppVersion=1.5
AppCopyright=© Copyright 2005 - 2007 ViaThinkSoft.
AppPublisher=ViaThinkSoft
AppPublisherURL=http://www.viathinksoft.de/
AppSupportURL=http://www.daniel-marschall.de/
AppUpdatesURL=http://www.viathinksoft.de/
DefaultDirName={pf}\MusikBox 1.5
DefaultGroupName=MusikBox 1.5
UninstallDisplayIcon={app}\MusikBox.exe
VersionInfoCompany=ViaThinkSoft
VersionInfoCopyright=© Copyright 2005 - 2007 ViaThinkSoft.
VersionInfoDescription=MusikBox 1.5 Setup
VersionInfoTextVersion=1.0.0.0
VersionInfoVersion=1.5
OutputBaseFilename=MusikBoxSetup
Compression=zip/9
 
[Languages]
Name: de; MessagesFile: "compiler:Languages\German.isl"
 
[Files]
; Allgemein
Source: "MusikBox.exe"; DestDir: "{app}"
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
 
[Folders]
Name: "{group}\Webseiten"; Languages: de
 
[Icons]
; Allgemein
Name: "{group}\MusikBox"; Filename: "{app}\MusikBox.exe"
; Deutsch
Name: "{group}\Lies mich"; Filename: "{app}\Readme.txt"
Name: "{group}\Deinstallieren"; Filename: "{uninstallexe}"
Name: "{group}\Webseiten\Daniel Marschall"; Filename: "https://www.daniel-marschall.de/"
Name: "{group}\Webseiten\ViaThinkSoft"; Filename: "https://www.viathinksoft.de/"
Name: "{group}\Webseiten\Projektseite auf ViaThinkSoft"; Filename: "https://www.viathinksoft.de/projects/musikbox"
 
[Run]
Filename: "{app}\MusikBox.exe"; Description: "MusikBox starten"; Flags: nowait postinstall skipifsilent
 
[Code]
function InitializeSetup(): Boolean;
begin
if CheckForMutexes('MusikBox15Setup')=false then
begin
Createmutex('MusikBox15Setup');
Result := true;
end
else
begin
Result := False;
end;
end;
 
/trunk/VCL_WAVECONTROL/WaveControl.pas
0,0 → 1,134
{=====================================================|
| WaveControl 1.00 - (c) 1998 by John Mogesnen, DK |
|-----------------------------------------------------|
| Change the WAV-Volume settings for Delphi 3 |
| (16 and 32 bits) |
|-----------------------------------------------------|
| E-Mail: JMogensnen@Web4you.dk |
|=====================================================}
(* Attention: To enabled componentuser to change the
Update time remove the {} from the Code!*)
 
unit WaveControl;
 
interface
 
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, ComCtrls;
 
type
TWaveVolumeSetting = class(TTrackBar)
private
FTimer : TTimer;
FInterval : Integer;
 
{ procedure SetInterval(Value : integer);}
procedure FTimerOnTimer(sender:TObject);
procedure OnTrackChange(Sender : TObject);
function GetTrackBar : integer;
procedure SetVolume;
protected
public
constructor Create (AOwner : TComponent); override;
destructor Destroy; override;
published
{ property WavUpdateInterval: integer read FInterval write SetInterval;}
end;
 
procedure Register;
 
var
pCurrentVolumeLevel: PDWord;
CurrentVolumeLevel: DWord;
VolumeControlHandle: hWnd;
GetCurrentVolumeLevel: LPDWORD;
 
implementation
 
Uses Wave_System_Control;
 
procedure Register;
begin
RegisterComponents('Samples', [TWaveVolumeSetting]);
end;
 
 
constructor TWaveVolumeSetting.Create (AOwner : TComponent);
begin
inherited Create(Aowner);
New(pCurrentVolumeLevel);
Orientation := trVertical;
TickStyle := tsNone;
TickMarks := tmBoth;
Width := 27;
Height := 113;
min := 0;
max := 26;
 
FInterval := 1;
FTimer := TTimer.create(self);
FTimer.Enabled := TRUE;
FTimer.interval := FInterval;
FTimer.OnTimer := FTimerOnTimer;
OnChange := OnTrackChange;
SetVolume;
end;
 
 
destructor TWaveVolumeSetting.Destroy;
begin
inherited Destroy;
end;
 
{
procedure TWaveVolumeSetting.SetInterval(Value: integer);
begin
if (FInterval <> Value) then
begin
FInterval := Value;
FTimer.interval := FInterval;
end;
end;
}
 
function TWaveVolumeSetting.GetTrackBar: integer;
begin
result := 65535 div max;
end;
 
 
procedure TWaveVolumeSetting.OnTrackChange(Sender : TObject);
Var
x : Integer;
 
begin
IF Orientation=trVertical then
x := max - position
ELSE
x := position;
 
CurrentVolumeLevel := (x * GetTrackBar shl 16) + (x * GetTrackBar);
WaveOutSetVolume(VolumeControlHandle, CurrentVolumeLevel);
end;
 
 
procedure TWaveVolumeSetting.SetVolume;
begin
VolumeControlHandle := FindWindow('Volume Control', nil);
WaveOutGetVolume(VolumeControlHandle, pCurrentVolumeLevel);
CurrentVolumeLevel := pCurrentVolumeLevel^;
 
IF Orientation=trVertical then
position := max - LoWord(CurrentVolumeLevel) DIV GetTrackBar
ELSE
position := LoWord(CurrentVolumeLevel) DIV GetTrackBar;
end;
 
 
procedure TWaveVolumeSetting.FTimerOnTimer(sender:TObject);
begin
SetVolume;
end;
 
end.
/trunk/VCL_WAVECONTROL/Wave_System_Control.pas
0,0 → 1,3150
 
{*******************************************************}
{ }
{ Delphi Runtime Library }
{ Windows 32bit API Interface Unit }
{ Multimedia Interface unit }
{ }
{ Copyright (c) 1992,97 Borland International }
{ }
{*******************************************************}
 
unit Wave_System_Control;
 
{$WEAKPACKAGEUNIT}
 
interface
 
uses Windows;
 
 
{***************************************************************************
 
General constants and data types
 
***************************************************************************}
 
{ general constants }
const
MAXPNAMELEN = 32; { max product name length (including nil) }
MAXERRORLENGTH = 128; { max error text length (including nil) }
MAX_JOYSTICKOEMVXDNAME = 260; { max oem vxd name length (including nil) }
 
{***************************************************************************
 
Manufacturer and product IDs
 
Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
 
***************************************************************************}
 
{ manufacturer IDs }
const
MM_MICROSOFT = 1; { Microsoft Corp. }
 
{ product IDs }
MM_MIDI_MAPPER = 1; { MIDI Mapper }
MM_WAVE_MAPPER = 2; { Wave Mapper }
MM_SNDBLST_MIDIOUT = 3; { Sound Blaster MIDI output port }
MM_SNDBLST_MIDIIN = 4; { Sound Blaster MIDI input port }
MM_SNDBLST_SYNTH = 5; { Sound Blaster internal synthesizer }
MM_SNDBLST_WAVEOUT = 6; { Sound Blaster waveform output }
MM_SNDBLST_WAVEIN = 7; { Sound Blaster waveform input }
MM_ADLIB = 9; { Ad Lib-compatible synthesizer }
MM_MPU401_MIDIOUT = 10; { MPU401-compatible MIDI output port }
MM_MPU401_MIDIIN = 11; { MPU401-compatible MIDI input port }
MM_PC_JOYSTICK = 12; { Joystick adapter }
 
 
{ general data types }
type
VERSION = UINT; { major (high byte), minor (low byte) }
MMVERSION = UINT; { major (high byte), minor (low byte) }
MMRESULT = UINT; { error return code, 0 means no error }
 
{ types for wType field in MMTIME struct }
const
TIME_MS = $0001; { time in milliseconds }
TIME_SAMPLES = $0002; { number of wave samples }
TIME_BYTES = $0004; { current byte offset }
TIME_SMPTE = $0008; { SMPTE time }
TIME_MIDI = $0010; { MIDI time }
TIME_TICKS = $0020; { Ticks within MIDI stream }
 
{ MMTIME data structure }
type
PMMTime = ^TMMTime;
TMMTime = record
case wType: UINT of { indicates the contents of the variant record }
TIME_MS: (ms: DWORD);
TIME_SAMPLES: (sample: DWORD);
TIME_BYTES: (cb: DWORD);
TIME_TICKS: (ticks: DWORD);
TIME_SMPTE: (
hour: Byte;
min: Byte;
sec: Byte;
frame: Byte;
fps: Byte;
dummy: Byte;
pad: array[0..1] of Byte);
TIME_MIDI : (songptrpos: DWORD);
end;
 
 
{***************************************************************************
 
Multimedia Extensions Window Messages
 
***************************************************************************}
 
{ joystick }
const
MM_JOY1MOVE = $3A0;
MM_JOY2MOVE = $3A1;
MM_JOY1ZMOVE = $3A2;
MM_JOY2ZMOVE = $3A3;
MM_JOY1BUTTONDOWN = $3B5;
MM_JOY2BUTTONDOWN = $3B6;
MM_JOY1BUTTONUP = $3B7;
MM_JOY2BUTTONUP = $3B8;
 
{ MCI }
MM_MCINOTIFY = $3B9;
 
{ waveform output }
MM_WOM_OPEN = $3BB;
MM_WOM_CLOSE = $3BC;
MM_WOM_DONE = $3BD;
 
{ waveform input }
MM_WIM_OPEN = $3BE;
MM_WIM_CLOSE = $3BF;
MM_WIM_DATA = $3C0;
 
{ MIDI input }
MM_MIM_OPEN = $3C1;
MM_MIM_CLOSE = $3C2;
MM_MIM_DATA = $3C3;
MM_MIM_LONGDATA = $3C4;
MM_MIM_ERROR = $3C5;
MM_MIM_LONGERROR = $3C6;
 
{ MIDI output }
MM_MOM_OPEN = $3C7;
MM_MOM_CLOSE = $3C8;
MM_MOM_DONE = $3C9;
 
MM_DRVM_OPEN = $3D0;
MM_DRVM_CLOSE = $3D1;
MM_DRVM_DATA = $3D2;
MM_DRVM_ERROR = $3D3;
 
MM_STREAM_OPEN = $3D4;
MM_STREAM_CLOSE = $3D5;
MM_STREAM_DONE = $3D6;
MM_STREAM_ERROR = $3D7;
 
MM_MOM_POSITIONCB = $3CA;
 
MM_MCISIGNAL = $3CB;
MM_MIM_MOREDATA = $3CC;
 
MM_MIXM_LINE_CHANGE = $3D0;
MM_MIXM_CONTROL_CHANGE = $3D1;
 
{***************************************************************************
 
String resource number bases (internal use)
 
***************************************************************************}
 
const
MMSYSERR_BASE = 0;
WAVERR_BASE = 32;
MIDIERR_BASE = 64;
TIMERR_BASE = 96;
JOYERR_BASE = 160;
MCIERR_BASE = 256;
MIXERR_BASE = 1024;
 
MCI_STRING_OFFSET = 512;
MCI_VD_OFFSET = 1024;
MCI_CD_OFFSET = 1088;
MCI_WAVE_OFFSET = 1152;
MCI_SEQ_OFFSET = 1216;
 
{***************************************************************************
 
General error return values
 
***************************************************************************}
 
{ general error return values }
const
MMSYSERR_NOERROR = 0; { no error }
MMSYSERR_ERROR = MMSYSERR_BASE + 1; { unspecified error }
MMSYSERR_BADDEVICEID = MMSYSERR_BASE + 2; { device ID out of range }
MMSYSERR_NOTENABLED = MMSYSERR_BASE + 3; { driver failed enable }
MMSYSERR_ALLOCATED = MMSYSERR_BASE + 4; { device already allocated }
MMSYSERR_INVALHANDLE = MMSYSERR_BASE + 5; { device handle is invalid }
MMSYSERR_NODRIVER = MMSYSERR_BASE + 6; { no device driver present }
MMSYSERR_NOMEM = MMSYSERR_BASE + 7; { memory allocation error }
MMSYSERR_NOTSUPPORTED = MMSYSERR_BASE + 8; { function isn't supported }
MMSYSERR_BADERRNUM = MMSYSERR_BASE + 9; { error value out of range }
MMSYSERR_INVALFLAG = MMSYSERR_BASE + 10; { invalid flag passed }
MMSYSERR_INVALPARAM = MMSYSERR_BASE + 11; { invalid parameter passed }
MMSYSERR_HANDLEBUSY = MMSYSERR_BASE + 12; { handle being used
simultaneously on another
thread (eg callback) }
MMSYSERR_INVALIDALIAS = MMSYSERR_BASE + 13; { specified alias not found }
MMSYSERR_BADDB = MMSYSERR_BASE + 14; { bad registry database }
MMSYSERR_KEYNOTFOUND = MMSYSERR_BASE + 15; { registry key not found }
MMSYSERR_READERROR = MMSYSERR_BASE + 16; { registry read error }
MMSYSERR_WRITEERROR = MMSYSERR_BASE + 17; { registry write error }
MMSYSERR_DELETEERROR = MMSYSERR_BASE + 18; { registry delete error }
MMSYSERR_VALNOTFOUND = MMSYSERR_BASE + 19; { registry value not found }
MMSYSERR_NODRIVERCB = MMSYSERR_BASE + 20; { driver does not call DriverCallback }
MMSYSERR_LASTERROR = MMSYSERR_BASE + 20; { last error in range }
 
type
HDRVR = Integer;
 
{***************************************************************************
 
Installable driver support
 
***************************************************************************}
 
type
PDrvConfigInfoEx = ^TDrvConfigInfoEx;
TDrvConfigInfoEx = packed record
dwDCISize: DWORD;
lpszDCISectionName: PWideChar;
lpszDCIAliasName: PWideChar;
dnDevNode: DWORD;
end;
 
const
{ Driver messages }
DRV_LOAD = $0001;
DRV_ENABLE = $0002;
DRV_OPEN = $0003;
DRV_CLOSE = $0004;
DRV_DISABLE = $0005;
DRV_FREE = $0006;
DRV_CONFIGURE = $0007;
DRV_QUERYCONFIGURE = $0008;
DRV_INSTALL = $0009;
DRV_REMOVE = $000A;
DRV_EXITSESSION = $000B;
DRV_POWER = $000F;
DRV_RESERVED = $0800;
DRV_USER = $4000;
 
type
{ LPARAM of DRV_CONFIGURE message }
PDrvConfigInfo = ^TDrvConfigInfo;
TDrvConfigInfo = packed record
dwDCISize: DWORD;
lpszDCISectionName: PWideChar;
lpszDCIAliasName: PWideChar;
end;
 
const
{ Supported return values for DRV_CONFIGURE message }
DRVCNF_CANCEL = $0000;
DRVCNF_OK = $0001;
DRVCNF_RESTART = $0002;
 
 
{ installable driver function prototypes }
type
TFNDriverProc = function(dwDriverId: DWORD; hdrvr: HDRVR;
msg: UINT; lparam1, lparam2: LPARAM): Longint stdcall;
 
function CloseDriver(hDriver: HDRVR; lParam1, lParam2: Longint): Longint; stdcall;
function OpenDriver(szDriverName: PWideChar; szSectionName: PWideChar; lParam2: Longint): HDRVR; stdcall;
function SendDriverMessage(hDriver: HDRVR; message: UINT; lParam1, lParam2: Longint): Longint; stdcall;
function DrvGetModuleHandle(hDriver: HDRVR): HMODULE; stdcall;
function GetDriverModuleHandle(hDriver: HDRVR): HMODULE; stdcall;
function DefDriverProc(dwDriverIdentifier: DWORD; hdrvr: HDRVR; uMsg: UINT;
lParam1, lParam2: LPARAM): Longint; stdcall;
 
{ return values from DriverProc() function }
const
DRV_CANCEL = DRVCNF_CANCEL;
DRV_OK = DRVCNF_OK;
DRV_RESTART = DRVCNF_RESTART;
 
DRV_MCI_FIRST = DRV_RESERVED;
DRV_MCI_LAST = DRV_RESERVED + $FFF;
 
 
{***************************************************************************
 
Driver callback support
 
***************************************************************************}
 
{ flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and }
{ midiOutOpen() to specify the type of the dwCallback parameter. }
 
const
CALLBACK_TYPEMASK = $00070000; { callback type mask }
CALLBACK_NULL = $00000000; { no callback }
CALLBACK_WINDOW = $00010000; { dwCallback is a HWND }
CALLBACK_TASK = $00020000; { dwCallback is a HTASK }
CALLBACK_FUNCTION = $00030000; { dwCallback is a FARPROC }
CALLBACK_THREAD = CALLBACK_TASK;{ thread ID replaces 16 bit task }
CALLBACK_EVENT = $00050000; { dwCallback is an EVENT Handle }
 
{ driver callback prototypes }
 
type
TFNDrvCallBack = procedure(hdrvr: HDRVR; uMsg: UINT; dwUser: DWORD;
dw1, dw2: DWORD) stdcall;
 
 
{***************************************************************************
 
General MMSYSTEM support
 
***************************************************************************}
 
function mmsystemGetVersion: UINT; stdcall;
 
{***************************************************************************
 
Sound support
 
***************************************************************************}
 
function sndPlaySoundA(lpszSoundName: PAnsiChar; uFlags: UINT): BOOL; stdcall;
function sndPlaySoundW(lpszSoundName: PWideChar; uFlags: UINT): BOOL; stdcall;
function sndPlaySound(lpszSoundName: PChar; uFlags: UINT): BOOL; stdcall;
 
{ flag values for wFlags parameter }
const
SND_SYNC = $0000; { play synchronously (default) }
SND_ASYNC = $0001; { play asynchronously }
SND_NODEFAULT = $0002; { don't use default sound }
SND_MEMORY = $0004; { lpszSoundName points to a memory file }
SND_LOOP = $0008; { loop the sound until next sndPlaySound }
SND_NOSTOP = $0010; { don't stop any currently playing sound }
 
SND_NOWAIT = $00002000; { don't wait if the driver is busy }
SND_ALIAS = $00010000; { name is a registry alias }
SND_ALIAS_ID = $00110000; { alias is a predefined ID }
SND_FILENAME = $00020000; { name is file name }
SND_RESOURCE = $00040004; { name is resource name or atom }
SND_PURGE = $0040; { purge non-static events for task }
SND_APPLICATION = $0080; { look for application specific association }
 
SND_ALIAS_START = 0; { alias base }
 
SND_ALIAS_SYSTEMASTERISK = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('*')) shl 8));
SND_ALIAS_SYSTEMQUESTION = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('?')) shl 8));
SND_ALIAS_SYSTEMHAND = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('H')) shl 8));
SND_ALIAS_SYSTEMEXIT = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('E')) shl 8));
SND_ALIAS_SYSTEMSTART = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('S')) shl 8));
SND_ALIAS_SYSTEMWELCOME = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('W')) shl 8));
SND_ALIAS_SYSTEMEXCLAMATION = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('!')) shl 8));
SND_ALIAS_SYSTEMDEFAULT = SND_ALIAS_START + (Longint(Ord('S')) or (Longint(Ord('D')) shl 8));
 
function PlaySoundA(pszSound: PAnsiChar; hmod: HMODULE; fdwSound: DWORD): BOOL; stdcall;
function PlaySoundW(pszSound: PWideChar; hmod: HMODULE; fdwSound: DWORD): BOOL; stdcall;
function PlaySound(pszSound: PChar; hmod: HMODULE; fdwSound: DWORD): BOOL; stdcall;
 
{***************************************************************************
 
Waveform audio support
 
***************************************************************************}
 
{ waveform audio error return values }
const
WAVERR_BADFORMAT = WAVERR_BASE + 0; { unsupported wave format }
WAVERR_STILLPLAYING = WAVERR_BASE + 1; { still something playing }
WAVERR_UNPREPARED = WAVERR_BASE + 2; { header not prepared }
WAVERR_SYNC = WAVERR_BASE + 3; { device is synchronous }
WAVERR_LASTERROR = WAVERR_BASE + 3; { last error in range }
 
{ waveform audio data types }
type
PHWAVE = ^HWAVE;
HWAVE = Integer;
PHWAVEIN = ^HWAVEIN;
HWAVEIN = Integer;
PHWAVEOUT = ^HWAVEOUT;
HWAVEOUT = Integer;
 
type
TFNWaveCallBack = TFNDrvCallBack;
 
{ wave callback messages }
const
WOM_OPEN = MM_WOM_OPEN;
WOM_CLOSE = MM_WOM_CLOSE;
WOM_DONE = MM_WOM_DONE;
WIM_OPEN = MM_WIM_OPEN;
WIM_CLOSE = MM_WIM_CLOSE;
WIM_DATA = MM_WIM_DATA;
 
{ device ID for wave device mapper }
WAVE_MAPPER = UINT(-1);
 
{ flags for dwFlags parameter in waveOutOpen() and waveInOpen() }
WAVE_FORMAT_QUERY = $0001;
WAVE_ALLOWSYNC = $0002;
WAVE_MAPPED = $0004;
 
{ wave data block header }
type
PWaveHdr = ^TWaveHdr;
TWaveHdr = record
lpData: PChar; { pointer to locked data buffer }
dwBufferLength: DWORD; { length of data buffer }
dwBytesRecorded: DWORD; { used for input only }
dwUser: DWORD; { for client's use }
dwFlags: DWORD; { assorted flags (see defines) }
dwLoops: DWORD; { loop control counter }
lpNext: PWaveHdr; { reserved for driver }
reserved: DWORD; { reserved for driver }
end;
 
 
{ flags for dwFlags field of WAVEHDR }
const
WHDR_DONE = $00000001; { done bit }
WHDR_PREPARED = $00000002; { set if this header has been prepared }
WHDR_BEGINLOOP = $00000004; { loop start block }
WHDR_ENDLOOP = $00000008; { loop end block }
WHDR_INQUEUE = $00000010; { reserved for driver }
 
{ waveform output device capabilities structure }
type
PWaveOutCapsA = ^TWaveOutCapsA;
PWaveOutCapsW = ^TWaveOutCapsW;
PWaveOutCaps = PWaveOutCapsA;
TWaveOutCapsA = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of AnsiChar; { product name (NULL terminated string) }
dwFormats: DWORD; { formats supported }
wChannels: Word; { number of sources supported }
dwSupport: DWORD; { functionality supported by driver }
end;
TWaveOutCapsW = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of WideChar; { product name (NULL terminated string) }
dwFormats: DWORD; { formats supported }
wChannels: Word; { number of sources supported }
dwSupport: DWORD; { functionality supported by driver }
end;
TWaveOutCaps = TWaveOutCapsA;
 
 
{ flags for dwSupport field of WAVEOUTCAPS }
const
WAVECAPS_PITCH = $0001; { supports pitch control }
WAVECAPS_PLAYBACKRATE = $0002; { supports playback rate control }
WAVECAPS_VOLUME = $0004; { supports volume control }
WAVECAPS_LRVOLUME = $0008; { separate left-right volume control }
WAVECAPS_SYNC = $0010;
WAVECAPS_SAMPLEACCURATE = $0020;
WAVECAPS_DIRECTSOUND = $0040;
 
{ waveform input device capabilities structure }
type
PWaveInCapsA = ^TWaveInCapsA;
PWaveInCapsW = ^TWaveInCapsW;
PWaveInCaps = PWaveInCapsA;
TWaveInCapsA = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of AnsiChar; { product name (NULL terminated string) }
dwFormats: DWORD; { formats supported }
wChannels: Word; { number of channels supported }
wReserved1: Word; { structure packing }
end;
TWaveInCapsW = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of WideChar; { product name (NULL terminated string) }
dwFormats: DWORD; { formats supported }
wChannels: Word; { number of channels supported }
wReserved1: Word; { structure packing }
end;
TWaveInCaps = TWaveInCapsA;
 
 
{ defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS }
const
WAVE_INVALIDFORMAT = $00000000; { invalid format }
WAVE_FORMAT_1M08 = $00000001; { 11.025 kHz, Mono, 8-bit }
WAVE_FORMAT_1S08 = $00000002; { 11.025 kHz, Stereo, 8-bit }
WAVE_FORMAT_1M16 = $00000004; { 11.025 kHz, Mono, 16-bit }
WAVE_FORMAT_1S16 = $00000008; { 11.025 kHz, Stereo, 16-bit }
WAVE_FORMAT_2M08 = $00000010; { 22.05 kHz, Mono, 8-bit }
WAVE_FORMAT_2S08 = $00000020; { 22.05 kHz, Stereo, 8-bit }
WAVE_FORMAT_2M16 = $00000040; { 22.05 kHz, Mono, 16-bit }
WAVE_FORMAT_2S16 = $00000080; { 22.05 kHz, Stereo, 16-bit }
WAVE_FORMAT_4M08 = $00000100; { 44.1 kHz, Mono, 8-bit }
WAVE_FORMAT_4S08 = $00000200; { 44.1 kHz, Stereo, 8-bit }
WAVE_FORMAT_4M16 = $00000400; { 44.1 kHz, Mono, 16-bit }
WAVE_FORMAT_4S16 = $00000800; { 44.1 kHz, Stereo, 16-bit }
 
{ general waveform format structure (information common to all formats) }
type
PWaveFormat = ^TWaveFormat;
TWaveFormat = packed record
wFormatTag: Word; { format type }
nChannels: Word; { number of channels (i.e. mono, stereo, etc.) }
nSamplesPerSec: DWORD; { sample rate }
nAvgBytesPerSec: DWORD; { for buffer estimation }
nBlockAlign: Word; { block size of data }
end;
 
{ flags for wFormatTag field of WAVEFORMAT }
const
WAVE_FORMAT_PCM = 1;
 
{ specific waveform format structure for PCM data }
type
PPCMWaveFormat = ^TPCMWaveFormat;
TPCMWaveFormat = record
wf: TWaveFormat;
wBitsPerSample: Word;
end;
 
 
{ extended waveform format structure used for all non-PCM formats. this
structure is common to all non-PCM formats. }
 
PWaveFormatEx = ^TWaveFormatEx;
TWaveFormatEx = packed record
wFormatTag: Word; { format type }
nChannels: Word; { number of channels (i.e. mono, stereo, etc.) }
nSamplesPerSec: DWORD; { sample rate }
nAvgBytesPerSec: DWORD; { for buffer estimation }
nBlockAlign: Word; { block size of data }
wBitsPerSample: Word; { number of bits per sample of mono data }
cbSize: Word; { the count in bytes of the size of }
end;
 
 
{ waveform audio function prototypes }
function waveOutGetNumDevs: UINT; stdcall;
 
function waveOutGetDevCapsA(uDeviceID: UINT; lpCaps: PWaveOutCapsA; uSize: UINT): MMRESULT; stdcall;
function waveOutGetDevCapsW(uDeviceID: UINT; lpCaps: PWaveOutCapsW; uSize: UINT): MMRESULT; stdcall;
function waveOutGetDevCaps(uDeviceID: UINT; lpCaps: PWaveOutCaps; uSize: UINT): MMRESULT; stdcall;
function waveOutGetVolume(hwo: HWAVEOUT; lpdwVolume: PDWORD): MMRESULT; stdcall;
function waveOutSetVolume(hwo: HWAVEOUT; dwVolume: DWORD): MMRESULT; stdcall;
function waveOutGetErrorTextA(mmrError: MMRESULT; lpText: PAnsiChar; uSize: UINT): MMRESULT; stdcall;
function waveOutGetErrorTextW(mmrError: MMRESULT; lpText: PWideChar; uSize: UINT): MMRESULT; stdcall;
function waveOutGetErrorText(mmrError: MMRESULT; lpText: PChar; uSize: UINT): MMRESULT; stdcall;
function waveOutOpen(lphWaveOut: PHWaveOut; uDeviceID: UINT;
lpFormat: PWaveFormatEx; dwCallback, dwInstance, dwFlags: DWORD): MMRESULT; stdcall;
function waveOutClose(hWaveOut: HWAVEOUT): MMRESULT; stdcall;
function waveOutPrepareHeader(hWaveOut: HWAVEOUT; lpWaveOutHdr: PWaveHdr;
uSize: UINT): MMRESULT; stdcall;
function waveOutUnprepareHeader(hWaveOut: HWAVEOUT; lpWaveOutHdr: PWaveHdr;
uSize: UINT): MMRESULT; stdcall;
function waveOutWrite(hWaveOut: HWAVEOUT; lpWaveOutHdr: PWaveHdr;
uSize: UINT): MMRESULT; stdcall;
function waveOutPause(hWaveOut: HWAVEOUT): MMRESULT; stdcall;
function waveOutRestart(hWaveOut: HWAVEOUT): MMRESULT; stdcall;
function waveOutReset(hWaveOut: HWAVEOUT): MMRESULT; stdcall;
function waveOutBreakLoop(hWaveOut: HWAVEOUT): MMRESULT; stdcall;
function waveOutGetPosition(hWaveOut: HWAVEOUT; lpInfo: PMMTime; uSize: UINT): MMRESULT; stdcall;
function waveOutGetPitch(hWaveOut: HWAVEOUT; lpdwPitch: PDWORD): MMRESULT; stdcall;
function waveOutSetPitch(hWaveOut: HWAVEOUT; dwPitch: DWORD): MMRESULT; stdcall;
function waveOutGetPlaybackRate(hWaveOut: HWAVEOUT; lpdwRate: PDWORD): MMRESULT; stdcall;
function waveOutSetPlaybackRate(hWaveOut: HWAVEOUT; dwRate: DWORD): MMRESULT; stdcall;
function waveOutGetID(hWaveOut: HWAVEOUT; lpuDeviceID: PUINT): MMRESULT; stdcall;
function waveOutMessage(hWaveOut: HWAVEOUT; uMessage: UINT; dw1, dw2: DWORD): Longint; stdcall;
function waveInGetNumDevs: UINT; stdcall;
function waveInGetDevCapsA(hwo: HWAVEOUT; lpCaps: PWaveInCapsA; uSize: UINT): MMRESULT; stdcall;
function waveInGetDevCapsW(hwo: HWAVEOUT; lpCaps: PWaveInCapsW; uSize: UINT): MMRESULT; stdcall;
function waveInGetDevCaps(hwo: HWAVEOUT; lpCaps: PWaveInCaps; uSize: UINT): MMRESULT; stdcall;
function waveInGetErrorTextA(mmrError: MMRESULT; lpText: PAnsiChar; uSize: UINT): MMRESULT; stdcall;
function waveInGetErrorTextW(mmrError: MMRESULT; lpText: PWideChar; uSize: UINT): MMRESULT; stdcall;
function waveInGetErrorText(mmrError: MMRESULT; lpText: PChar; uSize: UINT): MMRESULT; stdcall;
function waveInOpen(lphWaveIn: PHWAVEIN; uDeviceID: UINT;
lpFormatEx: PWaveFormatEx; dwCallback, dwInstance, dwFlags: DWORD): MMRESULT; stdcall;
function waveInClose(hWaveIn: HWAVEIN): MMRESULT; stdcall;
function waveInPrepareHeader(hWaveIn: HWAVEIN; lpWaveInHdr: PWaveHdr;
uSize: UINT): MMRESULT; stdcall;
function waveInUnprepareHeader(hWaveIn: HWAVEIN; lpWaveInHdr: PWaveHdr;
uSize: UINT): MMRESULT; stdcall;
function waveInAddBuffer(hWaveIn: HWAVEIN; lpWaveInHdr: PWaveHdr;
uSize: UINT): MMRESULT; stdcall;
function waveInStart(hWaveIn: HWAVEIN): MMRESULT; stdcall;
function waveInStop(hWaveIn: HWAVEIN): MMRESULT; stdcall;
function waveInReset(hWaveIn: HWAVEIN): MMRESULT; stdcall;
function waveInGetPosition(hWaveIn: HWAVEIN; lpInfo: PMMTime;
uSize: UINT): MMRESULT; stdcall;
function waveInGetID(hWaveIn: HWAVEIN; lpuDeviceID: PUINT): MMRESULT; stdcall;
function waveInMessage(hWaveIn: HWAVEIN; uMessage: UINT;
dw1, dw2: DWORD): MMRESULT; stdcall;
 
{***************************************************************************
 
MIDI audio support
 
***************************************************************************}
 
{ MIDI error return values }
const
MIDIERR_UNPREPARED = MIDIERR_BASE + 0; { header not prepared }
MIDIERR_STILLPLAYING = MIDIERR_BASE + 1; { still something playing }
MIDIERR_NOMAP = MIDIERR_BASE + 2; { no current map }
MIDIERR_NOTREADY = MIDIERR_BASE + 3; { hardware is still busy }
MIDIERR_NODEVICE = MIDIERR_BASE + 4; { port no longer connected }
MIDIERR_INVALIDSETUP = MIDIERR_BASE + 5; { invalid setup }
MIDIERR_BADOPENMODE = MIDIERR_BASE + 6; { operation unsupported w/ open mode }
MIDIERR_DONT_CONTINUE = MIDIERR_BASE + 7; { thru device 'eating' a message }
MIDIERR_LASTERROR = MIDIERR_BASE + 5; { last error in range }
 
{ MIDI audio data types }
type
PHMIDI = ^HMIDI;
HMIDI = Integer;
PHMIDIIN = ^HMIDIIN;
HMIDIIN = Integer;
PHMIDIOUT = ^HMIDIOUT;
HMIDIOUT = Integer;
PHMIDISTRM = ^HMIDISTRM;
HMIDISTRM = Integer;
 
type
TFNMidiCallBack = TFNDrvCallBack;
 
const
MIDIPATCHSIZE = 128;
 
type
PPatchArray = ^TPatchArray;
TPatchArray = array[0..MIDIPATCHSIZE-1] of Word;
 
PKeyArray = ^TKeyArray;
TKeyArray = array[0..MIDIPATCHSIZE-1] of Word;
 
 
{ MIDI callback messages }
const
MIM_OPEN = MM_MIM_OPEN;
MIM_CLOSE = MM_MIM_CLOSE;
MIM_DATA = MM_MIM_DATA;
MIM_LONGDATA = MM_MIM_LONGDATA;
MIM_ERROR = MM_MIM_ERROR;
MIM_LONGERROR = MM_MIM_LONGERROR;
MOM_OPEN = MM_MOM_OPEN;
MOM_CLOSE = MM_MOM_CLOSE;
MOM_DONE = MM_MOM_DONE;
 
MIM_MOREDATA = MM_MIM_MOREDATA;
MOM_POSITIONCB = MM_MOM_POSITIONCB;
 
{ device ID for MIDI mapper }
MIDIMAPPER = UINT(-1);
MIDI_MAPPER = UINT(-1);
 
{ flags for dwFlags parm of midiInOpen() }
MIDI_IO_STATUS = $00000020;
 
{ flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() }
MIDI_CACHE_ALL = 1;
MIDI_CACHE_BESTFIT = 2;
MIDI_CACHE_QUERY = 3;
MIDI_UNCACHE = 4;
 
{ MIDI output device capabilities structure }
type
PMidiOutCapsA = ^TMidiOutCapsA;
PMidiOutCapsW = ^TMidiOutCapsW;
PMidiOutCaps = PMidiOutCapsA;
TMidiOutCapsA = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of AnsiChar; { product name (NULL terminated string) }
wTechnology: Word; { type of device }
wVoices: Word; { # of voices (internal synth only) }
wNotes: Word; { max # of notes (internal synth only) }
wChannelMask: Word; { channels used (internal synth only) }
dwSupport: DWORD; { functionality supported by driver }
end;
TMidiOutCapsW = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of WideChar; { product name (NULL terminated string) }
wTechnology: Word; { type of device }
wVoices: Word; { # of voices (internal synth only) }
wNotes: Word; { max # of notes (internal synth only) }
wChannelMask: Word; { channels used (internal synth only) }
dwSupport: DWORD; { functionality supported by driver }
end;
TMidiOutCaps = TMidiOutCapsA;
 
 
{ flags for wTechnology field of MIDIOUTCAPS structure }
const
MOD_MIDIPORT = 1; { output port }
MOD_SYNTH = 2; { generic internal synth }
MOD_SQSYNTH = 3; { square wave internal synth }
MOD_FMSYNTH = 4; { FM internal synth }
MOD_MAPPER = 5; { MIDI mapper }
 
{ flags for dwSupport field of MIDIOUTCAPS structure }
const
MIDICAPS_VOLUME = $0001; { supports volume control }
MIDICAPS_LRVOLUME = $0002; { separate left-right volume control }
MIDICAPS_CACHE = $0004;
MIDICAPS_STREAM = $0008; { driver supports midiStreamOut directly }
 
{ MIDI output device capabilities structure }
 
type
PMidiInCapsA = ^TMidiInCapsA;
PMidiInCapsW = ^TMidiInCapsW;
PMidiInCaps = PMidiInCapsA;
TMidiInCapsA = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of AnsiChar; { product name (NULL terminated string) }
dwSupport: DWORD; { functionality supported by driver }
end;
TMidiInCapsW = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of WideChar; { product name (NULL terminated string) }
dwSupport: DWORD; { functionality supported by driver }
end;
TMidiInCaps = TMidiInCapsA;
 
{ MIDI data block header }
type
PMidiHdr = ^TMidiHdr;
TMidiHdr = record
lpData: PChar; { pointer to locked data block }
dwBufferLength: DWORD; { length of data in data block }
dwBytesRecorded: DWORD; { used for input only }
dwUser: DWORD; { for client's use }
dwFlags: DWORD; { assorted flags (see defines) }
lpNext: PMidiHdr; { reserved for driver }
reserved: DWORD; { reserved for driver }
dwOffset: DWORD; { Callback offset into buffer }
dwReserved: array[0..7] of DWORD; { Reserved for MMSYSTEM }
end;
 
PMidiEvent = ^TMidiEvent;
TMidiEvent = record
dwDeltaTime: DWORD; { Ticks since last event }
dwStreamID: DWORD; { Reserved; must be zero }
dwEvent: DWORD; { Event type and parameters }
dwParms: array[0..0] of DWORD; { Parameters if this is a long event }
end;
 
PMidiStrmBuffVer = ^TMidiStrmBuffVer;
TMidiStrmBuffVer = record
dwVersion: DWORD; { Stream buffer format version }
dwMid: DWORD; { Manufacturer ID as defined in MMREG.H }
dwOEMVersion: DWORD; { Manufacturer version for custom ext }
end;
 
{ flags for dwFlags field of MIDIHDR structure }
const
MHDR_DONE = $00000001; { done bit }
MHDR_PREPARED = $00000002; { set if header prepared }
MHDR_INQUEUE = $00000004; { reserved for driver }
MHDR_ISSTRM = $00000008; { Buffer is stream buffer }
 
(*
Type codes which go in the high byte of the event DWORD of a stream buffer
Type codes 00-7F contain parameters within the low 24 bits
Type codes 80-FF contain a length of their parameter in the low 24
bits, followed by their parameter data in the buffer. The event
DWORD contains the exact byte length; the parm data itself must be
padded to be an even multiple of 4 bytes long.
*)
 
MEVT_F_SHORT = $00000000;
MEVT_F_LONG = $80000000;
MEVT_F_CALLBACK = $40000000;
 
MEVT_SHORTMSG = $00; { parm = shortmsg for midiOutShortMsg }
MEVT_TEMPO = $01; { parm = new tempo in microsec/qn }
MEVT_NOP = $02; { parm = unused; does nothing }
 
{ 0x04-0x7F reserved }
 
MEVT_LONGMSG = $80; { parm = bytes to send verbatim }
MEVT_COMMENT = $82; { parm = comment data }
MEVT_VERSION = $84; { parm = MIDISTRMBUFFVER struct }
 
{ 0x81-0xFF reserved }
 
MIDISTRM_ERROR = -2;
 
{ Structures and defines for midiStreamProperty }
MIDIPROP_SET = $80000000;
MIDIPROP_GET = $40000000;
 
{ These are intentionally both non-zero so the app cannot accidentally
leave the operation off and happen to appear to work due to default
action. }
MIDIPROP_TIMEDIV = $00000001;
MIDIPROP_TEMPO = $00000002;
 
type
PMidiPropTimeDiv = ^TMidiPropTimeDiv;
TMidiPropTimeDiv = record
cbStruct: DWORD;
dwTimeDiv: DWORD;
end;
 
PMidiPropTempo = ^TMidiPropTempo;
TMidiPropTempo = record
cbStruct: DWORD;
dwTempo: DWORD;
end;
 
{ MIDI function prototypes }
 
function midiOutGetNumDevs: UINT; stdcall;
function midiStreamOpen(phms: PHMIDISTRM; puDeviceID: PUINT;
cMidi, dwCallback, dwInstance, fdwOpen: DWORD): MMRESULT; stdcall
function midiStreamClose(hms: HMIDISTRM): MMRESULT; stdcall;
function midiStreamProperty(hms: HMIDISTRM; lppropdata: PBYTE; dwProperty: DWORD): MMRESULT; stdcall;
function midiStreamPosition(hms: HMIDISTRM; lpmmt: PMMTime; cbmmt: UINT): MMRESULT; stdcall;
function midiStreamOut(hms: HMIDISTRM; pmh: PMidiHdr; cbmh: UINT): MMRESULT; stdcall;
function midiStreamPause(hms: HMIDISTRM): MMRESULT; stdcall;
function midiStreamRestart(hms: HMIDISTRM): MMRESULT; stdcall;
function midiStreamStop(hms: HMIDISTRM): MMRESULT; stdcall;
function midiConnect(hmi: HMIDI; hmo: HMIDIOUT; pReserved: Pointer): MMRESULT; stdcall;
function midiDisconnect(hmi: HMIDI; hmo: HMIDIOUT; pReserved: Pointer): MMRESULT; stdcall;
function midiOutGetDevCapsA(uDeviceID: UINT; lpCaps: PMidiOutCapsA; uSize: UINT): MMRESULT; stdcall;
function midiOutGetDevCapsW(uDeviceID: UINT; lpCaps: PMidiOutCapsW; uSize: UINT): MMRESULT; stdcall;
function midiOutGetDevCaps(uDeviceID: UINT; lpCaps: PMidiOutCaps; uSize: UINT): MMRESULT; stdcall;
function midiOutGetVolume(hmo: HMIDIOUT; lpdwVolume: PDWORD): MMRESULT; stdcall;
function midiOutSetVolume(hmo: HMIDIOUT; dwVolume: DWORD): MMRESULT; stdcall;
function midiOutGetErrorTextA(mmrError: MMRESULT; pszText: PAnsiChar; uSize: UINT): MMRESULT; stdcall;
function midiOutGetErrorTextW(mmrError: MMRESULT; pszText: PWideChar; uSize: UINT): MMRESULT; stdcall;
function midiOutGetErrorText(mmrError: MMRESULT; pszText: PChar; uSize: UINT): MMRESULT; stdcall;
function midiOutOpen(lphMidiOut: PHMIDIOUT; uDeviceID: UINT;
dwCallback, dwInstance, dwFlags: DWORD): MMRESULT; stdcall;
function midiOutClose(hMidiOut: HMIDIOUT): MMRESULT; stdcall;
function midiOutPrepareHeader(hMidiOut: HMIDIOUT; lpMidiOutHdr: PMidiHdr; uSize: UINT): MMRESULT; stdcall;
function midiOutUnprepareHeader(hMidiOut: HMIDIOUT; lpMidiOutHdr: PMidiHdr; uSize: UINT): MMRESULT; stdcall;
function midiOutShortMsg(hMidiOut: HMIDIOUT; dwMsg: DWORD): MMRESULT; stdcall;
function midiOutLongMsg(hMidiOut: HMIDIOUT; lpMidiOutHdr: PMidiHdr; uSize: UINT): MMRESULT; stdcall;
function midiOutReset(hMidiOut: HMIDIOUT): MMRESULT; stdcall;
function midiOutCachePatches(hMidiOut: HMIDIOUT;
uBank: UINT; lpwPatchArray: PWord; uFlags: UINT): MMRESULT; stdcall;
function midiOutCacheDrumPatches(hMidiOut: HMIDIOUT;
uPatch: UINT; lpwKeyArray: PWord; uFlags: UINT): MMRESULT; stdcall;
function midiOutGetID(hMidiOut: HMIDIOUT; lpuDeviceID: PUINT): MMRESULT; stdcall;
function midiOutMessage(hMidiOut: HMIDIOUT; uMessage: UINT; dw1, dw2: DWORD): MMRESULT; stdcall;
function midiInGetNumDevs: UINT; stdcall;
function midiInGetDevCapsA(DeviceID: UINT; lpCaps: PMidiInCapsA; uSize: UINT): MMRESULT; stdcall;
function midiInGetDevCapsW(DeviceID: UINT; lpCaps: PMidiInCapsW; uSize: UINT): MMRESULT; stdcall;
function midiInGetDevCaps(DeviceID: UINT; lpCaps: PMidiInCaps; uSize: UINT): MMRESULT; stdcall;
function midiInGetErrorTextA(mmrError: MMRESULT; pszText: PAnsiChar; uSize: UINT): MMRESULT; stdcall;
function midiInGetErrorTextW(mmrError: MMRESULT; pszText: PWideChar; uSize: UINT): MMRESULT; stdcall;
function midiInGetErrorText(mmrError: MMRESULT; pszText: PChar; uSize: UINT): MMRESULT; stdcall;
function midiInOpen(lphMidiIn: PHMIDIIN; uDeviceID: UINT;
dwCallback, dwInstance, dwFlags: DWORD): MMRESULT; stdcall;
function midiInClose(hMidiIn: HMIDIIN): MMRESULT; stdcall;
function midiInPrepareHeader(hMidiIn: HMIDIIN; lpMidiInHdr: PMidiHdr; uSize: UINT): MMRESULT; stdcall;
function midiInUnprepareHeader(hMidiIn: HMIDIIN; lpMidiInHdr: PMidiHdr; uSize: UINT): MMRESULT; stdcall;
function midiInAddBuffer(hMidiIn: HMIDIIN; lpMidiInHdr: PMidiHdr; uSize: UINT): MMRESULT; stdcall;
function midiInStart(hMidiIn: HMIDIIN): MMRESULT; stdcall;
function midiInStop(hMidiIn: HMIDIIN): MMRESULT; stdcall;
function midiInReset(hMidiIn: HMIDIIN): MMRESULT; stdcall;
function midiInGetID(hMidiIn: HMIDIIN; lpuDeviceID: PUINT): MMRESULT; stdcall;
function midiInMessage(hMidiIn: HMIDIIN; uMessage: UINT; dw1, dw2: DWORD): MMRESULT; stdcall;
 
 
{***************************************************************************
 
Auxiliary audio support
 
***************************************************************************}
 
{ device ID for aux device mapper }
const
AUX_MAPPER = UINT(-1);
 
{ Auxiliary audio device capabilities structure }
type
PAuxCapsA = ^TAuxCapsA;
PAuxCapsW = ^TAuxCapsW;
PAuxCaps = PAuxCapsA;
TAuxCapsA = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of AnsiChar; { product name (NULL terminated string) }
wTechnology: Word; { type of device }
dwSupport: DWORD; { functionality supported by driver }
end;
TAuxCapsW = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array[0..MAXPNAMELEN-1] of WideChar; { product name (NULL terminated string) }
wTechnology: Word; { type of device }
dwSupport: DWORD; { functionality supported by driver }
end;
TAuxCaps = TAuxCapsA;
 
{ flags for wTechnology field in AUXCAPS structure }
const
AUXCAPS_CDAUDIO = 1; { audio from internal CD-ROM drive }
AUXCAPS_AUXIN = 2; { audio from auxiliary input jacks }
 
{ flags for dwSupport field in AUXCAPS structure }
const
AUXCAPS_VOLUME = $0001; { supports volume control }
AUXCAPS_LRVOLUME = $0002; { separate left-right volume control }
 
{ auxiliary audio function prototypes }
function auxGetNumDevs: UINT; stdcall;
function auxGetDevCapsA(uDeviceID: UINT; lpCaps: PAuxCapsA; uSize: UINT): MMRESULT; stdcall;
function auxGetDevCapsW(uDeviceID: UINT; lpCaps: PAuxCapsW; uSize: UINT): MMRESULT; stdcall;
function auxGetDevCaps(uDeviceID: UINT; lpCaps: PAuxCaps; uSize: UINT): MMRESULT; stdcall;
function auxSetVolume(uDeviceID: UINT; dwVolume: DWORD): MMRESULT; stdcall;
function auxGetVolume(uDeviceID: UINT; lpdwVolume: PDWORD): MMRESULT; stdcall;
function auxOutMessage(uDeviceID, uMessage: UINT; dw1, dw2: DWORD): MMRESULT; stdcall;
 
 
{****************************************************************************
 
Mixer Support
 
****************************************************************************}
 
type
PHMIXEROBJ = ^HMIXEROBJ;
HMIXEROBJ = Integer;
 
PHMIXER = ^HMIXER;
HMIXER = Integer;
 
const
MIXER_SHORT_NAME_CHARS = 16;
MIXER_LONG_NAME_CHARS = 64;
 
{ MMRESULT error return values specific to the mixer API }
 
MIXERR_INVALLINE = (MIXERR_BASE + 0);
MIXERR_INVALCONTROL = (MIXERR_BASE + 1);
MIXERR_INVALVALUE = (MIXERR_BASE + 2);
MIXERR_LASTERROR = (MIXERR_BASE + 2);
 
MIXER_OBJECTF_HANDLE = $80000000;
MIXER_OBJECTF_MIXER = $00000000;
MIXER_OBJECTF_HMIXER = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIXER);
MIXER_OBJECTF_WAVEOUT = $10000000;
MIXER_OBJECTF_HWAVEOUT = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_WAVEOUT);
MIXER_OBJECTF_WAVEIN = $20000000;
MIXER_OBJECTF_HWAVEIN = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_WAVEIN);
MIXER_OBJECTF_MIDIOUT = $30000000;
MIXER_OBJECTF_HMIDIOUT = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIDIOUT);
MIXER_OBJECTF_MIDIIN = $40000000;
MIXER_OBJECTF_HMIDIIN = (MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIDIIN);
MIXER_OBJECTF_AUX = $50000000;
 
function mixerGetNumDevs: UINT; stdcall;
 
type
PMixerCapsA = ^TMixerCapsA;
PMixerCapsW = ^TMixerCapsW;
PMixerCaps = PMixerCapsA;
TMixerCapsA = record
wMid: WORD; { manufacturer id }
wPid: WORD; { product id }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array [0..MAXPNAMELEN - 1] of AnsiChar; { product name }
fdwSupport: DWORD; { misc. support bits }
cDestinations: DWORD; { count of destinations }
end;
TMixerCapsW = record
wMid: WORD; { manufacturer id }
wPid: WORD; { product id }
vDriverVersion: MMVERSION; { version of the driver }
szPname: array [0..MAXPNAMELEN - 1] of WideChar; { product name }
fdwSupport: DWORD; { misc. support bits }
cDestinations: DWORD; { count of destinations }
end;
TMixerCaps = TMixerCapsA;
 
function mixerGetDevCapsA(uMxId: UINT; pmxcaps: PMixerCapsA; cbmxcaps: UINT): MMRESULT; stdcall;
function mixerGetDevCapsW(uMxId: UINT; pmxcaps: PMixerCapsW; cbmxcaps: UINT): MMRESULT; stdcall;
function mixerGetDevCaps(uMxId: UINT; pmxcaps: PMixerCaps; cbmxcaps: UINT): MMRESULT; stdcall;
function mixerOpen(phmx: PHMIXER; uMxId: UINT; dwCallback, dwInstance, fdwOpen: DWORD): MMRESULT; stdcall;
function mixerClose(hmx: HMIXER): MMRESULT; stdcall;
function mixerMessage(hmx: HMIXER; uMsg: UINT; dwParam1, dwParam2: DWORD): DWORD; stdcall;
 
type
PMixerLineA = ^TMixerLineA;
PMixerLineW = ^TMixerLineW;
PMixerLine = PMixerLineA;
TMixerLineA = record
cbStruct: DWORD; { size of MIXERLINE structure }
dwDestination: DWORD; { zero based destination index }
dwSource: DWORD; { zero based source index (if source) }
dwLineID: DWORD; { unique line id for mixer device }
fdwLine: DWORD; { state/information about line }
dwUser: DWORD; { driver specific information }
dwComponentType: DWORD; { component type line connects to }
cChannels: DWORD; { number of channels line supports }
cConnections: DWORD; { number of connections [possible] }
cControls: DWORD; { number of controls at this line }
szShortName: array[0..MIXER_SHORT_NAME_CHARS - 1] of AnsiChar;
szName: array[0..MIXER_LONG_NAME_CHARS - 1] of AnsiChar;
Target: record
dwType: DWORD; { MIXERLINE_TARGETTYPE_xxxx }
dwDeviceID: DWORD; { target device ID of device type }
wMid: WORD; { of target device }
wPid: WORD; { " }
vDriverVersion: MMVERSION; { " }
szPname: array[0..MAXPNAMELEN - 1] of AnsiChar; { " }
end;
end;
TMixerLineW = record
cbStruct: DWORD; { size of MIXERLINE structure }
dwDestination: DWORD; { zero based destination index }
dwSource: DWORD; { zero based source index (if source) }
dwLineID: DWORD; { unique line id for mixer device }
fdwLine: DWORD; { state/information about line }
dwUser: DWORD; { driver specific information }
dwComponentType: DWORD; { component type line connects to }
cChannels: DWORD; { number of channels line supports }
cConnections: DWORD; { number of connections [possible] }
cControls: DWORD; { number of controls at this line }
szShortName: array[0..MIXER_SHORT_NAME_CHARS - 1] of WideChar;
szName: array[0..MIXER_LONG_NAME_CHARS - 1] of WideChar;
Target: record
dwType: DWORD; { MIXERLINE_TARGETTYPE_xxxx }
dwDeviceID: DWORD; { target device ID of device type }
wMid: WORD; { of target device }
wPid: WORD; { " }
vDriverVersion: MMVERSION; { " }
szPname: array[0..MAXPNAMELEN - 1] of WideChar; { " }
end;
end;
TMixerLine = TMixerLineA;
 
const
{ TMixerLine.fdwLine }
 
MIXERLINE_LINEF_ACTIVE = $00000001;
MIXERLINE_LINEF_DISCONNECTED = $00008000;
MIXERLINE_LINEF_SOURCE = $80000000;
 
{ TMixerLine.dwComponentType
component types for destinations and sources }
 
MIXERLINE_COMPONENTTYPE_DST_FIRST = $00000000;
MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0);
MIXERLINE_COMPONENTTYPE_DST_DIGITAL = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1);
MIXERLINE_COMPONENTTYPE_DST_LINE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2);
MIXERLINE_COMPONENTTYPE_DST_MONITOR = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3);
MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4);
MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5);
MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6);
MIXERLINE_COMPONENTTYPE_DST_WAVEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7);
MIXERLINE_COMPONENTTYPE_DST_VOICEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8);
MIXERLINE_COMPONENTTYPE_DST_LAST = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8);
 
MIXERLINE_COMPONENTTYPE_SRC_FIRST = $00001000;
MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0);
MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1);
MIXERLINE_COMPONENTTYPE_SRC_LINE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2);
MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3);
MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4);
MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5);
MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6);
MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7);
MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8);
MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9);
MIXERLINE_COMPONENTTYPE_SRC_ANALOG = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10);
MIXERLINE_COMPONENTTYPE_SRC_LAST = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10);
 
{ TMixerLine.Target.dwType }
 
MIXERLINE_TARGETTYPE_UNDEFINED = 0;
MIXERLINE_TARGETTYPE_WAVEOUT = 1;
MIXERLINE_TARGETTYPE_WAVEIN = 2;
MIXERLINE_TARGETTYPE_MIDIOUT = 3;
MIXERLINE_TARGETTYPE_MIDIIN = 4;
MIXERLINE_TARGETTYPE_AUX = 5;
 
function mixerGetLineInfoA(hmxobj: HMIXEROBJ; pmxl: PMixerLineA;
fdwInfo: DWORD): MMRESULT; stdcall;
function mixerGetLineInfoW(hmxobj: HMIXEROBJ; pmxl: PMixerLineW;
fdwInfo: DWORD): MMRESULT; stdcall;
function mixerGetLineInfo(hmxobj: HMIXEROBJ; pmxl: PMixerLine;
fdwInfo: DWORD): MMRESULT; stdcall;
 
const
MIXER_GETLINEINFOF_DESTINATION = $00000000;
MIXER_GETLINEINFOF_SOURCE = $00000001;
MIXER_GETLINEINFOF_LINEID = $00000002;
MIXER_GETLINEINFOF_COMPONENTTYPE = $00000003;
MIXER_GETLINEINFOF_TARGETTYPE = $00000004;
 
MIXER_GETLINEINFOF_QUERYMASK = $0000000F;
 
function mixerGetID(hmxobj: HMIXEROBJ; var puMxId: UINT; fdwId: DWORD): MMRESULT; stdcall;
 
type
PMixerControlA = ^TMixerControlA;
PMixerControlW = ^TMixerControlW;
PMixerControl = PMixerControlA;
TMixerControlA = packed record
cbStruct: DWORD; { size in bytes of MIXERCONTROL }
dwControlID: DWORD; { unique control id for mixer device }
dwControlType: DWORD; { MIXERCONTROL_CONTROLTYPE_xxx }
fdwControl: DWORD; { MIXERCONTROL_CONTROLF_xxx }
cMultipleItems: DWORD; { if MIXERCONTROL_CONTROLF_MULTIPLE set }
szShortName: array[0..MIXER_SHORT_NAME_CHARS - 1] of AnsiChar;
szName: array[0..MIXER_LONG_NAME_CHARS - 1] of AnsiChar;
Bounds: record
case Integer of
0: (lMinimum, lMaximum: Longint);
1: (dwMinimum, dwMaximum: DWORD);
2: (dwReserved: array[0..5] of DWORD);
end;
Metrics: record
case Integer of
0: (cSteps: DWORD); { # of steps between min & max }
1: (cbCustomData: DWORD); { size in bytes of custom data }
2: (dwReserved: array[0..5] of DWORD);
end;
end;
TMixerControlW = packed record
cbStruct: DWORD; { size in bytes of MIXERCONTROL }
dwControlID: DWORD; { unique control id for mixer device }
dwControlType: DWORD; { MIXERCONTROL_CONTROLTYPE_xxx }
fdwControl: DWORD; { MIXERCONTROL_CONTROLF_xxx }
cMultipleItems: DWORD; { if MIXERCONTROL_CONTROLF_MULTIPLE set }
szShortName: array[0..MIXER_SHORT_NAME_CHARS - 1] of WideChar;
szName: array[0..MIXER_LONG_NAME_CHARS - 1] of WideChar;
Bounds: record
case Integer of
0: (lMinimum, lMaximum: Longint);
1: (dwMinimum, dwMaximum: DWORD);
2: (dwReserved: array[0..5] of DWORD);
end;
Metrics: record
case Integer of
0: (cSteps: DWORD); { # of steps between min & max }
1: (cbCustomData: DWORD); { size in bytes of custom data }
2: (dwReserved: array[0..5] of DWORD);
end;
end;
TMixerControl = TMixerControlA;
 
const
{ TMixerControl.fdwControl }
 
MIXERCONTROL_CONTROLF_UNIFORM = $00000001;
MIXERCONTROL_CONTROLF_MULTIPLE = $00000002;
MIXERCONTROL_CONTROLF_DISABLED = $80000000;
 
{ MIXERCONTROL_CONTROLTYPE_xxx building block defines }
 
MIXERCONTROL_CT_CLASS_MASK = $F0000000;
MIXERCONTROL_CT_CLASS_CUSTOM = $00000000;
MIXERCONTROL_CT_CLASS_METER = $10000000;
MIXERCONTROL_CT_CLASS_SWITCH = $20000000;
MIXERCONTROL_CT_CLASS_NUMBER = $30000000;
MIXERCONTROL_CT_CLASS_SLIDER = $40000000;
MIXERCONTROL_CT_CLASS_FADER = $50000000;
MIXERCONTROL_CT_CLASS_TIME = $60000000;
MIXERCONTROL_CT_CLASS_LIST = $70000000;
 
MIXERCONTROL_CT_SUBCLASS_MASK = $0F000000;
 
MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = $00000000;
MIXERCONTROL_CT_SC_SWITCH_BUTTON = $01000000;
 
MIXERCONTROL_CT_SC_METER_POLLED = $00000000;
 
MIXERCONTROL_CT_SC_TIME_MICROSECS = $00000000;
MIXERCONTROL_CT_SC_TIME_MILLISECS = $01000000;
 
MIXERCONTROL_CT_SC_LIST_SINGLE = $00000000;
MIXERCONTROL_CT_SC_LIST_MULTIPLE = $01000000;
 
MIXERCONTROL_CT_UNITS_MASK = $00FF0000;
MIXERCONTROL_CT_UNITS_CUSTOM = $00000000;
MIXERCONTROL_CT_UNITS_BOOLEAN = $00010000;
MIXERCONTROL_CT_UNITS_SIGNED = $00020000;
MIXERCONTROL_CT_UNITS_UNSIGNED = $00030000;
MIXERCONTROL_CT_UNITS_DECIBELS = $00040000; { in 10ths }
MIXERCONTROL_CT_UNITS_PERCENT = $00050000; { in 10ths }
 
{ Commonly used control types for specifying TMixerControl.dwControlType }
 
MIXERCONTROL_CONTROLTYPE_CUSTOM = (MIXERCONTROL_CT_CLASS_CUSTOM or MIXERCONTROL_CT_UNITS_CUSTOM);
MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = (MIXERCONTROL_CT_CLASS_METER or MIXERCONTROL_CT_SC_METER_POLLED or MIXERCONTROL_CT_UNITS_BOOLEAN);
MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER or MIXERCONTROL_CT_SC_METER_POLLED or MIXERCONTROL_CT_UNITS_SIGNED);
MIXERCONTROL_CONTROLTYPE_PEAKMETER = (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1);
MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER or MIXERCONTROL_CT_SC_METER_POLLED or MIXERCONTROL_CT_UNITS_UNSIGNED);
MIXERCONTROL_CONTROLTYPE_BOOLEAN = (MIXERCONTROL_CT_CLASS_SWITCH or MIXERCONTROL_CT_SC_SWITCH_BOOLEAN or
MIXERCONTROL_CT_UNITS_BOOLEAN);
MIXERCONTROL_CONTROLTYPE_ONOFF = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1);
MIXERCONTROL_CONTROLTYPE_MUTE = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2);
MIXERCONTROL_CONTROLTYPE_MONO = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3);
MIXERCONTROL_CONTROLTYPE_LOUDNESS = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4);
MIXERCONTROL_CONTROLTYPE_STEREOENH = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5);
MIXERCONTROL_CONTROLTYPE_BUTTON = (MIXERCONTROL_CT_CLASS_SWITCH or MIXERCONTROL_CT_SC_SWITCH_BUTTON or
MIXERCONTROL_CT_UNITS_BOOLEAN);
MIXERCONTROL_CONTROLTYPE_DECIBELS = (MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_DECIBELS);
MIXERCONTROL_CONTROLTYPE_SIGNED = (MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_SIGNED);
MIXERCONTROL_CONTROLTYPE_UNSIGNED = (MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_UNSIGNED);
MIXERCONTROL_CONTROLTYPE_PERCENT = (MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_PERCENT);
MIXERCONTROL_CONTROLTYPE_SLIDER = (MIXERCONTROL_CT_CLASS_SLIDER or MIXERCONTROL_CT_UNITS_SIGNED);
MIXERCONTROL_CONTROLTYPE_PAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 1);
MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 2);
MIXERCONTROL_CONTROLTYPE_FADER = (MIXERCONTROL_CT_CLASS_FADER or MIXERCONTROL_CT_UNITS_UNSIGNED);
MIXERCONTROL_CONTROLTYPE_VOLUME = (MIXERCONTROL_CONTROLTYPE_FADER + 1);
MIXERCONTROL_CONTROLTYPE_BASS = (MIXERCONTROL_CONTROLTYPE_FADER + 2);
MIXERCONTROL_CONTROLTYPE_TREBLE = (MIXERCONTROL_CONTROLTYPE_FADER + 3);
MIXERCONTROL_CONTROLTYPE_EQUALIZER = (MIXERCONTROL_CONTROLTYPE_FADER + 4);
MIXERCONTROL_CONTROLTYPE_SINGLESELECT = (MIXERCONTROL_CT_CLASS_LIST or MIXERCONTROL_CT_SC_LIST_SINGLE or MIXERCONTROL_CT_UNITS_BOOLEAN);
MIXERCONTROL_CONTROLTYPE_MUX = (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1);
MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = (MIXERCONTROL_CT_CLASS_LIST or MIXERCONTROL_CT_SC_LIST_MULTIPLE or MIXERCONTROL_CT_UNITS_BOOLEAN);
MIXERCONTROL_CONTROLTYPE_MIXER = (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1);
MIXERCONTROL_CONTROLTYPE_MICROTIME = (MIXERCONTROL_CT_CLASS_TIME or MIXERCONTROL_CT_SC_TIME_MICROSECS or
MIXERCONTROL_CT_UNITS_UNSIGNED);
MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME or MIXERCONTROL_CT_SC_TIME_MILLISECS or
MIXERCONTROL_CT_UNITS_UNSIGNED);
 
 
type
PMixerLineControlsA = ^TMixerLineControlsA;
PMixerLineControlsW = ^TMixerLineControlsW;
PMixerLineControls = PMixerLineControlsA;
TMixerLineControlsA = record
cbStruct: DWORD; { size in bytes of MIXERLINECONTROLS }
dwLineID: DWORD; { line id (from MIXERLINE.dwLineID) }
case Integer of
0: (dwControlID: DWORD); { MIXER_GETLINECONTROLSF_ONEBYID }
1: (dwControlType: DWORD; { MIXER_GETLINECONTROLSF_ONEBYTYPE }
cControls: DWORD; { count of controls pmxctrl points to }
cbmxctrl: DWORD; { size in bytes of _one_ MIXERCONTROL }
pamxctrl: PMixerControlA); { pointer to first MIXERCONTROL array }
end;
TMixerLineControlsW = record
cbStruct: DWORD; { size in bytes of MIXERLINECONTROLS }
dwLineID: DWORD; { line id (from MIXERLINE.dwLineID) }
case Integer of
0: (dwControlID: DWORD); { MIXER_GETLINECONTROLSF_ONEBYID }
1: (dwControlType: DWORD; { MIXER_GETLINECONTROLSF_ONEBYTYPE }
cControls: DWORD; { count of controls pmxctrl points to }
cbmxctrl: DWORD; { size in bytes of _one_ MIXERCONTROL }
pamxctrl: PMixerControlW); { pointer to first MIXERCONTROL array }
end;
TMixerLineControls = TMixerLineControlsA;
 
function mixerGetLineControlsA(hmxobj: HMIXEROBJ; pmxlc: PMixerLineControlsA; fdwControls: DWORD): MMRESULT; stdcall;
function mixerGetLineControlsW(hmxobj: HMIXEROBJ; pmxlc: PMixerLineControlsW; fdwControls: DWORD): MMRESULT; stdcall;
function mixerGetLineControls(hmxobj: HMIXEROBJ; pmxlc: PMixerLineControls; fdwControls: DWORD): MMRESULT; stdcall;
 
const
MIXER_GETLINECONTROLSF_ALL = $00000000;
MIXER_GETLINECONTROLSF_ONEBYID = $00000001;
MIXER_GETLINECONTROLSF_ONEBYTYPE = $00000002;
 
MIXER_GETLINECONTROLSF_QUERYMASK = $0000000F;
 
type
PMixerControlDetails = ^TMixerControlDetails;
TMixerControlDetails = record
cbStruct: DWORD; { size in bytes of MIXERCONTROLDETAILS }
dwControlID: DWORD; { control id to get/set details on }
cChannels: DWORD; { number of channels in paDetails array }
case Integer of
0: (hwndOwner: HWND); { for MIXER_SETCONTROLDETAILSF_CUSTOM }
1: (cMultipleItems: DWORD; { if _MULTIPLE, the number of items per channel }
cbDetails: DWORD; { size of _one_ details_XX struct }
paDetails: Pointer); { pointer to array of details_XX structs }
end;
 
PMixerControlDetailsListTextA = ^TMixerControlDetailsListTextA;
PMixerControlDetailsListTextW = ^TMixerControlDetailsListTextW;
PMixerControlDetailsListText = PMixerControlDetailsListTextA;
TMixerControlDetailsListTextA = record
dwParam1: DWORD;
dwParam2: DWORD;
szName: array[0..MIXER_LONG_NAME_CHARS - 1] of AnsiChar;
end;
TMixerControlDetailsListTextW = record
dwParam1: DWORD;
dwParam2: DWORD;
szName: array[0..MIXER_LONG_NAME_CHARS - 1] of WideChar;
end;
TMixerControlDetailsListText = TMixerControlDetailsListTextA;
 
PMixerControlDetailsBoolean = ^TMixerControlDetailsBoolean;
TMixerControlDetailsBoolean = record
fValue: Longint;
end;
 
PMixerControlDetailsSigned = ^TMixerControlDetailsSigned;
TMixerControlDetailsSigned = record
lValue: Longint;
end;
 
PMixerControlDetailsUnsigned = ^TMixerControlDetailsUnsigned;
TMixerControlDetailsUnsigned = record
dwValue: DWORD;
end;
 
function mixerGetControlDetailsA(hmxobj: HMIXEROBJ; pmxcd: PMixerControlDetails; fdwDetails: DWORD): MMRESULT; stdcall;
function mixerGetControlDetailsW(hmxobj: HMIXEROBJ; pmxcd: PMixerControlDetails; fdwDetails: DWORD): MMRESULT; stdcall;
function mixerGetControlDetails(hmxobj: HMIXEROBJ; pmxcd: PMixerControlDetails; fdwDetails: DWORD): MMRESULT; stdcall;
 
const
MIXER_GETCONTROLDETAILSF_VALUE = $00000000;
MIXER_GETCONTROLDETAILSF_LISTTEXT = $00000001;
 
MIXER_GETCONTROLDETAILSF_QUERYMASK = $0000000F;
 
function mixerSetControlDetails(hmxobj: HMIXEROBJ; pmxcd: PMixerControlDetails; fdwDetails: DWORD): MMRESULT; stdcall;
 
const
MIXER_SETCONTROLDETAILSF_VALUE = $00000000;
MIXER_SETCONTROLDETAILSF_CUSTOM = $00000001;
 
MIXER_SETCONTROLDETAILSF_QUERYMASK = $0000000F;
 
{***************************************************************************
 
Timer support
 
***************************************************************************}
 
{ timer error return values }
const
TIMERR_NOERROR = 0; { no error }
TIMERR_NOCANDO = TIMERR_BASE+1; { request not completed }
TIMERR_STRUCT = TIMERR_BASE+33; { time struct size }
 
{ timer data types }
type
TFNTimeCallBack = procedure(uTimerID, uMessage: UINT;
dwUser, dw1, dw2: DWORD) stdcall;
 
 
{ flags for wFlags parameter of timeSetEvent() function }
const
TIME_ONESHOT = 0; { program timer for single event }
TIME_PERIODIC = 1; { program for continuous periodic event }
TIME_CALLBACK_FUNCTION = $0000; { callback is function }
TIME_CALLBACK_EVENT_SET = $0010; { callback is event - use SetEvent }
TIME_CALLBACK_EVENT_PULSE = $0020; { callback is event - use PulseEvent }
 
{ timer device capabilities data structure }
type
PTimeCaps = ^TTimeCaps;
TTimeCaps = record
wPeriodMin: UINT; { minimum period supported }
wPeriodMax: UINT; { maximum period supported }
end;
 
{ timer function prototypes }
function timeGetSystemTime(lpTime: PMMTime; uSize: Word): MMRESULT; stdcall;
 
function timeGetTime: DWORD; stdcall;
function timeSetEvent(uDelay, uResolution: UINT;
lpFunction: TFNTimeCallBack; dwUser: DWORD; uFlags: UINT): MMRESULT; stdcall;
function timeKillEvent(uTimerID: UINT): MMRESULT; stdcall;
function timeGetDevCaps(lpTimeCaps: PTimeCaps; uSize: UINT): MMRESULT; stdcall;
function timeBeginPeriod(uPeriod: UINT): MMRESULT; stdcall;
function timeEndPeriod(uPeriod: UINT): MMRESULT; stdcall;
 
 
{***************************************************************************
 
Joystick support
 
***************************************************************************}
 
{ joystick error return values }
const
JOYERR_NOERROR = 0; { no error }
JOYERR_PARMS = JOYERR_BASE+5; { bad parameters }
JOYERR_NOCANDO = JOYERR_BASE+6; { request not completed }
JOYERR_UNPLUGGED = JOYERR_BASE+7; { joystick is unplugged }
 
{ constants used with TJoyInfo and TJoyInfoEx structure and MM_JOY* messages }
const
JOY_BUTTON1 = $0001;
JOY_BUTTON2 = $0002;
JOY_BUTTON3 = $0004;
JOY_BUTTON4 = $0008;
JOY_BUTTON1CHG = $0100;
JOY_BUTTON2CHG = $0200;
JOY_BUTTON3CHG = $0400;
JOY_BUTTON4CHG = $0800;
 
{ constants used with TJoyInfoEx }
JOY_BUTTON5 = $00000010;
JOY_BUTTON6 = $00000020;
JOY_BUTTON7 = $00000040;
JOY_BUTTON8 = $00000080;
JOY_BUTTON9 = $00000100;
JOY_BUTTON10 = $00000200;
JOY_BUTTON11 = $00000400;
JOY_BUTTON12 = $00000800;
JOY_BUTTON13 = $00001000;
JOY_BUTTON14 = $00002000;
JOY_BUTTON15 = $00004000;
JOY_BUTTON16 = $00008000;
JOY_BUTTON17 = $00010000;
JOY_BUTTON18 = $00020000;
JOY_BUTTON19 = $00040000;
JOY_BUTTON20 = $00080000;
JOY_BUTTON21 = $00100000;
JOY_BUTTON22 = $00200000;
JOY_BUTTON23 = $00400000;
JOY_BUTTON24 = $00800000;
JOY_BUTTON25 = $01000000;
JOY_BUTTON26 = $02000000;
JOY_BUTTON27 = $04000000;
JOY_BUTTON28 = $08000000;
JOY_BUTTON29 = $10000000;
JOY_BUTTON30 = $20000000;
JOY_BUTTON31 = $40000000;
JOY_BUTTON32 = $80000000;
 
{ constants used with TJoyInfoEx }
JOY_POVCENTERED = -1;
JOY_POVFORWARD = 0;
JOY_POVRIGHT = 9000;
JOY_POVBACKWARD = 18000;
JOY_POVLEFT = 27000;
 
JOY_RETURNX = $00000001;
JOY_RETURNY = $00000002;
JOY_RETURNZ = $00000004;
JOY_RETURNR = $00000008;
JOY_RETURNU = $00000010; { axis 5 }
JOY_RETURNV = $00000020; { axis 6 }
JOY_RETURNPOV = $00000040;
JOY_RETURNBUTTONS = $00000080;
JOY_RETURNRAWDATA = $00000100;
JOY_RETURNPOVCTS = $00000200;
JOY_RETURNCENTERED = $00000400;
JOY_USEDEADZONE = $00000800;
JOY_RETURNALL = (JOY_RETURNX or JOY_RETURNY or JOY_RETURNZ or
JOY_RETURNR or JOY_RETURNU or JOY_RETURNV or
JOY_RETURNPOV or JOY_RETURNBUTTONS);
JOY_CAL_READALWAYS = $00010000;
JOY_CAL_READXYONLY = $00020000;
JOY_CAL_READ3 = $00040000;
JOY_CAL_READ4 = $00080000;
JOY_CAL_READXONLY = $00100000;
JOY_CAL_READYONLY = $00200000;
JOY_CAL_READ5 = $00400000;
JOY_CAL_READ6 = $00800000;
JOY_CAL_READZONLY = $01000000;
JOY_CAL_READRONLY = $02000000;
JOY_CAL_READUONLY = $04000000;
JOY_CAL_READVONLY = $08000000;
 
{ joystick ID constants }
const
JOYSTICKID1 = 0;
JOYSTICKID2 = 1;
 
{ joystick driver capabilites }
JOYCAPS_HASZ = $000;
JOYCAPS_HASR = $0002;
JOYCAPS_HASU = $0004;
JOYCAPS_HASV = $0008;
JOYCAPS_HASPOV = $0010;
JOYCAPS_POV4DIR = $0020;
JOYCAPS_POVCTS = $0040;
 
{ joystick device capabilities data structure }
type
PJoyCapsA = ^TJoyCapsA;
PJoyCapsW = ^TJoyCapsW;
PJoyCaps = PJoyCapsA;
TJoyCapsA = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
szPname: array[0..MAXPNAMELEN-1] of AnsiChar; { product name (NULL terminated string) }
wXmin: UINT; { minimum x position value }
wXmax: UINT; { maximum x position value }
wYmin: UINT; { minimum y position value }
wYmax: UINT; { maximum y position value }
wZmin: UINT; { minimum z position value }
wZmax: UINT; { maximum z position value }
wNumButtons: UINT; { number of buttons }
wPeriodMin: UINT; { minimum message period when captured }
wPeriodMax: UINT; { maximum message period when captured }
wRmin: UINT; { minimum r position value }
wRmax: UINT; { maximum r position value }
wUmin: UINT; { minimum u (5th axis) position value }
wUmax: UINT; { maximum u (5th axis) position value }
wVmin: UINT; { minimum v (6th axis) position value }
wVmax: UINT; { maximum v (6th axis) position value }
wCaps: UINT; { joystick capabilites }
wMaxAxes: UINT; { maximum number of axes supported }
wNumAxes: UINT; { number of axes in use }
wMaxButtons: UINT; { maximum number of buttons supported }
szRegKey: array[0..MAXPNAMELEN - 1] of AnsiChar; { registry key }
szOEMVxD: array[0..MAX_JOYSTICKOEMVXDNAME - 1] of AnsiChar; { OEM VxD in use }
end;
TJoyCapsW = record
wMid: Word; { manufacturer ID }
wPid: Word; { product ID }
szPname: array[0..MAXPNAMELEN-1] of WideChar; { product name (NULL terminated string) }
wXmin: UINT; { minimum x position value }
wXmax: UINT; { maximum x position value }
wYmin: UINT; { minimum y position value }
wYmax: UINT; { maximum y position value }
wZmin: UINT; { minimum z position value }
wZmax: UINT; { maximum z position value }
wNumButtons: UINT; { number of buttons }
wPeriodMin: UINT; { minimum message period when captured }
wPeriodMax: UINT; { maximum message period when captured }
wRmin: UINT; { minimum r position value }
wRmax: UINT; { maximum r position value }
wUmin: UINT; { minimum u (5th axis) position value }
wUmax: UINT; { maximum u (5th axis) position value }
wVmin: UINT; { minimum v (6th axis) position value }
wVmax: UINT; { maximum v (6th axis) position value }
wCaps: UINT; { joystick capabilites }
wMaxAxes: UINT; { maximum number of axes supported }
wNumAxes: UINT; { number of axes in use }
wMaxButtons: UINT; { maximum number of buttons supported }
szRegKey: array[0..MAXPNAMELEN - 1] of WideChar; { registry key }
szOEMVxD: array[0..MAX_JOYSTICKOEMVXDNAME - 1] of WideChar; { OEM VxD in use }
end;
TJoyCaps = TJoyCapsA;
 
{ joystick information data structure }
type
PJoyInfo = ^TJoyInfo;
TJoyInfo = record
wXpos: UINT; { x position }
wYpos: UINT; { y position }
wZpos: UINT; { z position }
wButtons: UINT; { button states }
end;
 
PJoyInfoEx = ^TJoyInfoEx;
TJoyInfoEx = record
dwSize: DWORD; { size of structure }
dwFlags: DWORD; { flags to indicate what to return }
wXpos: UINT; { x position }
wYpos: UINT; { y position }
wZpos: UINT; { z position }
dwRpos: DWORD; { rudder/4th axis position }
dwUpos: DWORD; { 5th axis position }
dwVpos: DWORD; { 6th axis position }
wButtons: UINT; { button states }
dwButtonNumber: DWORD; { current button number pressed }
dwPOV: DWORD; { point of view state }
dwReserved1: DWORD; { reserved for communication between winmm & driver }
dwReserved2: DWORD; { reserved for future expansion }
end;
 
{ joystick function prototypes }
function joyGetNumDevs: UINT; stdcall;
function joyGetDevCapsA(uJoyID: UINT; lpCaps: PJoyCapsA; uSize: UINT): MMRESULT; stdcall;
function joyGetDevCapsW(uJoyID: UINT; lpCaps: PJoyCapsW; uSize: UINT): MMRESULT; stdcall;
function joyGetDevCaps(uJoyID: UINT; lpCaps: PJoyCaps; uSize: UINT): MMRESULT; stdcall;
function joyGetPos(uJoyID: UINT; lpInfo: PJoyInfo): MMRESULT; stdcall;
function joyGetPosEx(uJoyID: UINT; lpInfo: PJoyInfoEx): MMRESULT; stdcall;
function joyGetThreshold(uJoyID: UINT; lpuThreshold: PUINT): MMRESULT; stdcall;
function joyReleaseCapture(uJoyID: UINT): MMRESULT; stdcall;
function joySetCapture(Handle: HWND; uJoyID, uPeriod: UINT; bChanged: BOOL): MMRESULT; stdcall;
function joySetThreshold(uJoyID, uThreshold: UINT): MMRESULT; stdcall;
 
{***************************************************************************
 
Multimedia File I/O support
 
***************************************************************************}
 
{ MMIO error return values }
const
MMIOERR_BASE = 256;
MMIOERR_FILENOTFOUND = MMIOERR_BASE + 1; { file not found }
MMIOERR_OUTOFMEMORY = MMIOERR_BASE + 2; { out of memory }
MMIOERR_CANNOTOPEN = MMIOERR_BASE + 3; { cannot open }
MMIOERR_CANNOTCLOSE = MMIOERR_BASE + 4; { cannot close }
MMIOERR_CANNOTREAD = MMIOERR_BASE + 5; { cannot read }
MMIOERR_CANNOTWRITE = MMIOERR_BASE + 6; { cannot write }
MMIOERR_CANNOTSEEK = MMIOERR_BASE + 7; { cannot seek }
MMIOERR_CANNOTEXPAND = MMIOERR_BASE + 8; { cannot expand file }
MMIOERR_CHUNKNOTFOUND = MMIOERR_BASE + 9; { chunk not found }
MMIOERR_UNBUFFERED = MMIOERR_BASE + 10; { file is unbuffered }
MMIOERR_PATHNOTFOUND = MMIOERR_BASE + 11; { path incorrect }
MMIOERR_ACCESSDENIED = MMIOERR_BASE + 12; { file was protected }
MMIOERR_SHARINGVIOLATION = MMIOERR_BASE + 13; { file in use }
MMIOERR_NETWORKERROR = MMIOERR_BASE + 14; { network not responding }
MMIOERR_TOOMANYOPENFILES = MMIOERR_BASE + 15; { no more file handles }
MMIOERR_INVALIDFILE = MMIOERR_BASE + 16; { default error file error }
 
{ MMIO constants }
const
CFSEPCHAR = '+'; { compound file name separator char. }
 
type
{ MMIO data types }
FOURCC = DWORD; { a four character code }
 
PHMMIO = ^HMMIO;
HMMIO = Integer; { a handle to an open file }
 
TFNMMIOProc = function(lpmmioinfo: PChar; uMessage: UINT; lParam1, lParam2: LPARAM): Longint stdcall;
 
{ general MMIO information data structure }
type
PMMIOInfo = ^TMMIOInfo;
TMMIOInfo = record
{ general fields }
dwFlags: DWORD; { general status flags }
fccIOProc: FOURCC; { pointer to I/O procedure }
pIOProc: TFNMMIOProc; { pointer to I/O procedure }
wErrorRet: UINT; { place for error to be returned }
hTask: HTASK; { alternate local task }
 
{ fields maintained by MMIO functions during buffered I/O }
cchBuffer: Longint; { size of I/O buffer (or 0L) }
pchBuffer: PChar; { start of I/O buffer (or NULL) }
pchNext: PChar; { pointer to next byte to read/write }
pchEndRead: PChar; { pointer to last valid byte to read }
pchEndWrite: PChar; { pointer to last byte to write }
lBufOffset: Longint; { disk offset of start of buffer }
 
{ fields maintained by I/O procedure }
lDiskOffset: Longint; { disk offset of next read or write }
adwInfo: array[0..2] of DWORD; { data specific to type of MMIOPROC }
 
{ other fields maintained by MMIO }
dwReserved1: DWORD; { reserved for MMIO use }
dwReserved2: DWORD; { reserved for MMIO use }
hmmio: HMMIO; { handle to open file }
end;
 
 
{ RIFF chunk information data structure }
type
 
PMMCKInfo = ^TMMCKInfo;
TMMCKInfo = record
ckid: FOURCC; { chunk ID }
cksize: DWORD; { chunk size }
fccType: FOURCC; { form type or list type }
dwDataOffset: DWORD; { offset of data portion of chunk }
dwFlags: DWORD; { flags used by MMIO functions }
end;
 
{ bit field masks }
const
MMIO_RWMODE = $00000003; { open file for reading/writing/both }
MMIO_SHAREMODE = $00000070; { file sharing mode number }
 
{ constants for dwFlags field of MMIOINFO }
const
MMIO_CREATE = $00001000; { create new file (or truncate file) }
MMIO_PARSE = $00000100; { parse new file returning path }
MMIO_DELETE = $00000200; { create new file (or truncate file) }
MMIO_EXIST = $00004000; { checks for existence of file }
MMIO_ALLOCBUF = $00010000; { mmioOpen() should allocate a buffer }
MMIO_GETTEMP = $00020000; { mmioOpen() should retrieve temp name }
 
const
MMIO_DIRTY = $10000000; { I/O buffer is dirty }
 
{ read/write mode numbers (bit field MMIO_RWMODE) }
const
MMIO_READ = $00000000; { open file for reading only }
MMIO_WRITE = $00000001; { open file for writing only }
MMIO_READWRITE = $00000002; { open file for reading and writing }
 
{ share mode numbers (bit field MMIO_SHAREMODE) }
const
MMIO_COMPAT = $00000000; { compatibility mode }
MMIO_EXCLUSIVE = $00000010; { exclusive-access mode }
MMIO_DENYWRITE = $00000020; { deny writing to other processes }
MMIO_DENYREAD = $00000030; { deny reading to other processes }
MMIO_DENYNONE = $00000040; { deny nothing to other processes }
 
{ various MMIO flags }
const
MMIO_FHOPEN = $0010; { mmioClose: keep file handle open }
MMIO_EMPTYBUF = $0010; { mmioFlush: empty the I/O buffer }
MMIO_TOUPPER = $0010; { mmioStringToFOURCC: to u-case }
MMIO_INSTALLPROC = $00010000; { mmioInstallIOProc: install MMIOProc }
MMIO_GLOBALPROC = $10000000; { mmioInstallIOProc: install globally }
MMIO_REMOVEPROC = $00020000; { mmioInstallIOProc: remove MMIOProc }
MMIO_UNICODEPROC = $01000000; { mmioInstallIOProc: Unicode MMIOProc }
MMIO_FINDPROC = $00040000; { mmioInstallIOProc: find an MMIOProc }
MMIO_FINDCHUNK = $0010; { mmioDescend: find a chunk by ID }
MMIO_FINDRIFF = $0020; { mmioDescend: find a LIST chunk }
MMIO_FINDLIST = $0040; { mmioDescend: find a RIFF chunk }
MMIO_CREATERIFF = $0020; { mmioCreateChunk: make a LIST chunk }
MMIO_CREATELIST = $0040; { mmioCreateChunk: make a RIFF chunk }
 
 
{ message numbers for MMIOPROC I/O procedure functions }
const
MMIOM_READ = MMIO_READ; { read }
MMIOM_WRITE = MMIO_WRITE; { write }
MMIOM_SEEK = 2; { seek to a new position in file }
MMIOM_OPEN = 3; { open file }
MMIOM_CLOSE = 4; { close file }
MMIOM_WRITEFLUSH = 5; { write and flush }
 
const
MMIOM_RENAME = 6; { rename specified file }
 
MMIOM_USER = $8000; { beginning of user-defined messages }
 
{ standard four character codes }
const
FOURCC_RIFF = $46464952; { 'RIFF' }
FOURCC_LIST = $5453494C; { 'LIST' }
 
{ four character codes used to identify standard built-in I/O procedures }
const
FOURCC_DOS = $20532F44; { 'DOS '}
FOURCC_MEM = $204D454D; { 'MEM '}
 
{ flags for mmioSeek() }
const
SEEK_SET = 0; { seek to an absolute position }
SEEK_CUR = 1; { seek relative to current position }
SEEK_END = 2; { seek relative to end of file }
 
{ other constants }
const
MMIO_DEFAULTBUFFER = 8192; { default buffer size }
 
{ MMIO function prototypes }
function mmioStringToFOURCCA(sz: PAnsiChar; uFlags: UINT): FOURCC; stdcall;
function mmioStringToFOURCCW(sz: PWideChar; uFlags: UINT): FOURCC; stdcall;
function mmioStringToFOURCC(sz: PChar; uFlags: UINT): FOURCC; stdcall;
function mmioInstallIOProcA(fccIOProc: FOURCC; pIOProc: TFNMMIOProc;
dwFlags: DWORD): TFNMMIOProc; stdcall;
function mmioInstallIOProcW(fccIOProc: FOURCC; pIOProc: TFNMMIOProc;
dwFlags: DWORD): TFNMMIOProc; stdcall;
function mmioInstallIOProc(fccIOProc: FOURCC; pIOProc: TFNMMIOProc;
dwFlags: DWORD): TFNMMIOProc; stdcall;
function mmioOpenA(szFileName: PChar; lpmmioinfo: PMMIOInfo;
dwOpenFlags: DWORD): HMMIO; stdcall;
function mmioOpenW(szFileName: PChar; lpmmioinfo: PMMIOInfo;
dwOpenFlags: DWORD): HMMIO; stdcall;
function mmioOpen(szFileName: PChar; lpmmioinfo: PMMIOInfo;
dwOpenFlags: DWORD): HMMIO; stdcall;
function mmioRenameA(szFileName, szNewFileName: PAnsiChar;
lpmmioinfo: PMMIOInfo; dwRenameFlags: DWORD): MMRESULT; stdcall;
function mmioRenameW(szFileName, szNewFileName: PWideChar;
lpmmioinfo: PMMIOInfo; dwRenameFlags: DWORD): MMRESULT; stdcall;
function mmioRename(szFileName, szNewFileName: PChar;
lpmmioinfo: PMMIOInfo; dwRenameFlags: DWORD): MMRESULT; stdcall;
function mmioClose(hmmio: HMMIO; uFlags: UINT): MMRESULT; stdcall;
function mmioRead(hmmio: HMMIO; pch: PChar; cch: Longint): Longint; stdcall;
function mmioWrite(hmmio: HMMIO; pch: PChar; cch: Longint): Longint; stdcall;
function mmioSeek(hmmio: HMMIO; lOffset: Longint;
iOrigin: Integer): Longint; stdcall;
function mmioGetInfo(hmmio: HMMIO; lpmmioinfo: PMMIOInfo; uFlags: UINT): MMRESULT; stdcall;
function mmioSetInfo(hmmio: HMMIO; lpmmioinfo: PMMIOInfo; uFlags: UINT): MMRESULT; stdcall;
function mmioSetBuffer(hmmio: HMMIO; pchBuffer: PChar; cchBuffer: Longint;
uFlags: Word): MMRESULT; stdcall;
function mmioFlush(hmmio: HMMIO; uFlags: UINT): MMRESULT; stdcall;
function mmioAdvance(hmmio: HMMIO; lpmmioinfo: PMMIOInfo; uFlags: UINT): MMRESULT; stdcall;
function mmioSendMessage(hmmio: HMMIO; uMessage: UINT;
lParam1, lParam2: DWORD): Longint; stdcall;
function mmioDescend(hmmio: HMMIO; lpck: PMMCKInfo;
lpckParent: PMMCKInfo; uFlags: UINT): MMRESULT; stdcall;
function mmioAscend(hmmio: HMMIO; lpck: PMMCKInfo; uFlags: UINT): MMRESULT; stdcall;
function mmioCreateChunk(hmmio: HMMIO; lpck: PMMCKInfo; uFlags: UINT): MMRESULT; stdcall;
 
 
{***************************************************************************
 
MCI support
 
***************************************************************************}
 
type
MCIERROR = DWORD; { error return code, 0 means no error }
MCIDEVICEID = UINT; { MCI device ID type }
 
TFNYieldProc = function(mciId: MCIDEVICEID; dwYieldData: DWORD): UINT stdcall;
 
{ MCI function prototypes }
function mciSendCommandA(mciId: MCIDEVICEID; uMessage: UINT;
dwParam1, dwParam2: DWORD): MCIERROR; stdcall;
function mciSendCommandW(mciId: MCIDEVICEID; uMessage: UINT;
dwParam1, dwParam2: DWORD): MCIERROR; stdcall;
function mciSendCommand(mciId: MCIDEVICEID; uMessage: UINT;
dwParam1, dwParam2: DWORD): MCIERROR; stdcall;
function mciSendStringA(lpstrCommand, lpstrReturnString: PAnsiChar;
uReturnLength: UINT; hWndCallback: HWND): MCIERROR; stdcall;
function mciSendStringW(lpstrCommand, lpstrReturnString: PWideChar;
uReturnLength: UINT; hWndCallback: HWND): MCIERROR; stdcall;
function mciSendString(lpstrCommand, lpstrReturnString: PChar;
uReturnLength: UINT; hWndCallback: HWND): MCIERROR; stdcall;
function mciGetDeviceIDA(pszDevice: PAnsiChar): MCIDEVICEID; stdcall;
function mciGetDeviceIDW(pszDevice: PWideChar): MCIDEVICEID; stdcall;
function mciGetDeviceID(pszDevice: PChar): MCIDEVICEID; stdcall;
function mciGetDeviceIDFromElementIDA(dwElementID: DWORD; lpstrType: PAnsiChar): MCIDEVICEID; stdcall;
function mciGetDeviceIDFromElementIDW(dwElementID: DWORD; lpstrType: PWideChar): MCIDEVICEID; stdcall;
function mciGetDeviceIDFromElementID(dwElementID: DWORD; lpstrType: PChar): MCIDEVICEID; stdcall;
function mciGetErrorStringA(mcierr: MCIERROR; pszText: PAnsiChar; uLength: UINT): BOOL; stdcall;
function mciGetErrorStringW(mcierr: MCIERROR; pszText: PWideChar; uLength: UINT): BOOL; stdcall;
function mciGetErrorString(mcierr: MCIERROR; pszText: PChar; uLength: UINT): BOOL; stdcall;
function mciSetYieldProc(mcierr: MCIERROR; fpYieldProc: TFNYieldProc;
dwYieldData: DWORD): BOOL; stdcall;
function mciGetCreatorTask(mcierr: MCIERROR): HTASK; stdcall;
function mciGetYieldProc(mcierr: MCIERROR; lpdwYieldData: PDWORD): TFNYieldProc; stdcall;
function mciExecute(pszCommand: LPCSTR): BOOL; stdcall;
 
 
{ MCI error return values }
const
MCIERR_INVALID_DEVICE_ID = MCIERR_BASE + 1;
MCIERR_UNRECOGNIZED_KEYWORD = MCIERR_BASE + 3;
MCIERR_UNRECOGNIZED_COMMAND = MCIERR_BASE + 5;
MCIERR_HARDWARE = MCIERR_BASE + 6;
MCIERR_INVALID_DEVICE_NAME = MCIERR_BASE + 7;
MCIERR_OUT_OF_MEMORY = MCIERR_BASE + 8;
MCIERR_DEVICE_OPEN = MCIERR_BASE + 9;
MCIERR_CANNOT_LOAD_DRIVER = MCIERR_BASE + 10;
MCIERR_MISSING_COMMAND_STRING = MCIERR_BASE + 11;
MCIERR_PARAM_OVERFLOW = MCIERR_BASE + 12;
MCIERR_MISSING_STRING_ARGUMENT = MCIERR_BASE + 13;
MCIERR_BAD_INTEGER = MCIERR_BASE + 14;
MCIERR_PARSER_INTERNAL = MCIERR_BASE + 15;
MCIERR_DRIVER_INTERNAL = MCIERR_BASE + 16;
MCIERR_MISSING_PARAMETER = MCIERR_BASE + 17;
MCIERR_UNSUPPORTED_FUNCTION = MCIERR_BASE + 18;
MCIERR_FILE_NOT_FOUND = MCIERR_BASE + 19;
MCIERR_DEVICE_NOT_READY = MCIERR_BASE + 20;
MCIERR_INTERNAL = MCIERR_BASE + 21;
MCIERR_DRIVER = MCIERR_BASE + 22;
MCIERR_CANNOT_USE_ALL = MCIERR_BASE + 23;
MCIERR_MULTIPLE = MCIERR_BASE + 24;
MCIERR_EXTENSION_NOT_FOUND = MCIERR_BASE + 25;
MCIERR_OUTOFRANGE = MCIERR_BASE + 26;
MCIERR_FLAGS_NOT_COMPATIBLE = MCIERR_BASE + 28;
MCIERR_FILE_NOT_SAVED = MCIERR_BASE + 30;
MCIERR_DEVICE_TYPE_REQUIRED = MCIERR_BASE + 31;
MCIERR_DEVICE_LOCKED = MCIERR_BASE + 32;
MCIERR_DUPLICATE_ALIAS = MCIERR_BASE + 33;
MCIERR_BAD_CONSTANT = MCIERR_BASE + 34;
MCIERR_MUST_USE_SHAREABLE = MCIERR_BASE + 35;
MCIERR_MISSING_DEVICE_NAME = MCIERR_BASE + 36;
MCIERR_BAD_TIME_FORMAT = MCIERR_BASE + 37;
MCIERR_NO_CLOSING_QUOTE = MCIERR_BASE + 38;
MCIERR_DUPLICATE_FLAGS = MCIERR_BASE + 39;
MCIERR_INVALID_FILE = MCIERR_BASE + 40;
MCIERR_NULL_PARAMETER_BLOCK = MCIERR_BASE + 41;
MCIERR_UNNAMED_RESOURCE = MCIERR_BASE + 42;
MCIERR_NEW_REQUIRES_ALIAS = MCIERR_BASE + 43;
MCIERR_NOTIFY_ON_AUTO_OPEN = MCIERR_BASE + 44;
MCIERR_NO_ELEMENT_ALLOWED = MCIERR_BASE + 45;
MCIERR_NONAPPLICABLE_FUNCTION = MCIERR_BASE + 46;
MCIERR_ILLEGAL_FOR_AUTO_OPEN = MCIERR_BASE + 47;
MCIERR_FILENAME_REQUIRED = MCIERR_BASE + 48;
MCIERR_EXTRA_CHARACTERS = MCIERR_BASE + 49;
MCIERR_DEVICE_NOT_INSTALLED = MCIERR_BASE + 50;
MCIERR_GET_CD = MCIERR_BASE + 51;
MCIERR_SET_CD = MCIERR_BASE + 52;
MCIERR_SET_DRIVE = MCIERR_BASE + 53;
MCIERR_DEVICE_LENGTH = MCIERR_BASE + 54;
MCIERR_DEVICE_ORD_LENGTH = MCIERR_BASE + 55;
MCIERR_NO_INTEGER = MCIERR_BASE + 56;
 
const
MCIERR_WAVE_OUTPUTSINUSE = MCIERR_BASE + 64;
MCIERR_WAVE_SETOUTPUTINUSE = MCIERR_BASE + 65;
MCIERR_WAVE_INPUTSINUSE = MCIERR_BASE + 66;
MCIERR_WAVE_SETINPUTINUSE = MCIERR_BASE + 67;
MCIERR_WAVE_OUTPUTUNSPECIFIED = MCIERR_BASE + 68;
MCIERR_WAVE_INPUTUNSPECIFIED = MCIERR_BASE + 69;
MCIERR_WAVE_OUTPUTSUNSUITABLE = MCIERR_BASE + 70;
MCIERR_WAVE_SETOUTPUTUNSUITABLE = MCIERR_BASE + 71;
MCIERR_WAVE_INPUTSUNSUITABLE = MCIERR_BASE + 72;
MCIERR_WAVE_SETINPUTUNSUITABLE = MCIERR_BASE + 73;
 
MCIERR_SEQ_DIV_INCOMPATIBLE = MCIERR_BASE + 80;
MCIERR_SEQ_PORT_INUSE = MCIERR_BASE + 81;
MCIERR_SEQ_PORT_NONEXISTENT = MCIERR_BASE + 82;
MCIERR_SEQ_PORT_MAPNODEVICE = MCIERR_BASE + 83;
MCIERR_SEQ_PORT_MISCERROR = MCIERR_BASE + 84;
MCIERR_SEQ_TIMER = MCIERR_BASE + 85;
MCIERR_SEQ_PORTUNSPECIFIED = MCIERR_BASE + 86;
MCIERR_SEQ_NOMIDIPRESENT = MCIERR_BASE + 87;
 
MCIERR_NO_WINDOW = MCIERR_BASE + 90;
MCIERR_CREATEWINDOW = MCIERR_BASE + 91;
MCIERR_FILE_READ = MCIERR_BASE + 92;
MCIERR_FILE_WRITE = MCIERR_BASE + 93;
 
MCIERR_NO_IDENTITY = MCIERR_BASE + 94;
 
{ all custom device driver errors must be >= this value }
const
MCIERR_CUSTOM_DRIVER_BASE = mcierr_Base + 256;
 
{ MCI command message identifiers }
const
MCI_OPEN = $0803;
MCI_CLOSE = $0804;
MCI_ESCAPE = $0805;
MCI_PLAY = $0806;
MCI_SEEK = $0807;
MCI_STOP = $0808;
MCI_PAUSE = $0809;
MCI_INFO = $080A;
MCI_GETDEVCAPs = $080B;
MCI_SPIN = $080C;
MCI_SET = $080D;
MCI_STEP = $080E;
MCI_RECORD = $080F;
MCI_SYSINFO = $0810;
MCI_BREAK = $0811;
MCI_SOUND = $0812;
MCI_SAVE = $0813;
MCI_STATUS = $0814;
MCI_CUE = $0830;
MCI_REALIZE = $0840;
MCI_WINDOW = $0841;
MCI_PUT = $0842;
MCI_WHERE = $0843;
MCI_FREEZE = $0844;
MCI_UNFREEZE = $0845;
MCI_LOAD = $0850;
MCI_CUT = $0851;
MCI_COPY = $0852;
MCI_PASTE = $0853;
MCI_UPDATE = $0854;
MCI_RESUME = $0855;
MCI_DELETE = $0856;
 
{ all custom MCI command messages must be >= this value }
const
MCI_USER_MESSAGES = $400 + drv_MCI_First;
MCI_LAST = $0FFF;
 
{ device ID for "all devices" }
const
MCI_ALL_DEVICE_ID = UINT(-1);
 
{ constants for predefined MCI device types }
const
MCI_DEVTYPE_VCR = MCI_STRING_OFFSET + 1;
MCI_DEVTYPE_VIDEODISC = MCI_STRING_OFFSET + 2;
MCI_DEVTYPE_OVERLAY = MCI_STRING_OFFSET + 3;
MCI_DEVTYPE_CD_AUDIO = MCI_STRING_OFFSET + 4;
MCI_DEVTYPE_DAT = MCI_STRING_OFFSET + 5;
MCI_DEVTYPE_SCANNER = MCI_STRING_OFFSET + 6;
MCI_DEVTYPE_ANIMATION = MCI_STRING_OFFSET + 7;
MCI_DEVTYPE_DIGITAL_VIDEO = MCI_STRING_OFFSET + 8;
MCI_DEVTYPE_OTHER = MCI_STRING_OFFSET + 9;
MCI_DEVTYPE_WAVEFORM_AUDIO = MCI_STRING_OFFSET + 10;
MCI_DEVTYPE_SEQUENCER = MCI_STRING_OFFSET + 11;
 
MCI_DEVTYPE_FIRST = MCI_DEVTYPE_VCR;
MCI_DEVTYPE_LAST = MCI_DEVTYPE_SEQUENCER;
 
MCI_DEVTYPE_FIRST_USER = 1000;
 
{ return values for 'status mode' command }
const
MCI_MODE_NOT_READY = MCI_STRING_OFFSET + 12;
MCI_MODE_STOP = MCI_STRING_OFFSET + 13;
MCI_MODE_PLAY = MCI_STRING_OFFSET + 14;
MCI_MODE_RECORD = MCI_STRING_OFFSET + 15;
MCI_MODE_SEEK = MCI_STRING_OFFSET + 16;
MCI_MODE_PAUSE = MCI_STRING_OFFSET + 17;
MCI_MODE_OPEN = MCI_STRING_OFFSET + 18;
 
{ constants used in 'set time format' and 'status time format' commands }
const
MCI_FORMAT_MILLISECONDS = 0;
MCI_FORMAT_HMS = 1;
MCI_FORMAT_MSF = 2;
MCI_FORMAT_FRAMES = 3;
MCI_FORMAT_SMPTE_24 = 4;
MCI_FORMAT_SMPTE_25 = 5;
MCI_FORMAT_SMPTE_30 = 6;
MCI_FORMAT_SMPTE_30DROP = 7;
MCI_FORMAT_BYTES = 8;
MCI_FORMAT_SAMPLES = 9;
MCI_FORMAT_TMSF = 10;
 
{ MCI time format conversion macros }
 
function mci_MSF_Minute(msf: Longint): Byte;
function mci_MSF_Second(msf: Longint): Byte;
function mci_MSF_Frame(msf: Longint): Byte;
function mci_Make_MSF(m, s, f: Byte): Longint;
function mci_TMSF_Track(tmsf: Longint): Byte;
function mci_TMSF_Minute(tmsf: Longint): Byte;
function mci_TMSF_Second(tmsf: Longint): Byte;
function mci_TMSF_Frame(tmsf: Longint): Byte;
function mci_Make_TMSF(t, m, s, f: Byte): Longint;
function mci_HMS_Hour(hms: Longint): Byte;
function mci_HMS_Minute(hms: Longint): Byte;
function mci_HMS_Second(hms: Longint): Byte;
function mci_Make_HMS(h, m, s: Byte): Longint;
 
{ flags for wParam of MM_MCINOTIFY message }
const
MCI_NOTIFY_SUCCESSFUL = $0001;
MCI_NOTIFY_SUPERSEDED = $0002;
MCI_NOTIFY_ABORTED = $0004;
MCI_NOTIFY_FAILURE = $0008;
 
{ common flags for dwFlags parameter of MCI command messages }
const
MCI_NOTIFY = $00000001;
MCI_WAIT = $00000002;
MCI_FROM = $00000004;
MCI_TO = $00000008;
MCI_TRACK = $00000010;
 
{ flags for dwFlags parameter of MCI_OPEN command message }
const
MCI_OPEN_SHAREABLE = $00000100;
MCI_OPEN_ELEMENT = $00000200;
MCI_OPEN_ALIAS = $00000400;
MCI_OPEN_ELEMENT_ID = $00000800;
MCI_OPEN_TYPE_ID = $00001000;
MCI_OPEN_TYPE = $00002000;
 
{ flags for dwFlags parameter of MCI_SEEK command message }
const
MCI_SEEK_TO_START = $00000100;
MCI_SEEK_TO_END = $00000200;
 
{ flags for dwFlags parameter of MCI_STATUS command message }
const
MCI_STATUS_ITEM = $00000100;
MCI_STATUS_START = $00000200;
 
{ flags for dwItem field of the MCI_STATUS_PARMS parameter block }
const
MCI_STATUS_LENGTH = $00000001;
MCI_STATUS_POSITION = $00000002;
MCI_STATUS_NUMBER_OF_TRACKS = $00000003;
MCI_STATUS_MODE = $00000004;
MCI_STATUS_MEDIA_PRESENT = $00000005;
MCI_STATUS_TIME_FORMAT = $00000006;
MCI_STATUS_READY = $00000007;
MCI_STATUS_CURRENT_TRACK = $00000008;
 
{ flags for dwFlags parameter of MCI_INFO command message }
const
MCI_INFO_PRODUCT = $00000100;
MCI_INFO_FILE = $00000200;
MCI_INFO_MEDIA_UPC = $00000400;
MCI_INFO_MEDIA_IDENTITY = $00000800;
MCI_INFO_NAME = $00001000;
MCI_INFO_COPYRIGHT = $00002000;
 
{ flags for dwFlags parameter of MCI_GETDEVCAPS command message }
const
MCI_GETDEVCAPS_ITEM = $00000100;
 
{ flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block }
const
MCI_GETDEVCAPS_CAN_RECORD = $00000001;
MCI_GETDEVCAPS_HAS_AUDIO = $00000002;
MCI_GETDEVCAPS_HAS_VIDEO = $00000003;
MCI_GETDEVCAPS_DEVICE_TYPE = $00000004;
MCI_GETDEVCAPS_USES_FILES = $00000005;
MCI_GETDEVCAPS_COMPOUND_DEVICE = $00000006;
MCI_GETDEVCAPS_CAN_EJECT = $00000007;
MCI_GETDEVCAPS_CAN_PLAY = $00000008;
MCI_GETDEVCAPS_CAN_SAVE = $00000009;
 
{ flags for dwFlags parameter of MCI_SYSINFO command message }
const
MCI_SYSINFO_QUANTITY = $00000100;
MCI_SYSINFO_OPEN = $00000200;
MCI_SYSINFO_NAME = $00000400;
MCI_SYSINFO_INSTALLNAME = $00000800;
 
{ flags for dwFlags parameter of MCI_SET command message }
const
MCI_SET_DOOR_OPEN = $00000100;
MCI_SET_DOOR_CLOSED = $00000200;
MCI_SET_TIME_FORMAT = $00000400;
MCI_SET_AUDIO = $00000800;
MCI_SET_VIDEO = $00001000;
MCI_SET_ON = $00002000;
MCI_SET_OFF = $00004000;
 
{ flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS }
const
MCI_SET_AUDIO_ALL = $00000000;
MCI_SET_AUDIO_LEFT = $00000001;
MCI_SET_AUDIO_RIGHT = $00000002;
 
{ flags for dwFlags parameter of MCI_BREAK command message }
const
MCI_BREAK_KEY = $00000100;
MCI_BREAK_HWND = $00000200;
MCI_BREAK_OFF = $00000400;
 
{ flags for dwFlags parameter of MCI_RECORD command message }
const
MCI_RECORD_INSERT = $00000100;
MCI_RECORD_OVERWRITE = $00000200;
 
{ flags for dwFlags parameter of MCI_SOUND command message }
const
MCI_SOUND_NAME = $00000100;
 
{ flags for dwFlags parameter of MCI_SAVE command message }
const
MCI_SAVE_FILE = $00000100;
 
{ flags for dwFlags parameter of MCI_LOAD command message }
const
MCI_LOAD_FILE = $00000100;
 
{ generic parameter block for MCI command messages with no special parameters }
type
PMCI_Generic_Parms = ^TMCI_Generic_Parms;
TMCI_Generic_Parms = record
dwCallback: DWORD;
end;
 
{ parameter block for MCI_OPEN command message }
type
PMCI_Open_ParmsA = ^TMCI_Open_ParmsA;
PMCI_Open_ParmsW = ^TMCI_Open_ParmsW;
PMCI_Open_Parms = PMCI_Open_ParmsA;
TMCI_Open_ParmsA = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PAnsiChar;
lpstrElementName: PAnsiChar;
lpstrAlias: PAnsiChar;
end;
TMCI_Open_ParmsW = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PWideChar;
lpstrElementName: PWideChar;
lpstrAlias: PWideChar;
end;
TMCI_Open_Parms = TMCI_Open_ParmsA;
 
{ parameter block for MCI_PLAY command message }
type
PMCI_Play_Parms = ^TMCI_Play_Parms;
TMCI_Play_Parms = record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
end;
 
{ parameter block for MCI_SEEK command message }
type
PMCI_Seek_Parms = ^TMCI_Seek_Parms;
TMCI_Seek_Parms = record
dwCallback: DWORD;
dwTo: DWORD;
end;
 
 
{ parameter block for MCI_STATUS command message }
type
PMCI_Status_Parms = ^TMCI_Status_Parms;
TMCI_Status_Parms = record
dwCallback: DWORD;
dwReturn: DWORD;
dwItem: DWORD;
dwTrack: DWORD;
end;
 
{ parameter block for MCI_INFO command message }
type
PMCI_Info_ParmsA = ^TMCI_Info_ParmsA;
PMCI_Info_ParmsW = ^TMCI_Info_ParmsW;
PMCI_Info_Parms = PMCI_Info_ParmsA;
TMCI_Info_ParmsA = record
dwCallback: DWORD;
lpstrReturn: PAnsiChar;
dwRetSize: DWORD;
end;
TMCI_Info_ParmsW = record
dwCallback: DWORD;
lpstrReturn: PWideChar;
dwRetSize: DWORD;
end;
TMCI_Info_Parms = TMCI_Info_ParmsA;
 
{ parameter block for MCI_GETDEVCAPS command message }
type
PMCI_GetDevCaps_Parms = ^TMCI_GetDevCaps_Parms;
TMCI_GetDevCaps_Parms = record
dwCallback: DWORD;
dwReturn: DWORD;
dwItem: DWORD;
end;
 
{ parameter block for MCI_SYSINFO command message }
type
PMCI_SysInfo_ParmsA = ^TMCI_SysInfo_ParmsA;
PMCI_SysInfo_ParmsW = ^TMCI_SysInfo_ParmsW;
PMCI_SysInfo_Parms = PMCI_SysInfo_ParmsA;
TMCI_SysInfo_ParmsA = record
dwCallback: DWORD;
lpstrReturn: PAnsiChar;
dwRetSize: DWORD;
dwNumber: DWORD;
wDeviceType: UINT;
end;
TMCI_SysInfo_ParmsW = record
dwCallback: DWORD;
lpstrReturn: PWideChar;
dwRetSize: DWORD;
dwNumber: DWORD;
wDeviceType: UINT;
end;
TMCI_SysInfo_Parms = TMCI_SysInfo_ParmsA;
 
{ parameter block for MCI_SET command message }
type
PMCI_Set_Parms = ^TMCI_Set_Parms;
TMCI_Set_Parms = record
dwCallback: DWORD;
dwTimeFormat: DWORD;
dwAudio: DWORD;
end;
 
 
{ parameter block for MCI_BREAK command message }
type
PMCI_Break_Parms = ^TMCI_BReak_Parms;
TMCI_BReak_Parms = record
dwCallback: DWORD;
nVirtKey: Integer;
hWndBreak: HWND;
end;
 
{ parameter block for MCI_SOUND command message }
type
PMCI_Sound_Parms = ^TMCI_Sound_Parms;
TMCI_Sound_Parms = record
dwCallback: Longint;
lpstrSoundName: PChar;
end;
 
{ parameter block for MCI_SAVE command message }
type
PMCI_Save_ParmsA = ^TMCI_SaveParmsA;
PMCI_Save_ParmsW = ^TMCI_SaveParmsW;
PMCI_Save_Parms = PMCI_Save_ParmsA;
TMCI_SaveParmsA = record
dwCallback: DWORD;
lpfilename: PAnsiChar;
end;
TMCI_SaveParmsW = record
dwCallback: DWORD;
lpfilename: PWideChar;
end;
TMCI_SaveParms = TMCI_SaveParmsA;
 
{ parameter block for MCI_LOAD command message }
type
PMCI_Load_ParmsA = ^TMCI_Load_ParmsA;
PMCI_Load_ParmsW = ^TMCI_Load_ParmsW;
PMCI_Load_Parms = PMCI_Load_ParmsA;
TMCI_Load_ParmsA = record
dwCallback: DWORD;
lpfilename: PAnsiChar;
end;
TMCI_Load_ParmsW = record
dwCallback: DWORD;
lpfilename: PWideChar;
end;
TMCI_Load_Parms = TMCI_Load_ParmsA;
 
{ parameter block for MCI_RECORD command message }
type
PMCI_Record_Parms = ^TMCI_Record_Parms;
TMCI_Record_Parms = record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
end;
 
 
{ MCI extensions for videodisc devices }
 
{ flag for dwReturn field of MCI_STATUS_PARMS }
{ MCI_STATUS command, (dwItem == MCI_STATUS_MODE) }
const
MCI_VD_MODE_PARK = MCI_VD_OFFSET + 1;
 
{ flag for dwReturn field of MCI_STATUS_PARMS }
{ MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) }
const
MCI_VD_MEDIA_CLV = MCI_VD_OFFSET + 2;
MCI_VD_MEDIA_CAV = MCI_VD_OFFSET + 3;
MCI_VD_MEDIA_OTHER = MCI_VD_OFFSET + 4;
 
const
MCI_VD_FORMAT_TRACK = $4001;
 
{ flags for dwFlags parameter of MCI_PLAY command message }
const
MCI_VD_PLAY_REVERSE = $00010000;
MCI_VD_PLAY_FAST = $00020000;
MCI_VD_PLAY_SPEED = $00040000;
MCI_VD_PLAY_SCAN = $00080000;
MCI_VD_PLAY_SLOW = $00100000;
 
{ flag for dwFlags parameter of MCI_SEEK command message }
const
MCI_VD_SEEK_REVERSE = $00010000;
 
{ flags for dwItem field of MCI_STATUS_PARMS parameter block }
const
MCI_VD_STATUS_SPEED = $00004002;
MCI_VD_STATUS_FORWARD = $00004003;
MCI_VD_STATUS_MEDIA_TYPE = $00004004;
MCI_VD_STATUS_SIDE = $00004005;
MCI_VD_STATUS_DISC_SIZE = $00004006;
 
{ flags for dwFlags parameter of MCI_GETDEVCAPS command message }
const
MCI_VD_GETDEVCAPS_CLV = $00010000;
MCI_VD_GETDEVCAPS_CAV = $00020000;
 
MCI_VD_SPIN_UP = $00010000;
MCI_VD_SPIN_DOWN = $00020000;
 
{ flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block }
const
MCI_VD_GETDEVCAPS_CAN_REVERSE = $00004002;
MCI_VD_GETDEVCAPS_FAST_RATE = $00004003;
MCI_VD_GETDEVCAPS_SLOW_RATE = $00004004;
MCI_VD_GETDEVCAPS_NORMAL_RATE = $00004005;
 
{ flags for the dwFlags parameter of MCI_STEP command message }
const
MCI_VD_STEP_FRAMES = $00010000;
MCI_VD_STEP_REVERSE = $00020000;
 
{ flag for the MCI_ESCAPE command message }
const
MCI_VD_ESCAPE_STRING = $00000100;
 
{ parameter block for MCI_PLAY command message }
type
PMCI_VD_Play_Parms = ^TMCI_VD_Play_Parms;
TMCI_VD_Play_Parms = record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
dwSpeed: DWORD;
end;
 
{ parameter block for MCI_STEP command message }
type
PMCI_VD_Step_Parms = ^TMCI_VD_Step_Parms;
TMCI_VD_Step_Parms = record
dwCallback: DWORD;
dwFrames: DWORD;
end;
 
{ parameter block for MCI_ESCAPE command message }
type
PMCI_VD_Escape_ParmsA = ^TMCI_VD_Escape_ParmsA;
PMCI_VD_Escape_ParmsW = ^TMCI_VD_Escape_ParmsW;
PMCI_VD_Escape_Parms = PMCI_VD_Escape_ParmsA;
TMCI_VD_Escape_ParmsA = record
dwCallback: DWORD;
lpstrCommand: PAnsiChar;
end;
TMCI_VD_Escape_ParmsW = record
dwCallback: DWORD;
lpstrCommand: PWideChar;
end;
TMCI_VD_Escape_Parms = TMCI_VD_Escape_ParmsA;
 
{ MCI extensions for CD audio devices }
 
{ flags for the dwItem field of the MCI_STATUS_PARMS parameter block }
const
MCI_CDA_STATUS_TYPE_TRACK = 00004001;
 
{ flags for the dwReturn field of MCI_STATUS_PARMS parameter block }
{ MCI_STATUS command, (dwItem == MCI_CDA_STATUS_TYPE_TRACK) }
MCI_CDA_TRACK_AUDIO = MCI_CD_OFFSET + 0;
MCI_CDA_TRACK_OTHER = MCI_CD_OFFSET + 1;
 
{ MCI extensions for waveform audio devices }
MCI_WAVE_PCM = MCI_WAVE_OFFSET + 0;
MCI_WAVE_MAPPER = MCI_WAVE_OFFSET + 1;
 
{ flags for the dwFlags parameter of MCI_OPEN command message }
const
MCI_WAVE_OPEN_BUFFER = $00010000;
 
{ flags for the dwFlags parameter of MCI_SET command message }
const
MCI_WAVE_SET_FORMATTAG = $00010000;
MCI_WAVE_SET_CHANNELS = $00020000;
MCI_WAVE_SET_SAMPLESPERSEC = $00040000;
MCI_WAVE_SET_AVGBYTESPERSEC = $00080000;
MCI_WAVE_SET_BLOCKALIGN = $00100000;
MCI_WAVE_SET_BITSPERSAMPLE = $00200000;
 
{ flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages }
const
MCI_WAVE_INPUT = $00400000;
MCI_WAVE_OUTPUT = $00800000;
 
{ flags for the dwItem field of MCI_STATUS_PARMS parameter block }
const
MCI_WAVE_STATUS_FORMATTAG = $00004001;
MCI_WAVE_STATUS_CHANNELS = $00004002;
MCI_WAVE_STATUS_SAMPLESPERSEC = $00004003;
MCI_WAVE_STATUS_AVGBYTESPERSEC = $00004004;
MCI_WAVE_STATUS_BLOCKALIGN = $00004005;
MCI_WAVE_STATUS_BITSPERSAMPLE = $00004006;
MCI_WAVE_STATUS_LEVEL = $00004007;
 
{ flags for the dwFlags parameter of MCI_SET command message }
const
MCI_WAVE_SET_ANYINPUT = $04000000;
MCI_WAVE_SET_ANYOUTPUT = $08000000;
 
{ flags for the dwFlags parameter of MCI_GETDEVCAPS command message }
const
MCI_WAVE_GETDEVCAPS_INPUTS = $00004001;
MCI_WAVE_GETDEVCAPS_OUTPUTS = $00004002;
 
{ parameter block for MCI_OPEN command message }
type
PMCI_Wave_Open_ParmsA = ^TMCI_Wave_Open_ParmsA;
PMCI_Wave_Open_ParmsW = ^TMCI_Wave_Open_ParmsW;
PMCI_Wave_Open_Parms = PMCI_Wave_Open_ParmsA;
TMCI_Wave_Open_ParmsA = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PAnsiChar;
lpstrElementName: PAnsiChar;
lpstrAlias: PAnsiChar;
dwBufferSeconds: DWORD;
end;
TMCI_Wave_Open_ParmsW = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PWideChar;
lpstrElementName: PWideChar;
lpstrAlias: PWideChar;
dwBufferSeconds: DWORD;
end;
TMCI_Wave_Open_Parms = TMCI_Wave_Open_ParmsA;
 
{ parameter block for MCI_DELETE command message }
type
PMCI_Wave_Delete_Parms = ^TMCI_Wave_Delete_Parms;
TMCI_Wave_Delete_Parms = record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
end;
 
{ parameter block for MCI_SET command message }
type
PMCI_Wave_Set_Parms = ^TMCI_Wave_Set_Parms;
TMCI_Wave_Set_Parms = record
dwCallback: DWORD;
dwTimeFormat: DWORD;
dwAudio: DWORD;
wInput: UINT;
wOutput: UINT;
wFormatTag: Word;
wReserved2: Word;
nChannels: Word;
wReserved3: Word;
nSamplesPerSec: DWORD;
nAvgBytesPerSec: DWORD;
nBlockAlign: Word;
wReserved4: Word;
wBitsPerSample: Word;
wReserved5: Word;
end;
 
 
{ MCI extensions for MIDI sequencer devices }
 
{ flags for the dwReturn field of MCI_STATUS_PARMS parameter block }
{ MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) }
const
MCI_SEQ_DIV_PPQN = 0 + MCI_SEQ_OFFSET;
MCI_SEQ_DIV_SMPTE_24 = 1 + MCI_SEQ_OFFSET;
MCI_SEQ_DIV_SMPTE_25 = 2 + MCI_SEQ_OFFSET;
MCI_SEQ_DIV_SMPTE_30DROP = 3 + MCI_SEQ_OFFSET;
MCI_SEQ_DIV_SMPTE_30 = 4 + MCI_SEQ_OFFSET;
 
{ flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block }
{ MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) }
const
MCI_SEQ_FORMAT_SONGPTR = $4001;
MCI_SEQ_FILE = $4002;
MCI_SEQ_MIDI = $4003;
MCI_SEQ_SMPTE = $4004;
MCI_SEQ_NONE = 65533;
MCI_SEQ_MAPPER = 65535;
 
{ flags for the dwItem field of MCI_STATUS_PARMS parameter block }
const
MCI_SEQ_STATUS_TEMPO = $00004002;
MCI_SEQ_STATUS_PORT = $00004003;
MCI_SEQ_STATUS_SLAVE = $00004007;
MCI_SEQ_STATUS_MASTER = $00004008;
MCI_SEQ_STATUS_OFFSET = $00004009;
MCI_SEQ_STATUS_DIVTYPE = $0000400A;
MCI_SEQ_STATUS_NAME = $0000400B;
MCI_SEQ_STATUS_COPYRIGHT = $0000400C;
 
{ flags for the dwFlags parameter of MCI_SET command message }
const
MCI_SEQ_SET_TEMPO = $00010000;
MCI_SEQ_SET_PORT = $00020000;
MCI_SEQ_SET_SLAVE = $00040000;
MCI_SEQ_SET_MASTER = $00080000;
MCI_SEQ_SET_OFFSET = $01000000;
 
{ parameter block for MCI_SET command message }
type
PMCI_Seq_Set_Parms = ^TMCI_Seq_Set_Parms;
TMCI_Seq_Set_Parms = record
dwCallback: DWORD;
dwTimeFormat: DWORD;
dwAudio: DWORD;
dwTempo: DWORD;
dwPort: DWORD;
dwSlave: DWORD;
dwMaster: DWORD;
dwOffset: DWORD;
end;
 
{ MCI extensions for animation devices }
 
{ flags for dwFlags parameter of MCI_OPEN command message }
const
MCI_ANIM_OPEN_WS = $00010000;
MCI_ANIM_OPEN_PARENT = $00020000;
MCI_ANIM_OPEN_NOSTATIC = $00040000;
 
{ flags for dwFlags parameter of MCI_PLAY command message }
const
MCI_ANIM_PLAY_SPEED = $00010000;
MCI_ANIM_PLAY_REVERSE = $00020000;
MCI_ANIM_PLAY_FAST = $00040000;
MCI_ANIM_PLAY_SLOW = $00080000;
MCI_ANIM_PLAY_SCAN = $00100000;
 
{ flags for dwFlags parameter of MCI_STEP command message }
const
MCI_ANIM_STEP_REVERSE = $00010000;
MCI_ANIM_STEP_FRAMES = $00020000;
 
{ flags for dwItem field of MCI_STATUS_PARMS parameter block }
const
MCI_ANIM_STATUS_SPEED = $00004001;
MCI_ANIM_STATUS_FORWARD = $00004002;
MCI_ANIM_STATUS_HWND = $00004003;
MCI_ANIM_STATUS_HPAL = $00004004;
MCI_ANIM_STATUS_STRETCH = $00004005;
 
{ flags for the dwFlags parameter of MCI_INFO command message }
const
MCI_ANIM_INFO_TEXT = $00010000;
 
{ flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block }
const
MCI_ANIM_GETDEVCAPS_CAN_REVERSE = $00004001;
MCI_ANIM_GETDEVCAPS_FAST_RATE = $00004002;
MCI_ANIM_GETDEVCAPS_SLOW_RATE = $00004003;
MCI_ANIM_GETDEVCAPS_NORMAL_RATE = $00004004;
MCI_ANIM_GETDEVCAPS_PALETTES = $00004006;
MCI_ANIM_GETDEVCAPS_CAN_STRETCH = $00004007;
MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = $00004008;
 
{ flags for the MCI_REALIZE command message }
const
MCI_ANIM_REALIZE_NORM = $00010000;
MCI_ANIM_REALIZE_BKGD = $00020000;
 
{ flags for dwFlags parameter of MCI_WINDOW command message }
const
MCI_ANIM_WINDOW_HWND = $00010000;
MCI_ANIM_WINDOW_STATE = $00040000;
MCI_ANIM_WINDOW_TEXT = $00080000;
MCI_ANIM_WINDOW_ENABLE_STRETCH = $00100000;
MCI_ANIM_WINDOW_DISABLE_STRETCH = $00200000;
 
{ flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block }
{ MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) }
const
MCI_ANIM_WINDOW_DEFAULT = $00000000;
 
{ flags for dwFlags parameter of MCI_PUT command message }
const
MCI_ANIM_RECT = $00010000;
MCI_ANIM_PUT_SOURCE = $00020000;
MCI_ANIM_PUT_DESTINATION = $00040000;
 
{ flags for dwFlags parameter of MCI_WHERE command message }
const
MCI_ANIM_WHERE_SOURCE = $00020000;
MCI_ANIM_WHERE_DESTINATION = $00040000;
 
{ flags for dwFlags parameter of MCI_UPDATE command message }
const
MCI_ANIM_UPDATE_HDC = $00020000;
 
{ parameter block for MCI_OPEN command message }
type
PMCI_Anim_Open_ParmsA = ^TMCI_Anim_Open_ParmsA;
PMCI_Anim_Open_ParmsW = ^TMCI_Anim_Open_ParmsW;
PMCI_Anim_Open_Parms = PMCI_Anim_Open_ParmsA;
TMCI_Anim_Open_ParmsA = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PAnsiChar;
lpstrElementName: PAnsiChar;
lpstrAlias: PAnsiChar;
dwStyle: DWORD;
hWndParent: HWND;
end;
TMCI_Anim_Open_ParmsW = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PWideChar;
lpstrElementName: PWideChar;
lpstrAlias: PWideChar;
dwStyle: DWORD;
hWndParent: HWND;
end;
TMCI_Anim_Open_Parms = TMCI_Anim_Open_ParmsA;
 
{ parameter block for MCI_PLAY command message }
type
PMCI_Anim_Play_Parms = ^TMCI_Anim_Play_Parms;
TMCI_Anim_Play_Parms = record
dwCallback: DWORD;
dwFrom: DWORD;
dwTo: DWORD;
dwSpeed: DWORD;
end;
 
{ parameter block for MCI_STEP command message }
type
PMCI_Anim_Step_Parms = ^TMCI_Anim_Step_Parms;
TMCI_Anim_Step_Parms = record
dwCallback: DWORD;
dwFrames: DWORD;
end;
 
{ parameter block for MCI_WINDOW command message }
type
PMCI_Anim_Window_ParmsA = ^TMCI_Anim_Window_ParmsA;
PMCI_Anim_Window_ParmsW = ^TMCI_Anim_Window_ParmsW;
PMCI_Anim_Window_Parms = PMCI_Anim_Window_ParmsA;
TMCI_Anim_Window_ParmsA = record
dwCallback: DWORD;
Wnd: HWND; { formerly "hWnd" }
nCmdShow: UINT;
lpstrText: PAnsiChar;
end;
TMCI_Anim_Window_ParmsW = record
dwCallback: DWORD;
Wnd: HWND; { formerly "hWnd" }
nCmdShow: UINT;
lpstrText: PWideChar;
end;
TMCI_Anim_Window_Parms = TMCI_Anim_Window_ParmsA;
 
{ parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages }
type
PMCI_Anim_Rect_Parms = ^ TMCI_Anim_Rect_Parms;
TMCI_Anim_Rect_Parms = record
dwCallback: DWORD;
rc: TRect;
end;
 
{ parameter block for MCI_UPDATE PARMS }
type
PMCI_Anim_Update_Parms = ^TMCI_Anim_Update_Parms;
TMCI_Anim_Update_Parms = record
dwCallback: DWORD;
rc: TRect;
hDC: HDC;
end;
 
{ MCI extensions for video overlay devices }
 
{ flags for dwFlags parameter of MCI_OPEN command message }
const
MCI_OVLY_OPEN_WS = $00010000;
MCI_OVLY_OPEN_PARENT = $00020000;
 
{ flags for dwFlags parameter of MCI_STATUS command message }
const
MCI_OVLY_STATUS_HWND = $00004001;
MCI_OVLY_STATUS_STRETCH = $00004002;
 
{ flags for dwFlags parameter of MCI_INFO command message }
const
MCI_OVLY_INFO_TEXT = $00010000;
 
{ flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block }
const
MCI_OVLY_GETDEVCAPS_CAN_STRETCH = $00004001;
MCI_OVLY_GETDEVCAPS_CAN_FREEZE = $00004002;
MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = $00004003;
 
{ flags for dwFlags parameter of MCI_WINDOW command message }
const
MCI_OVLY_WINDOW_HWND = $00010000;
MCI_OVLY_WINDOW_STATE = $00040000;
MCI_OVLY_WINDOW_TEXT = $00080000;
MCI_OVLY_WINDOW_ENABLE_STRETCH = $00100000;
MCI_OVLY_WINDOW_DISABLE_STRETCH = $00200000;
 
{ flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block }
const
MCI_OVLY_WINDOW_DEFAULT = $00000000;
 
{ flags for dwFlags parameter of MCI_PUT command message }
const
MCI_OVLY_RECT = $00010000;
MCI_OVLY_PUT_SOURCE = $00020000;
MCI_OVLY_PUT_DESTINATION = $00040000;
MCI_OVLY_PUT_FRAME = $00080000;
MCI_OVLY_PUT_VIDEO = $00100000;
 
{ flags for dwFlags parameter of MCI_WHERE command message }
const
MCI_OVLY_WHERE_SOURCE = $00020000;
MCI_OVLY_WHERE_DESTINATION = $00040000;
MCI_OVLY_WHERE_FRAME = $00080000;
MCI_OVLY_WHERE_VIDEO = $00100000;
 
{ parameter block for MCI_OPEN command message }
type
PMCI_Ovly_Open_ParmsA = ^TMCI_Ovly_Open_ParmsA;
PMCI_Ovly_Open_ParmsW = ^TMCI_Ovly_Open_ParmsW;
PMCI_Ovly_Open_Parms = PMCI_Ovly_Open_ParmsA;
TMCI_Ovly_Open_ParmsA = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PAnsiChar;
lpstrElementName: PAnsiChar;
lpstrAlias: PAnsiChar;
dwStyle: DWORD;
hWndParent: HWND;
end;
TMCI_Ovly_Open_ParmsW = record
dwCallback: DWORD;
wDeviceID: MCIDEVICEID;
lpstrDeviceType: PWideChar;
lpstrElementName: PWideChar;
lpstrAlias: PWideChar;
dwStyle: DWORD;
hWndParent: HWND;
end;
TMCI_Ovly_Open_Parms = TMCI_Ovly_Open_ParmsA;
 
{ parameter block for MCI_WINDOW command message }
type
PMCI_Ovly_Window_ParmsA = ^TMCI_Ovly_Window_ParmsA;
PMCI_Ovly_Window_ParmsW = ^TMCI_Ovly_Window_ParmsW;
PMCI_Ovly_Window_Parms = PMCI_Ovly_Window_ParmsA;
TMCI_Ovly_Window_ParmsA = record
dwCallback: DWORD;
WHandle: HWND; { formerly "hWnd"}
nCmdShow: UINT;
lpstrText: PAnsiChar;
end;
TMCI_Ovly_Window_ParmsW = record
dwCallback: DWORD;
WHandle: HWND; { formerly "hWnd"}
nCmdShow: UINT;
lpstrText: PWideChar;
end;
TMCI_Ovly_Window_Parms = TMCI_Ovly_Window_ParmsA;
 
{ parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages }
type
PMCI_Ovly_Rect_Parms = ^ TMCI_Ovly_Rect_Parms;
TMCI_Ovly_Rect_Parms = record
dwCallback: DWORD;
rc: TRect;
end;
 
{ parameter block for MCI_SAVE command message }
type
PMCI_Ovly_Save_ParmsA = ^TMCI_Ovly_Save_ParmsA;
PMCI_Ovly_Save_ParmsW = ^TMCI_Ovly_Save_ParmsW;
PMCI_Ovly_Save_Parms = PMCI_Ovly_Save_ParmsA;
TMCI_Ovly_Save_ParmsA = record
dwCallback: DWORD;
lpfilename: PAnsiChar;
rc: TRect;
end;
TMCI_Ovly_Save_ParmsW = record
dwCallback: DWORD;
lpfilename: PWideChar;
rc: TRect;
end;
TMCI_Ovly_Save_Parms = TMCI_Ovly_Save_ParmsA;
 
{ parameter block for MCI_LOAD command message }
type
PMCI_Ovly_Load_ParmsA = ^TMCI_Ovly_Load_ParmsA;
PMCI_Ovly_Load_ParmsW = ^TMCI_Ovly_Load_ParmsW;
PMCI_Ovly_Load_Parms = PMCI_Ovly_Load_ParmsA;
TMCI_Ovly_Load_ParmsA = record
dwCallback: DWORD;
lpfilename: PAnsiChar;
rc: TRect;
end;
TMCI_Ovly_Load_ParmsW = record
dwCallback: DWORD;
lpfilename: PWideChar;
rc: TRect;
end;
TMCI_Ovly_Load_Parms = TMCI_Ovly_Load_ParmsA;
 
 
{***************************************************************************
 
DISPLAY Driver extensions
 
***************************************************************************}
 
const
NEWTRANSPARENT = 3; { use with SetBkMode() }
QUERYROPSUPPORT = 40; { use to determine ROP support }
 
{***************************************************************************
 
DIB Driver extensions
 
***************************************************************************}
const
SELECTDIB = 41; { DIB.DRV select dib escape }
 
function DIBIndex(N: Integer): Longint;
 
{***************************************************************************
 
ScreenSaver support
 
The current application will receive a syscommand of SC_SCREENSAVE just
before the screen saver is invoked. If the app wishes to prevent a
screen save, return a non-zero value, otherwise call DefWindowProc().
 
***************************************************************************}
 
const
SC_SCREENSAVE = $F140;
 
mmsyst = 'winmm.dll';
 
implementation
 
function auxGetDevCapsA; external mmsyst name 'auxGetDevCapsA';
function auxGetDevCapsW; external mmsyst name 'auxGetDevCapsW';
function auxGetDevCaps; external mmsyst name 'auxGetDevCapsA';
function auxGetNumDevs; external mmsyst name 'auxGetNumDevs';
function auxGetVolume; external mmsyst name 'auxGetVolume';
function auxOutMessage; external mmsyst name 'auxOutMessage';
function auxSetVolume; external mmsyst name 'auxSetVolume';
function CloseDriver; external mmsyst name 'CloseDriver';
function DefDriverProc; external mmsyst name 'DefDriverProc';
function DrvGetModuleHandle; external mmsyst name 'DrvGetModuleHandle';
function GetDriverModuleHandle; external mmsyst name 'GetDriverModuleHandle';
function joyGetDevCapsA; external mmsyst name 'joyGetDevCapsA';
function joyGetDevCapsW; external mmsyst name 'joyGetDevCapsW';
function joyGetDevCaps; external mmsyst name 'joyGetDevCapsA';
function joyGetNumDevs; external mmsyst name 'joyGetNumDevs';
function joyGetPos; external mmsyst name 'joyGetPos';
function joyGetPosEx; external mmsyst name 'joyGetPosEx';
function joyGetThreshold; external mmsyst name 'joyGetThreshold';
function joyReleaseCapture; external mmsyst name 'joyReleaseCapture';
function joySetCapture; external mmsyst name 'joySetCapture';
function joySetThreshold; external mmsyst name 'joySetThreshold';
function mciExecute; external mmsyst name 'mciExecute';
function mciGetCreatorTask; external mmsyst name 'mciGetCreatorTask';
function mciGetDeviceIDA; external mmsyst name 'mciGetDeviceIDA';
function mciGetDeviceIDW; external mmsyst name 'mciGetDeviceIDW';
function mciGetDeviceID; external mmsyst name 'mciGetDeviceIDA';
function mciGetDeviceIDFromElementIDA; external mmsyst name 'mciGetDeviceIDFromElementIDA';
function mciGetDeviceIDFromElementIDW; external mmsyst name 'mciGetDeviceIDFromElementIDW';
function mciGetDeviceIDFromElementID; external mmsyst name 'mciGetDeviceIDFromElementIDA';
function mciGetErrorStringA; external mmsyst name 'mciGetErrorStringA';
function mciGetErrorStringW; external mmsyst name 'mciGetErrorStringW';
function mciGetErrorString; external mmsyst name 'mciGetErrorStringA';
function mciGetYieldProc; external mmsyst name 'mciGetYieldProc';
function mciSendCommandA; external mmsyst name 'mciSendCommandA';
function mciSendCommandW; external mmsyst name 'mciSendCommandW';
function mciSendCommand; external mmsyst name 'mciSendCommandA';
function mciSendStringA; external mmsyst name 'mciSendStringA';
function mciSendStringW; external mmsyst name 'mciSendStringW';
function mciSendString; external mmsyst name 'mciSendStringA';
function mciSetYieldProc; external mmsyst name 'mciSetYieldProc';
function midiConnect; external mmsyst name 'midiConnect';
function midiDisconnect; external mmsyst name 'midiDisconnect';
function midiInAddBuffer; external mmsyst name 'midiInAddBuffer';
function midiInClose; external mmsyst name 'midiInClose';
function midiInGetDevCapsA; external mmsyst name 'midiInGetDevCapsA';
function midiInGetDevCapsW; external mmsyst name 'midiInGetDevCapsW';
function midiInGetDevCaps; external mmsyst name 'midiInGetDevCapsA';
function midiInGetErrorTextA; external mmsyst name 'midiInGetErrorTextA';
function midiInGetErrorTextW; external mmsyst name 'midiInGetErrorTextW';
function midiInGetErrorText; external mmsyst name 'midiInGetErrorTextA';
function midiInGetID; external mmsyst name 'midiInGetID';
function midiInGetNumDevs; external mmsyst name 'midiInGetNumDevs';
function midiInMessage; external mmsyst name 'midiInMessage';
function midiInOpen; external mmsyst name 'midiInOpen';
function midiInPrepareHeader; external mmsyst name 'midiInPrepareHeader';
function midiInReset; external mmsyst name 'midiInReset';
function midiInStart; external mmsyst name 'midiInStart';
function midiInStop; external mmsyst name 'midiInStop';
function midiInUnprepareHeader; external mmsyst name 'midiInUnprepareHeader';
function midiOutCacheDrumPatches; external mmsyst name 'midiOutCacheDrumPatches';
function midiOutCachePatches; external mmsyst name 'midiOutCachePatches';
function midiOutClose; external mmsyst name 'midiOutClose';
function midiOutGetDevCapsA; external mmsyst name 'midiOutGetDevCapsA';
function midiOutGetDevCapsW; external mmsyst name 'midiOutGetDevCapsW';
function midiOutGetDevCaps; external mmsyst name 'midiOutGetDevCapsA';
function midiOutGetErrorTextA; external mmsyst name 'midiOutGetErrorTextA';
function midiOutGetErrorTextW; external mmsyst name 'midiOutGetErrorTextW';
function midiOutGetErrorText; external mmsyst name 'midiOutGetErrorTextA';
function midiOutGetID; external mmsyst name 'midiOutGetID';
function midiOutGetNumDevs; external mmsyst name 'midiOutGetNumDevs';
function midiOutGetVolume; external mmsyst name 'midiOutGetVolume';
function midiOutLongMsg; external mmsyst name 'midiOutLongMsg';
function midiOutMessage; external mmsyst name 'midiOutMessage';
function midiOutOpen; external mmsyst name 'midiOutOpen';
function midiOutPrepareHeader; external mmsyst name 'midiOutPrepareHeader';
function midiOutReset; external mmsyst name 'midiOutReset';
function midiOutSetVolume; external mmsyst name 'midiOutSetVolume';
function midiOutShortMsg; external mmsyst name 'midiOutShortMsg';
function midiOutUnprepareHeader; external mmsyst name 'midiOutUnprepareHeader';
function midiStreamClose; external mmsyst name 'midiStreamClose';
function midiStreamOpen; external mmsyst name 'midiStreamOpen';
function midiStreamOut; external mmsyst name 'midiStreamOut';
function midiStreamPause; external mmsyst name 'midiStreamPause';
function midiStreamPosition; external mmsyst name 'midiStreamPosition';
function midiStreamProperty; external mmsyst name 'midiStreamProperty';
function midiStreamRestart; external mmsyst name 'midiStreamRestart';
function midiStreamStop; external mmsyst name 'midiStreamStop';
function mixerClose; external mmsyst name 'mixerClose';
function mixerGetControlDetailsA; external mmsyst name 'mixerGetControlDetailsA';
function mixerGetControlDetailsW; external mmsyst name 'mixerGetControlDetailsW';
function mixerGetControlDetails; external mmsyst name 'mixerGetControlDetailsA';
function mixerGetDevCapsA; external mmsyst name 'mixerGetDevCapsA';
function mixerGetDevCapsW; external mmsyst name 'mixerGetDevCapsW';
function mixerGetDevCaps; external mmsyst name 'mixerGetDevCapsA';
function mixerGetID; external mmsyst name 'mixerGetID';
function mixerGetLineControlsA; external mmsyst name 'mixerGetLineControlsA';
function mixerGetLineControlsW; external mmsyst name 'mixerGetLineControlsW';
function mixerGetLineControls; external mmsyst name 'mixerGetLineControlsA';
function mixerGetLineInfoA; external mmsyst name 'mixerGetLineInfoA';
function mixerGetLineInfoW; external mmsyst name 'mixerGetLineInfoW';
function mixerGetLineInfo; external mmsyst name 'mixerGetLineInfoA';
function mixerGetNumDevs; external mmsyst name 'mixerGetNumDevs';
function mixerMessage; external mmsyst name 'mixerMessage';
function mixerOpen; external mmsyst name 'mixerOpen';
function mixerSetControlDetails; external mmsyst name 'mixerSetControlDetails';
function mmioAdvance; external mmsyst name 'mmioAdvance';
function mmioAscend; external mmsyst name 'mmioAscend';
function mmioClose; external mmsyst name 'mmioClose';
function mmioCreateChunk; external mmsyst name 'mmioCreateChunk';
function mmioDescend; external mmsyst name 'mmioDescend';
function mmioFlush; external mmsyst name 'mmioFlush';
function mmioGetInfo; external mmsyst name 'mmioGetInfo';
function mmioInstallIOProcA; external mmsyst name 'mmioInstallIOProcA';
function mmioInstallIOProcW; external mmsyst name 'mmioInstallIOProcW';
function mmioInstallIOProc; external mmsyst name 'mmioInstallIOProcA';
function mmioOpenA; external mmsyst name 'mmioOpenA';
function mmioOpenW; external mmsyst name 'mmioOpenW';
function mmioOpen; external mmsyst name 'mmioOpenA';
function mmioRead; external mmsyst name 'mmioRead';
function mmioRenameA; external mmsyst name 'mmioRenameA';
function mmioRenameW; external mmsyst name 'mmioRenameW';
function mmioRename; external mmsyst name 'mmioRenameA';
function mmioSeek; external mmsyst name 'mmioSeek';
function mmioSendMessage; external mmsyst name 'mmioSendMessage';
function mmioSetBuffer; external mmsyst name 'mmioSetBuffer';
function mmioSetInfo; external mmsyst name 'mmioSetInfo';
function mmioStringToFOURCCA; external mmsyst name 'mmioStringToFOURCCA';
function mmioStringToFOURCCW; external mmsyst name 'mmioStringToFOURCCW';
function mmioStringToFOURCC; external mmsyst name 'mmioStringToFOURCCA';
function mmioWrite; external mmsyst name 'mmioWrite';
function mmsystemGetVersion; external mmsyst name 'mmsystemGetVersion';
function OpenDriver; external mmsyst name 'OpenDriver';
function PlaySoundA; external mmsyst name 'PlaySoundA';
function PlaySoundW; external mmsyst name 'PlaySoundW';
function PlaySound; external mmsyst name 'PlaySoundA';
function SendDriverMessage; external mmsyst name 'SendDriverMessage';
function sndPlaySoundA; external mmsyst name 'sndPlaySoundA';
function sndPlaySoundW; external mmsyst name 'sndPlaySoundW';
function sndPlaySound; external mmsyst name 'sndPlaySoundA';
function timeBeginPeriod; external mmsyst name 'timeBeginPeriod';
function timeEndPeriod; external mmsyst name 'timeEndPeriod';
function timeGetDevCaps; external mmsyst name 'timeGetDevCaps';
function timeGetSystemTime; external mmsyst name 'timeGetSystemTime';
function timeGetTime; external mmsyst name 'timeGetTime';
function timeKillEvent; external mmsyst name 'timeKillEvent';
function timeSetEvent; external mmsyst name 'timeSetEvent';
function waveInAddBuffer; external mmsyst name 'waveInAddBuffer';
function waveInClose; external mmsyst name 'waveInClose';
function waveInGetDevCapsA; external mmsyst name 'waveInGetDevCapsA';
function waveInGetDevCapsW; external mmsyst name 'waveInGetDevCapsW';
function waveInGetDevCaps; external mmsyst name 'waveInGetDevCapsA';
function waveInGetErrorTextA; external mmsyst name 'waveInGetErrorTextA';
function waveInGetErrorTextW; external mmsyst name 'waveInGetErrorTextW';
function waveInGetErrorText; external mmsyst name 'waveInGetErrorTextA';
function waveInGetID; external mmsyst name 'waveInGetID';
function waveInGetNumDevs; external mmsyst name 'waveInGetNumDevs';
function waveInGetPosition; external mmsyst name 'waveInGetPosition';
function waveInMessage; external mmsyst name 'waveInMessage';
function waveInOpen; external mmsyst name 'waveInOpen';
function waveInPrepareHeader; external mmsyst name 'waveInPrepareHeader';
function waveInReset; external mmsyst name 'waveInReset';
function waveInStart; external mmsyst name 'waveInStart';
function waveInStop; external mmsyst name 'waveInStop';
function waveInUnprepareHeader; external mmsyst name 'waveInUnprepareHeader';
function waveOutBreakLoop; external mmsyst name 'waveOutBreakLoop';
function waveOutClose; external mmsyst name 'waveOutClose';
function waveOutGetDevCapsA; external mmsyst name 'waveOutGetDevCapsA';
function waveOutGetDevCapsW; external mmsyst name 'waveOutGetDevCapsW';
function waveOutGetDevCaps; external mmsyst name 'waveOutGetDevCapsA';
function waveOutGetErrorTextA; external mmsyst name 'waveOutGetErrorTextA';
function waveOutGetErrorTextW; external mmsyst name 'waveOutGetErrorTextW';
function waveOutGetErrorText; external mmsyst name 'waveOutGetErrorTextA';
function waveOutGetID; external mmsyst name 'waveOutGetID';
function waveOutGetNumDevs; external mmsyst name 'waveOutGetNumDevs';
function waveOutGetPitch; external mmsyst name 'waveOutGetPitch';
function waveOutGetPlaybackRate; external mmsyst name 'waveOutGetPlaybackRate';
function waveOutGetPosition; external mmsyst name 'waveOutGetPosition';
function waveOutGetVolume; external mmsyst name 'waveOutGetVolume';
function waveOutMessage; external mmsyst name 'waveOutMessage';
function waveOutOpen; external mmsyst name 'waveOutOpen';
function waveOutPause; external mmsyst name 'waveOutPause';
function waveOutPrepareHeader; external mmsyst name 'waveOutPrepareHeader';
function waveOutReset; external mmsyst name 'waveOutReset';
function waveOutRestart; external mmsyst name 'waveOutRestart';
function waveOutSetPitch; external mmsyst name 'waveOutSetPitch';
function waveOutSetPlaybackRate; external mmsyst name 'waveOutSetPlaybackRate';
function waveOutSetVolume; external mmsyst name 'waveOutSetVolume';
function waveOutUnprepareHeader; external mmsyst name 'waveOutUnprepareHeader';
function waveOutWrite; external mmsyst name 'waveOutWrite';
 
function mci_MSF_Minute(msf: Longint): Byte;
begin
Result := LoByte(LoWord(msf));
end;
 
function mci_MSF_Second(msf: Longint): Byte;
begin
Result := HiByte(LoWord(msf));
end;
 
function mci_MSF_Frame(msf: Longint): Byte;
begin
Result := LoByte(HiWord(msf));
end;
 
function mci_Make_MSF(m, s, f: Byte): Longint;
begin
Result := Longint(m or (s shl 8) or (f shl 16));
end;
 
function mci_TMSF_Track(tmsf: Longint): Byte;
begin
Result := LoByte(LoWord(tmsf));
end;
 
function mci_TMSF_Minute(tmsf: Longint): Byte;
begin
Result := HiByte(LoWord(tmsf));
end;
 
function mci_TMSF_Second(tmsf: Longint): Byte;
begin
Result := LoByte(HiWord(tmsf));
end;
 
function mci_TMSF_Frame(tmsf: Longint): Byte;
begin
Result := HiByte(HiWord(tmsf));
end;
 
function mci_Make_TMSF(t, m, s, f: Byte): Longint;
begin
Result := Longint(t or (m shl 8) or (s shl 16) or (f shl 24));
end;
 
function mci_HMS_Hour(hms: Longint): Byte;
begin
Result := LoByte(LoWord(hms));
end;
 
function mci_HMS_Minute(hms: Longint): Byte;
begin
Result := HiByte(LoWord(hms));
end;
 
function mci_HMS_Second(hms: Longint): Byte;
begin
Result := LoByte(HiWord(hms));
end;
 
function mci_Make_HMS(h, m, s: Byte): Longint;
begin
Result := Longint(h or (m shl 8) or (s shl 16));
end;
 
function DIBIndex(N: Integer): Longint;
begin
Result := MakeLong(N, $10FF);
end;
 
end.
/trunk/WindowsXP.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/clean.bat
0,0 → 1,8
@echo off
del *.~*
del *.dcu
del *.local
del *.identcache
 
del VCL_WAVECONTROL\*.~*
del VCL_WAVECONTROL\*.dcu