mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 09:28:48 +02:00
* fix external (patch from Tomas)
This commit is contained in:
parent
8cf8c54609
commit
ffc095ee05
@ -1,3 +1,6 @@
|
||||
{
|
||||
$Id$
|
||||
}
|
||||
{*********************************} (*********************************)
|
||||
{ Generated by c2pas32 v0.9b } (* Fixed by P.V.Ozerski *)
|
||||
{ (c) 2001 Oleg Bulychov } (* Original C header file *)
|
||||
@ -7,6 +10,7 @@
|
||||
(*********************************)
|
||||
unit mmsystem;
|
||||
{$smartlink on}
|
||||
{$MODE DELPHI}
|
||||
interface
|
||||
uses
|
||||
windows;
|
||||
@ -2149,8 +2153,8 @@ Type // Delphi compatibility
|
||||
TMMCKInfo = _MMCKINFO;
|
||||
pcmwaveformat_tag = PCMWAVEFORMAT;
|
||||
TPCMWaveFormat = pcmwaveformat_tag;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(*////////////////////////////////////////////////////////*)
|
||||
(* Function prototypes*)
|
||||
@ -2771,81 +2775,79 @@ function MEVT_EVENTPARM(x: DWORD): DWORD;
|
||||
MEVT_EVENTPARM := x and $00FFFFFF;
|
||||
end;
|
||||
|
||||
type
|
||||
TFourBytes = packed array [0..3] of byte;
|
||||
|
||||
function MCI_MSF_MINUTE(msf: longint): byte;
|
||||
[public, alias: 'Mci_msf_minute'];
|
||||
var
|
||||
b:byte absolute msf;
|
||||
begin
|
||||
MCI_MSF_MINUTE := b;
|
||||
MCI_MSF_MINUTE := TFourBytes (msf) [0];
|
||||
end;
|
||||
|
||||
function MCI_TMSF_TRACK(tmsf: longint): byte;
|
||||
external name 'Mci_msf_minute';
|
||||
begin
|
||||
MCI_TMSF_TRACK := TFourBytes (tmsf) [0];
|
||||
end;
|
||||
|
||||
function MCI_HMS_HOUR(h: longint): byte;
|
||||
external name 'Mci_msf_minute';
|
||||
begin
|
||||
MCI_HMS_HOUR := TFourBytes (h) [0];
|
||||
end;
|
||||
|
||||
function MCI_MSF_SECOND(msf: longint): byte;
|
||||
[public, alias: 'Mci_msf_second'];
|
||||
var
|
||||
b: array[0..1]of byte absolute msf;
|
||||
begin
|
||||
MCI_MSF_SECOND := b[1];
|
||||
MCI_MSF_SECOND := TFourBytes (msf) [1];
|
||||
end;
|
||||
|
||||
function MCI_TMSF_MINUTE(tmsf: longint): byte;
|
||||
external name 'Mci_msf_second';
|
||||
begin
|
||||
MCI_TMSF_MINUTE := TFourBytes (tmsf) [1];
|
||||
end;
|
||||
|
||||
function MCI_HMS_MINUTE(h: longint): byte;
|
||||
external name 'Mci_msf_second';
|
||||
begin
|
||||
MCI_HMS_MINUTE := TFourBytes (h) [1];
|
||||
end;
|
||||
|
||||
function MCI_MSF_FRAME(msf: longint): byte;
|
||||
[public, alias: 'Mci_msf_frame'];
|
||||
var
|
||||
b: array[0..2]of byte absolute msf;
|
||||
begin
|
||||
MCI_MSF_FRAME := b[2];
|
||||
MCI_MSF_FRAME := TFourBytes (msf) [2];
|
||||
end;
|
||||
|
||||
function MCI_TMSF_SECOND(tmsf: longint): byte;
|
||||
external name 'Mci_msf_frame';
|
||||
begin
|
||||
MCI_TMSF_SECOND := TFourBytes (tmsf) [2];
|
||||
end;
|
||||
|
||||
function MCI_HMS_SECOND(h: longint): byte;
|
||||
external name 'Mci_msf_frame';
|
||||
begin
|
||||
MCI_HMS_SECOND := TFourBytes (h) [2];
|
||||
end;
|
||||
|
||||
function MCI_MAKE_MSF(m, s, f: byte): longint;
|
||||
[public, alias: 'Mci_make_msf'];
|
||||
const
|
||||
b: array[0..3]of byte=(0,0,0,0);
|
||||
var
|
||||
l: longint absolute b;
|
||||
begin
|
||||
b[0] := m;
|
||||
b[1] := s;
|
||||
b[2] := f;
|
||||
MCI_MAKE_MSF := l;
|
||||
TFourBytes (Result) [0] := m;
|
||||
TFourBytes (Result) [1] := s;
|
||||
TFourBytes (Result) [2] := f;
|
||||
end;
|
||||
|
||||
function MCI_MAKE_HMS(h, m, s: byte): longint;
|
||||
external name 'Mci_make_msf';
|
||||
begin
|
||||
TFourBytes (Result) [0] := h;
|
||||
TFourBytes (Result) [1] := m;
|
||||
TFourBytes (Result) [2] := s;
|
||||
end;
|
||||
|
||||
function MCI_TMSF_FRAME(tmsf: longint): byte;
|
||||
var
|
||||
b: array[0..3]of byte absolute tmsf;
|
||||
begin
|
||||
MCI_TMSF_FRAME := b[3];
|
||||
MCI_TMSF_FRAME := TFourBytes (tmsf) [3];
|
||||
end;
|
||||
|
||||
function mci_Make_TMSF(t, m, s, f: Byte): Longint;
|
||||
var
|
||||
b: array[0..3]of byte;
|
||||
l: longint absolute b;
|
||||
begin
|
||||
b[0] := t;
|
||||
b[1] := m;
|
||||
b[2] := s;
|
||||
b[3] := f;
|
||||
mci_Make_TMSF := l;
|
||||
TFourBytes (Result) [0] := t;
|
||||
TFourBytes (Result) [1] := m;
|
||||
TFourBytes (Result) [2] := s;
|
||||
TFourBytes (Result) [3] := f;
|
||||
end;
|
||||
|
||||
function DIBINDEX(n: longint): longint;
|
||||
@ -2854,3 +2856,10 @@ function DIBINDEX(n: longint): longint;
|
||||
end;
|
||||
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2004-11-22 22:09:12 peter
|
||||
* fix external (patch from Tomas)
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user