Browse Source

* mmtk directory corrected to lowercase

Tomas Hajny 22 years ago
parent
commit
302a815e70

+ 0 - 1369
packages/extra/os2units/mmtk/Makefile

@@ -1,1369 +0,0 @@
-#
-# Don't edit, this file is generated by FPCMake Version 1.1 [2002/12/27]
-#
-default: all
-MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
-override PATH:=$(subst \,/,$(PATH))
-ifeq ($(findstring ;,$(PATH)),)
-inUnix=1
-SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
-else
-SEARCHPATH:=$(subst ;, ,$(PATH))
-endif
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
-ifeq ($(PWD),)
-$(error You need the GNU utils package to use this Makefile)
-else
-PWD:=$(firstword $(PWD))
-SRCEXEEXT=
-endif
-else
-PWD:=$(firstword $(PWD))
-SRCEXEEXT=.exe
-endif
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-else
-ifneq ($(findstring cygwin,$(MACHTYPE)),)
-inCygWin=1
-endif
-endif
-ifeq ($(OS_TARGET),freebsd)
-BSDhier=1
-endif
-ifeq ($(OS_TARGET),netbsd)
-BSDhier=1
-endif
-ifeq ($(OS_TARGET),openbsd)
-BSDhier=1
-endif
-ifdef inUnix
-BATCHEXT=.sh
-else
-ifdef inOS2
-BATCHEXT=.cmd
-else
-BATCHEXT=.bat
-endif
-endif
-ifdef inUnix
-PATHSEP=/
-else
-PATHSEP:=$(subst /,\,/)
-ifdef inCygWin
-PATHSEP=/
-endif
-endif
-ifdef PWD
-BASEDIR:=$(subst \,/,$(shell $(PWD)))
-ifdef inCygWin
-ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
-BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
-BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
-BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
-endif
-endif
-else
-BASEDIR=.
-endif
-ifdef inOS2
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO=echo
-else
-ECHO:=$(firstword $(ECHO))
-endif
-else
-ECHO:=$(firstword $(ECHO))
-endif
-endif
-export ECHO
-endif
-override DEFAULT_FPCDIR=../../../..
-ifndef FPC
-ifdef PP
-FPC=$(PP)
-endif
-endif
-ifndef FPC
-FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
-ifneq ($(FPCPROG),)
-FPCPROG:=$(firstword $(FPCPROG))
-FPC:=$(shell $(FPCPROG) -PB)
-ifneq ($(findstring Error,$(FPC)),)
-override FPC=ppc386
-endif
-else
-override FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-export FPC FPC_VERSION
-unexport CHECKDEPEND ALLDEPENDENCIES
-ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
-COMPILERINFO:=$(shell $(FPC) -iSP -iTP -iSO -iTO)
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(word 1,$(COMPILERINFO))
-endif
-ifndef CPU_TARGET
-CPU_TARGET:=$(word 2,$(COMPILERINFO))
-endif
-ifndef OS_SOURCE
-OS_SOURCE:=$(word 3,$(COMPILERINFO))
-endif
-ifndef OS_TARGET
-OS_TARGET:=$(word 4,$(COMPILERINFO))
-endif
-else
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-endif
-ifndef CPU_TARGET
-ifdef CPU_TARGET_DEFAULT
-CPU_TARGET=$(CPU_TARGET_DEFAULT)
-endif
-endif
-ifndef OS_TARGET
-ifdef OS_TARGET_DEFAULT
-OS_TARGET=$(OS_TARGET_DEFAULT)
-endif
-endif
-FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
-FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
-ifneq ($(FULL_TARGET),$(FULL_SOURCE))
-CROSSCOMPILE=1
-endif
-ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
-ifeq ($(findstring $(OS_TARGET),$(MAKEFILETARGETS)),)
-$(error The Makefile doesn't support target $(OS_TARGET), please run fpcmake first)
-endif
-endif
-export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE CROSSCOMPILE
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
-override FPCDIR=wrong
-endif
-else
-override FPCDIR=wrong
-endif
-ifdef DEFAULT_FPCDIR
-ifeq ($(FPCDIR),wrong)
-override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
-ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
-override FPCDIR=wrong
-endif
-endif
-endif
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-ifndef CROSSDIR
-CROSSDIR:=$(FPCDIR)/cross/$(FULL_TARGET)
-endif
-ifndef CROSSTARGETDIR
-CROSSTARGETDIR=$(CROSSDIR)/$(FULL_TARGET)
-endif
-ifdef CROSSCOMPILE
-UNITSDIR:=$(wildcard $(CROSSTARGETDIR)/units)
-ifeq ($(UNITSDIR),)
-UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
-endif
-else
-UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
-endif
-PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
-override PACKAGE_NAME=mmtk
-override PACKAGE_VERSION=1.0.6
-override TARGET_UNITS+=mmbase sw dive mci mciapi mcidrv mmio
-override TARGET_EXAMPLEDIRS+=tests
-override INSTALL_FPCPACKAGE=y
-ifdef REQUIRE_UNITSDIR
-override UNITSDIR+=$(REQUIRE_UNITSDIR)
-endif
-ifdef REQUIRE_PACKAGESDIR
-override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
-endif
-ifdef ZIPINSTALL
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),netbsd)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),openbsd)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),sunos)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),qnx)
-UNIXINSTALLDIR=1
-endif
-else
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),netbsd)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),openbsd)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),sunos)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),qnx)
-UNIXINSTALLDIR=1
-endif
-endif
-ifndef INSTALL_PREFIX
-ifdef PREFIX
-INSTALL_PREFIX=$(PREFIX)
-endif
-endif
-ifndef INSTALL_PREFIX
-ifdef UNIXINSTALLDIR
-INSTALL_PREFIX=/usr/local
-else
-ifdef INSTALL_FPCPACKAGE
-INSTALL_BASEDIR:=/pp
-else
-INSTALL_BASEDIR:=/$(PACKAGE_NAME)
-endif
-endif
-endif
-export INSTALL_PREFIX
-ifdef INSTALL_FPCSUBDIR
-export INSTALL_FPCSUBDIR
-endif
-ifndef DIST_DESTDIR
-DIST_DESTDIR:=$(BASEDIR)
-endif
-export DIST_DESTDIR
-ifndef INSTALL_BASEDIR
-ifdef UNIXINSTALLDIR
-ifdef INSTALL_FPCPACKAGE
-INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
-else
-INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
-endif
-else
-INSTALL_BASEDIR:=$(INSTALL_PREFIX)
-endif
-endif
-ifndef INSTALL_BINDIR
-ifdef UNIXINSTALLDIR
-INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
-else
-INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
-ifdef INSTALL_FPCPACKAGE
-INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(OS_TARGET)
-endif
-endif
-endif
-ifndef INSTALL_UNITDIR
-ifdef CROSSCOMPILE
-INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/units
-else
-INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(OS_TARGET)
-endif
-ifdef INSTALL_FPCPACKAGE
-ifdef PACKAGE_NAME
-INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
-endif
-endif
-endif
-ifndef INSTALL_LIBDIR
-ifdef UNIXINSTALLDIR
-INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
-else
-INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
-endif
-endif
-ifndef INSTALL_SOURCEDIR
-ifdef UNIXINSTALLDIR
-ifdef BSDhier
-SRCPREFIXDIR=share/src
-else
-SRCPREFIXDIR=src
-endif
-ifdef INSTALL_FPCPACKAGE
-ifdef INSTALL_FPCSUBDIR
-INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
-else
-INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
-endif
-else
-INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
-endif
-else
-ifdef INSTALL_FPCPACKAGE
-ifdef INSTALL_FPCSUBDIR
-INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
-else
-INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
-endif
-else
-INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
-endif
-endif
-endif
-ifndef INSTALL_DOCDIR
-ifdef UNIXINSTALLDIR
-ifdef BSDhier
-DOCPREFIXDIR=share/doc
-else
-DOCPREFIXDIR=doc
-endif
-ifdef INSTALL_FPCPACKAGE
-INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
-else
-INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
-endif
-else
-ifdef INSTALL_FPCPACKAGE
-INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
-else
-INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
-endif
-endif
-endif
-ifndef INSTALL_EXAMPLEDIR
-ifdef UNIXINSTALLDIR
-ifdef INSTALL_FPCPACKAGE
-ifdef BSDhier
-INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
-else
-INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
-endif
-else
-ifdef BSDhier
-INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
-else
-INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
-endif
-endif
-else
-ifdef INSTALL_FPCPACKAGE
-INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
-else
-INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
-endif
-endif
-endif
-ifndef INSTALL_DATADIR
-INSTALL_DATADIR=$(INSTALL_BASEDIR)
-endif
-ifdef CROSSCOMPILE
-ifndef CROSSBINDIR
-CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(FULL_SOURCE))
-ifeq ($(CROSSBINDIR),)
-CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(FULL_TARGET)/bin/$(FULL_SOURCE))
-endif
-endif
-else
-CROSSBINDIR=
-endif
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-STATICLIBPREFIX=libp
-RSTEXT=.rst
-FPCMADE=fpcmade
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-STATICLIBPREFIX=
-FPCMADE=fpcmade.v1
-PACKAGESUFFIX=v1
-endif
-ifeq ($(OS_TARGET),go32v2)
-STATICLIBPREFIX=
-FPCMADE=fpcmade.dos
-ZIPSUFFIX=go32
-endif
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-ZIPSUFFIX=linux
-endif
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-ZIPSUFFIX=freebsd
-endif
-ifeq ($(OS_TARGET),netbsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.netbsd
-ZIPSUFFIX=netbsd
-endif
-ifeq ($(OS_TARGET),openbsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.openbsd
-ZIPSUFFIX=openbsd
-endif
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-ZIPSUFFIX=w32
-endif
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-AOUTEXT=.out
-SMARTEXT=.sl2
-STATICLIBPREFIX=
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-ZIPSUFFIX=emx
-ECHO=echo
-endif
-ifeq ($(OS_TARGET),amiga)
-EXEEXT=
-PPUEXT=.ppu
-ASMEXT=.asm
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.library
-FPCMADE=fpcmade.amg
-endif
-ifeq ($(OS_TARGET),atari)
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=.ttp
-FPCMADE=fpcmade.ata
-endif
-ifeq ($(OS_TARGET),beos)
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-FPCMADE=fpcmade.be
-ZIPSUFFIX=be
-endif
-ifeq ($(OS_TARGET),sunos)
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-FPCMADE=fpcmade.sun
-ZIPSUFFIX=sun
-endif
-ifeq ($(OS_TARGET),qnx)
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-FPCMADE=fpcmade.qnx
-ZIPSUFFIX=qnx
-endif
-ifeq ($(OS_TARGET),netware)
-STATICLIBPREFIX=
-PPUEXT=.ppn
-OEXT=.on
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.nlm
-FPCMADE=fpcmade.nw
-ZIPSUFFIX=nw
-EXEEXT=.nlm
-endif
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO=
-else
-ECHO:=$(firstword $(ECHO))
-endif
-else
-ECHO:=$(firstword $(ECHO))
-endif
-endif
-export ECHO
-ifndef DATE
-DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(DATE),)
-DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(DATE),)
-DATE=
-else
-DATE:=$(firstword $(DATE))
-endif
-else
-DATE:=$(firstword $(DATE))
-endif
-endif
-export DATE
-ifndef GINSTALL
-GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(GINSTALL),)
-GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(GINSTALL),)
-GINSTALL=
-else
-GINSTALL:=$(firstword $(GINSTALL))
-endif
-else
-GINSTALL:=$(firstword $(GINSTALL))
-endif
-endif
-export GINSTALL
-ifndef CPPROG
-CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(CPPROG),)
-CPPROG=
-else
-CPPROG:=$(firstword $(CPPROG))
-endif
-endif
-export CPPROG
-ifndef RMPROG
-RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(RMPROG),)
-RMPROG=
-else
-RMPROG:=$(firstword $(RMPROG))
-endif
-endif
-export RMPROG
-ifndef MVPROG
-MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(MVPROG),)
-MVPROG=
-else
-MVPROG:=$(firstword $(MVPROG))
-endif
-endif
-export MVPROG
-ifndef ECHOREDIR
-ECHOREDIR:=$(subst /,$(PATHSEP),$(ECHO))
-endif
-ifndef COPY
-COPY:=$(CPPROG) -fp
-endif
-ifndef COPYTREE
-COPYTREE:=$(CPPROG) -rfp
-endif
-ifndef MOVE
-MOVE:=$(MVPROG) -f
-endif
-ifndef DEL
-DEL:=$(RMPROG) -f
-endif
-ifndef DELTREE
-DELTREE:=$(RMPROG) -rf
-endif
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=$(GINSTALL) -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=$(GINSTALL) -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-ifndef MKDIR
-MKDIR:=$(GINSTALL) -m 755 -d
-endif
-export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-ifndef FPCMAKE
-FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(FPCMAKE),)
-FPCMAKE=
-else
-FPCMAKE:=$(firstword $(FPCMAKE))
-endif
-endif
-export FPCMAKE
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-ASNAME=as
-LDNAME=ld
-ARNAME=ar
-RCNAME=rc
-ifeq ($(OS_TARGET),win32)
-ASNAME=asw
-LDNAME=ldw
-ARNAME=arw
-endif
-ifndef ASPROG
-ifdef CROSSBINDIR
-ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
-else
-ASPROG=$(ASNAME)
-endif
-endif
-ifndef LDPROG
-ifdef CROSSBINDIR
-LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
-else
-LDPROG=$(LDNAME)
-endif
-endif
-ifndef RCPROG
-ifdef CROSSBINDIR
-RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
-else
-RCPROG=$(RCNAME)
-endif
-endif
-ifndef ARPROG
-ifdef CROSSBINDIR
-ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
-else
-ARPROG=$(ARNAME)
-endif
-endif
-AS=$(ASPROG)
-LD=$(LDPROG)
-RC=$(RCPROG)
-AR=$(ARPROG)
-PPAS=ppas$(BATCHEXT)
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-ifdef DATE
-DATESTR:=$(shell $(DATE) +%Y%m%d)
-else
-DATESTR=
-endif
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-ZIPOPT=-9
-ZIPEXT=.zip
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-override REQUIRE_PACKAGES=rtl 
-ifeq ($(OS_TARGET),linux)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),go32v2)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),win32)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),os2)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),beos)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),netbsd)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),amiga)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),atari)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),sunos)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),qnx)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),netware)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),openbsd)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifeq ($(OS_TARGET),wdosx)
-REQUIRE_PACKAGES_RTL=1
-endif
-ifdef REQUIRE_PACKAGES_RTL
-PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_RTL),)
-ifneq ($(wildcard $(PACKAGEDIR_RTL)/$(OS_TARGET)),)
-UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
-else
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_RTL)/$(FPCMADE):
-	$(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_RTL=
-UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_RTL),)
-UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override COMPILER_UNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifndef NOCPUDEF
-override FPCOPTDEF=$(CPU_TARGET)
-endif
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-ifeq ($(OS_SOURCE),openbsd)
-override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
-endif
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-ifdef DEBUG
-override FPCOPT+=-gl
-override FPCOPTDEF+=DEBUG
-endif
-ifdef RELEASE
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-else
-FPCCPUOPT:=
-endif
-override FPCOPT+=-Xs $(FPCCPUOPT) -n
-override FPCOPTDEF+=RELEASE
-endif
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-ifdef OPTIMIZE
-ifeq ($(CPU_TARGET),i386)
-override FPCOPT+=-OG2p3
-endif
-endif
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-ifdef COMPILER_OPTIONS
-override FPCOPT+=$(COMPILER_OPTIONS)
-endif
-ifdef COMPILER_UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
-endif
-ifdef COMPILER_LIBRARYDIR
-override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
-endif
-ifdef COMPILER_OBJECTDIR
-override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
-endif
-ifdef COMPILER_INCLUDEDIR
-override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
-endif
-ifdef CROSSBINDIR
-override FPCOPT+=-FD$(CROSSBINDIR)
-endif
-ifdef COMPILER_TARGETDIR
-override FPCOPT+=-FE$(COMPILER_TARGETDIR)
-ifeq ($(COMPILER_TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
-endif
-endif
-ifdef COMPILER_UNITTARGETDIR
-override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
-ifeq ($(COMPILER_UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
-endif
-else
-ifdef COMPILER_TARGETDIR
-override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-ifdef FPCOPTDEF
-override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
-endif
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-ifdef USEENV
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-override COMPILER:=$(FPC) $(FPCOPT)
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-.PHONY: fpc_units
-ifdef TARGET_UNITS
-override ALLTARGET+=fpc_units
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
-override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
-override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
-endif
-fpc_units: $(UNITPPUFILES)
-ifdef TARGET_RSTS
-override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
-override CLEANRSTFILES+=$(RSTFILES)
-endif
-.PHONY: fpc_examples
-ifdef TARGET_EXAMPLES
-HASEXAMPLES=1
-override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)))
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES)))
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-ifeq ($(OS_TARGET),os2)
-override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
-endif
-endif
-ifdef TARGET_EXAMPLEDIRS
-HASEXAMPLES=1
-endif
-fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS))
-.PHONY: fpc_all fpc_smart fpc_debug fpc_release
-$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
-	@$(ECHOREDIR) Compiled > $(FPCMADE)
-fpc_all: $(FPCMADE)
-fpc_smart:
-	$(MAKE) all LINKSMART=1 CREATESMART=1
-fpc_debug:
-	$(MAKE) all DEBUG=1
-fpc_release:
-	$(MAKE) all RELEASE=1
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp .rc .res
-%$(PPUEXT): %.pp
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(PPUEXT): %.pas
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(EXEEXT): %.pp
-	$(COMPILER) $<
-	$(EXECPPAS)
-%$(EXEEXT): %.pas
-	$(COMPILER) $<
-	$(EXECPPAS)
-%.res: %.rc
-	windres -i $< -o $@
-vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
-vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
-vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
-.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
-ifdef INSTALL_UNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
-endif
-ifdef INSTALL_BUILDUNIT
-override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
-endif
-ifdef INSTALLPPUFILES
-override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)))
-override INSTALL_CREATEPACKAGEFPC=1
-endif
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-fpc_install: all $(INSTALLTARGET)
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(INSTALL_BINDIR)
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
-endif
-ifdef INSTALL_CREATEPACKAGEFPC
-ifdef FPCMAKE
-ifdef PACKAGE_VERSION
-ifneq ($(wildcard Makefile.fpc),)
-	$(FPCMAKE) -p -T$(OS_TARGET) Makefile.fpc
-	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
-endif
-endif
-endif
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(INSTALL_UNITDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
-endif
-ifneq ($(wildcard $(LIB_FULLNAME)),)
-	$(MKDIR) $(INSTALL_LIBDIR)
-	$(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
-ifdef inUnix
-	ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
-endif
-endif
-endif
-ifdef INSTALL_FILES
-	$(MKDIR) $(INSTALL_DATADIR)
-	$(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
-endif
-fpc_sourceinstall: distclean
-	$(MKDIR) $(INSTALL_SOURCEDIR)
-	$(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
-fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
-ifdef HASEXAMPLES
-	$(MKDIR) $(INSTALL_EXAMPLEDIR)
-endif
-ifdef EXAMPLESOURCEFILES
-	$(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
-endif
-ifdef TARGET_EXAMPLEDIRS
-	$(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
-endif
-.PHONY: fpc_distinstall
-fpc_distinstall: install exampleinstall
-.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/../fpc-pack
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-ifndef ZIPNAME
-ifdef DIST_ZIPNAME
-ZIPNAME=$(DIST_ZIPNAME)
-else
-ZIPNAME=$(ZIPPREFIX)$(PACKAGE_NAME)$(ZIPSUFFIX)
-endif
-endif
-ifndef ZIPTARGET
-ifdef DIST_ZIPTARGET
-ZIPTARGET=DIST_ZIPTARGET
-else
-ZIPTARGET=install
-endif
-endif
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-ifndef inUnix
-USEZIPWRAPPER=1
-endif
-ifdef USEZIPWRAPPER
-ZIPPATHSEP=$(PATHSEP)
-ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(BATCHEXT))
-else
-ZIPPATHSEP=/
-endif
-ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
-ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
-ifdef USETAR
-ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(TAREXT)
-ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
-else
-ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(ZIPEXT)
-ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
-endif
-fpc_zipinstall:
-	$(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
-	$(MKDIR) $(DIST_DESTDIR)
-	$(DEL) $(ZIPDESTFILE)
-ifdef USEZIPWRAPPER
-ifneq ($(ECHOREDIR),echo)
-	$(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
-	$(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
-	$(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
-else
-	echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
-	echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
-	echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
-endif
-ifdef inUnix
-	/bin/sh $(ZIPWRAPPER)
-else
-	$(ZIPWRAPPER)
-endif
-	$(DEL) $(ZIPWRAPPER)
-else
-	$(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
-endif
-	$(DELTREE) $(PACKDIR)
-fpc_zipsourceinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=src
-fpc_zipexampleinstall:
-ifdef HASEXAMPLES
-	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=exm
-endif
-fpc_zipdistinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=distinstall
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-ifdef CLEAN_UNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
-endif
-ifdef CLEANPPUFILES
-override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
-endif
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
-	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef CLEAN_FILES
-	-$(DEL) $(CLEAN_FILES)
-endif
-ifdef LIB_NAME
-	-$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
-endif
-	-$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
-fpc_distclean: clean
-ifdef COMPILER_UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
-ifdef AOUTEXT
-	-$(DEL) *$(AOUTEXT)
-endif
-.PHONY: fpc_baseinfo
-override INFORULES+=fpc_baseinfo
-fpc_baseinfo:
-	@$(ECHO)
-	@$(ECHO)  == Package info ==
-	@$(ECHO)  Package Name..... $(PACKAGE_NAME)
-	@$(ECHO)  Package Version.. $(PACKAGE_VERSION)
-	@$(ECHO)
-	@$(ECHO)  == Configuration info ==
-	@$(ECHO)
-	@$(ECHO)  FPC.......... $(FPC)
-	@$(ECHO)  FPC Version.. $(FPC_VERSION)
-	@$(ECHO)  Source CPU... $(CPU_SOURCE)
-	@$(ECHO)  Target CPU... $(CPU_TARGET)
-	@$(ECHO)  Source OS.... $(OS_SOURCE)
-	@$(ECHO)  Target OS.... $(OS_TARGET)
-	@$(ECHO)  Full Source.. $(FULL_SOURCE)
-	@$(ECHO)  Full Target.. $(FULL_TARGET)
-	@$(ECHO)
-	@$(ECHO)  == Directory info ==
-	@$(ECHO)
-	@$(ECHO)  Required pkgs... $(REQUIRE_PACKAGES)
-	@$(ECHO)
-	@$(ECHO)  Basedir......... $(BASEDIR)
-	@$(ECHO)  FPCDir.......... $(FPCDIR)
-	@$(ECHO)  CrossBinDir..... $(CROSSBINDIR)
-	@$(ECHO)  UnitsDir........ $(UNITSDIR)
-	@$(ECHO)  PackagesDir..... $(PACKAGESDIR)
-	@$(ECHO)
-	@$(ECHO)  GCC library..... $(GCCLIBDIR)
-	@$(ECHO)  Other library... $(OTHERLIBDIR)
-	@$(ECHO)
-	@$(ECHO)  == Tools info ==
-	@$(ECHO)
-	@$(ECHO)  As........ $(AS)
-	@$(ECHO)  Ld........ $(LD)
-	@$(ECHO)  Ar........ $(AR)
-	@$(ECHO)  Rc........ $(RC)
-	@$(ECHO)
-	@$(ECHO)  Mv........ $(MVPROG)
-	@$(ECHO)  Cp........ $(CPPROG)
-	@$(ECHO)  Rm........ $(RMPROG)
-	@$(ECHO)  GInstall.. $(GINSTALL)
-	@$(ECHO)  Echo...... $(ECHO)
-	@$(ECHO)  Shell..... $(SHELL)
-	@$(ECHO)  Date...... $(DATE)
-	@$(ECHO)  FPCMake... $(FPCMAKE)
-	@$(ECHO)  PPUMove... $(PPUMOVE)
-	@$(ECHO)  Upx....... $(UPXPROG)
-	@$(ECHO)  Zip....... $(ZIPPROG)
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  Target Loaders........ $(TARGET_LOADERS)
-	@$(ECHO)  Target Units.......... $(TARGET_UNITS)
-	@$(ECHO)  Target Implicit Units. $(TARGET_IMPLICITUNITS)
-	@$(ECHO)  Target Programs....... $(TARGET_PROGRAMS)
-	@$(ECHO)  Target Dirs........... $(TARGET_DIRS)
-	@$(ECHO)  Target Examples....... $(TARGET_EXAMPLES)
-	@$(ECHO)  Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
-	@$(ECHO)
-	@$(ECHO)  Clean Units......... $(CLEAN_UNITS)
-	@$(ECHO)  Clean Files......... $(CLEAN_FILES)
-	@$(ECHO)
-	@$(ECHO)  Install Units....... $(INSTALL_UNITS)
-	@$(ECHO)  Install Files....... $(INSTALL_FILES)
-	@$(ECHO)
-	@$(ECHO)  == Install info ==
-	@$(ECHO)
-	@$(ECHO)  DateStr.............. $(DATESTR)
-	@$(ECHO)  ZipPrefix............ $(ZIPPREFIX)
-	@$(ECHO)  ZipSuffix............ $(ZIPSUFFIX)
-	@$(ECHO)  Install FPC Package.. $(INSTALL_FPCPACKAGE)
-	@$(ECHO)
-	@$(ECHO)  Install base dir..... $(INSTALL_BASEDIR)
-	@$(ECHO)  Install binary dir... $(INSTALL_BINDIR)
-	@$(ECHO)  Install library dir.. $(INSTALL_LIBDIR)
-	@$(ECHO)  Install units dir.... $(INSTALL_UNITDIR)
-	@$(ECHO)  Install source dir... $(INSTALL_SOURCEDIR)
-	@$(ECHO)  Install doc dir...... $(INSTALL_DOCDIR)
-	@$(ECHO)  Install example dir.. $(INSTALL_EXAMPLEDIR)
-	@$(ECHO)  Install data dir..... $(INSTALL_DATADIR)
-	@$(ECHO)
-	@$(ECHO)  Dist destination dir. $(DIST_DESTDIR)
-	@$(ECHO)  Dist zip name........ $(DIST_ZIPNAME)
-	@$(ECHO)
-.PHONY: fpc_info
-fpc_info: $(INFORULES)
-.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
-	fpc_makefile_dirs
-fpc_makefile:
-	$(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
-fpc_makefile_sub1:
-ifdef TARGET_DIRS
-	$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
-endif
-ifdef TARGET_EXAMPLEDIRS
-	$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
-endif
-fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
-fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
-fpc_makefiles: fpc_makefile fpc_makefile_dirs
-TARGET_EXAMPLEDIRS_TESTS=1
-ifdef TARGET_EXAMPLEDIRS_TESTS
-tests_all:
-	$(MAKE) -C tests all
-tests_debug:
-	$(MAKE) -C tests debug
-tests_smart:
-	$(MAKE) -C tests smart
-tests_release:
-	$(MAKE) -C tests release
-tests_examples:
-	$(MAKE) -C tests examples
-tests_shared:
-	$(MAKE) -C tests shared
-tests_install:
-	$(MAKE) -C tests install
-tests_sourceinstall:
-	$(MAKE) -C tests sourceinstall
-tests_exampleinstall:
-	$(MAKE) -C tests exampleinstall
-tests_distinstall:
-	$(MAKE) -C tests distinstall
-tests_zipinstall:
-	$(MAKE) -C tests zipinstall
-tests_zipsourceinstall:
-	$(MAKE) -C tests zipsourceinstall
-tests_zipexampleinstall:
-	$(MAKE) -C tests zipexampleinstall
-tests_zipdistinstall:
-	$(MAKE) -C tests zipdistinstall
-tests_clean:
-	$(MAKE) -C tests clean
-tests_distclean:
-	$(MAKE) -C tests distclean
-tests_cleanall:
-	$(MAKE) -C tests cleanall
-tests_info:
-	$(MAKE) -C tests info
-tests_makefiles:
-	$(MAKE) -C tests makefiles
-tests:
-	$(MAKE) -C tests all
-.PHONY: tests_all tests_debug tests_smart tests_release tests_examples tests_shared tests_install tests_sourceinstall tests_exampleinstall tests_distinstall tests_zipinstall tests_zipsourceinstall tests_zipexampleinstall tests_zipdistinstall tests_clean tests_distclean tests_cleanall tests_info tests_makefiles tests
-endif
-all: fpc_all
-debug: fpc_debug
-smart: fpc_smart
-release: fpc_release
-examples: fpc_examples
-shared:
-install: fpc_install
-sourceinstall: fpc_sourceinstall
-exampleinstall: fpc_exampleinstall
-distinstall: fpc_distinstall
-zipinstall: fpc_zipinstall
-zipsourceinstall: fpc_zipsourceinstall
-zipexampleinstall: fpc_zipexampleinstall
-zipdistinstall: fpc_zipdistinstall
-clean: fpc_clean $(addsuffix _clean,$(TARGET_EXAMPLEDIRS))
-distclean: fpc_distclean
-cleanall: fpc_cleanall
-info: fpc_info
-makefiles: fpc_makefiles
-.PHONY: all debug smart release examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-dive$(PPUEXT) : dive.pas mmbase$(PPUEXT)
-mci$(PPUEXT) : mci.pas mmbase$(PPUEXT)
-mmio$(PPUEXT) : mmio.pas mmbase$(PPUEXT)

+ 0 - 25
packages/extra/os2units/mmtk/Makefile.fpc

@@ -1,25 +0,0 @@
-#
-#   Makefile.fpc for the Multimedia Toolkit (interface units for MMPM)
-#
-
-[package]
-name=mmtk
-version=1.0.6
-
-[target]
-units=mmbase sw dive mci mciapi mcidrv mmio
-
-exampledirs=tests
-
-[install]
-fpcpackage=y
-
-[default]
-fpcdir=../../../..
-
-[rules]
-dive$(PPUEXT) : dive.pas mmbase$(PPUEXT)
-
-mci$(PPUEXT) : mci.pas mmbase$(PPUEXT)
-
-mmio$(PPUEXT) : mmio.pas mmbase$(PPUEXT)

+ 0 - 17
packages/extra/os2units/mmtk/buildall.pas

@@ -1,17 +0,0 @@
-Unit Buildall;
-
-Interface
-
-Uses
-  sw,
-  mmbase,
-  dive,
-  hwvideo,
-  mci,
-  mciapi,
-  mcidrv,
-  mmio;
-
-Implementation
-
-End.

+ 0 - 335
packages/extra/os2units/mmtk/dive.pas

@@ -1,335 +0,0 @@
-{****************************************************************************
-
-    $Id$
-
-                             DIVE interface unit
-                     FPC Pascal Runtime Library for OS/2
-             Copyright (c) 1999-2000 by Karoly Balogh (aka Charlie/INQ)
-
- The FPC Pascal runtime library is distributed under the Library GNU Public
- License v2. So is this unit. The Library GNU Public License requires you to
- distribute the source code of this unit with any product that uses it.
- Because the EMX library isn't under the LGPL, we grant you an exception to
- this, and that is, when you compile a program with the Free Pascal Compiler,
- you do not need to ship source code with that program, AS LONG AS YOU ARE
- USING UNMODIFIED CODE! If you modify this code, you MUST change the next
- line:
-
- <This an official, unmodified Free Pascal source code file.>
-
- Send us your modified files, we can work together if you want!
-
- Free Pascal is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- Library GNU General Public License for more details.
-
- You should have received a copy of the Library GNU General Public License
- along with Free Pascal; see the file COPYING.LIB.  If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
-****************************************************************************}
-
-Unit DIVE;
-
-{Warning: This code is alfa. Future versions of this unit will propably
- not be compatible.}
-
-Interface
-
-Uses OS2Def, PMWin, MMBase;
-
-Const Max_Dive_Instances = 64;
-
-      DIVE_Success                       = $00000000;
-      DIVE_Err_Invalid_Instance          = $00001000;
-      DIVE_Err_Source_Format             = $00001001;
-      DIVE_Err_Destination_Format        = $00001002;
-      DIVE_Err_Blitter_Not_Setup         = $00001003;
-      DIVE_Err_Insufficient_Length       = $00001004;
-      DIVE_Err_Too_Many_Instances        = $00001005;
-      DIVE_Err_No_Direct_Access          = $00001006;
-      DIVE_Err_Not_Bank_Switched         = $00001007;
-      DIVE_Err_Invalid_Bank_Number       = $00001008;
-      DIVE_Err_FB_Not_Acquired           = $00001009;
-      DIVE_Err_FB_Already_Acquired       = $0000100A;
-      DIVE_Err_Acquire_Failed            = $0000100B;
-      DIVE_Err_Bank_Switch_Failed        = $0000100C;
-      DIVE_Err_Deacquire_Failed          = $0000100D;
-      DIVE_Err_Invalid_Palette           = $0000100E;
-      DIVE_Err_Invalid_Destination_RECTL = $0000100F;
-      DIVE_Err_Invalid_Buffer_Number     = $00001010;
-      DIVE_Err_SSMDD_Not_Installed       = $00001011;
-      DIVE_Err_Buffer_Already_Accessed   = $00001012;
-      DIVE_Err_Buffer_Not_Accessed       = $00001013;
-      DIVE_Err_Too_Many_Bufffers         = $00001014;
-      DIVE_Err_Allocation_Error          = $00001015;
-      DIVE_Err_Invalid_Linesize          = $00001016;
-      DIVE_Err_Fatal_Exception           = $00001017;
-      DIVE_Err_Invalid_Conversion        = $00001018;
-      DIVE_Err_VSD_Error                 = $00001019;
-      DIVE_Err_Color_Support             = $0000101A;
-      DIVE_Err_Out_Of_Range              = $0000101B;
-      DIVE_Warn_No_Size                  = $00001100;
-
-      DIVE_Buffer_Screen                 = $00000000;
-      DIVE_Buffer_Graphics_Plane         = $00000001;
-      DIVE_Buffer_Alternate_Plane        = $00000002;
-
-      DIVE_Fully_Visible                 = $FFFFFFFF;
-
-      { * Use either of the two defines as the bRGB2Entries pointer to have DIVE  * }
-      { * query and set the physical or default palette as source or destination. * }
-
-      DIVE_Palette_Physical = $00000000;
-      DIVE_Palette_Default  = $FFFFFFFF;
-
-Type  HDIVE  = cardinal;
-
-      { * Blitter setup structures * }
-      TSetup_Blitter = Record
-        ulStructLen : cardinal; { * ulStructLen tells how much of the structure is used.     * }
-                             { * Comments here show appropriate values, so don't count ;) * }
-
-        fInvert     : cardinal; { * Image is inverted on blit * }
-                             { * fInvert use: * }
-                             { * %0001 = 01 = $01 horizontal flip * }
-                             { * %0010 = 02 = $02 vertical flip   * }
-
-        { * This is the mark for 8 bytes * }
-
-        fccSrcColorFormat : FourCC;   { * Source data format * }
-        ulSrcWidth        : cardinal;    { * Width in pels  * }
-        ulSrcHeight       : cardinal;    { * Height in pels * }
-                                      { * The following are for displaying a sub-portion of the image. * }
-        ulSrcPosX         : cardinal;    { * X Position of source data * }
-        ulSrcPosY         : cardinal;    { * Y Position of source data * }
-
-        { * This is the mark for 28 bytes * }
-
-        ulDitherType      : cardinal;    { * Dither type * }
-
-        { * 32 byte mark * }
-
-        fccDstColorFormat : FourCC;   { * Destination color format   * }
-        ulDstWidth        : cardinal;    { * Destination width in pels  * }
-        ulDstHeight       : cardinal;    { * Destination height in pels * }
-        lDstPosX          : LongInt;
-        lDstPosY          : LongInt;
-
-        { * 52 byte mark * }
-
-        lScreenPosX       : LongInt;
-        lScreenPosY       : LongInt;
-
-        { * 60 byte mark * }
-
-        ulNumDstRects     : cardinal;
-        pVisDstRects      : PRectl; { * This is a pointer to an array of visible rectangles. * }
-
-        { * 68 bytes = fully used * }
-       End;
-
-      PSetup_Blitter = ^TSetup_Blitter;
-
-      { * Stuff for DiveQueryCaps() * }
-      TDIVE_CAPS = Record
-        ulStructLen   : cardinal;  { * SizeOf(TDIVE_CAPS)       * }
-        ulPlaneCount  : cardinal;  { * Number of defined planes * }
-
-        { * Following info applies to ulPlaneID * }
-        fScreenDirect : Boolean;  { * Direct screen access (was type BOOL in C) * }
-        fBankSwitched : Boolean;  { * VRAM bank-switched? (was type BOOL in C) * }
-        ulDepth       : cardinal;  { * Number of bits per pixel * }
-        ulHorizontalResolution : cardinal;
-        ulVerticalResolution   : cardinal;
-        ulScanLineBytes        : cardinal;
-        fccColorEncoding       : FourCC;
-        ulApertureSize         : cardinal;
-
-        ulInputFormats   : cardinal;   { * Number of input color formats * }
-        ulOutputFormats  : cardinal;
-        ulFormatLength   : cardinal;   { * Length of format buffer * }
-        pFormatData      : Pointer; { * Pointer to format buffer of FOURCC's * }
-       End;
-
-      PDIVE_CAPS = ^TDIVE_CAPS;
-
-Function DiveQueryCaps(DiveCaps: PDIVE_CAPS; ulPlaneBufNum : cardinal) : cardinal; cdecl;
-
-Function DiveOpen(Var phDiveInst : cardinal; fNonScreenInstance : cardinal;
-                  Var ppFrameBuffer : Pointer) : cardinal; cdecl;
-Function DiveClose(hDiveInst : cardinal) : cardinal; cdecl;
-
-Function DiveSetupBlitter(hDiveInst : cardinal; pSetupBlitter : PSetup_Blitter) : cardinal; cdecl;
-Function DiveBlitImage(hDiveInst : cardinal; ulSrcBufNumber : cardinal; ulDstBufNumber : cardinal) : cardinal; cdecl;
-
-Function DiveAcquireFrameBuffer(hDiveInst : cardinal; prectlDst : PRectl) : cardinal; cdecl;
-Function DiveDeacquireFrameBuffer(hDiveInst : cardinal) : cardinal; cdecl;
-Function DiveCalcFrameBufferAddress(hDiveInst           : cardinal;
-                                    prectlDest          : PRectl;
-                                Var pDestinationAddress : Pointer;
-                                Var ulBankNumber        : cardinal;
-                                Var ulRemLinesInBank    : cardinal) : cardinal; cdecl;
-Function DiveSwitchBank(hDiveInst : cardinal; ulBankNumber : cardinal) : cardinal; cdecl;
-
-{ Notes on DiveAllocImageBuffer:
-  If pbImageBuffer is not NULL, the buffer is associated rather than
-  allocated.  If pbImageBuffer is not NULL and the buffer number
-  pointed to by pulBufferNumber is non-zero, a new buffer pointer is
-  associated with the buffer number.  Even though no memory is
-  allocated by DiveAllocImageBuffer when user-allocated buffers are
-  associated, DiveFreeImageBuffer should be called to release the
-  buffer association to avoid using up available buffer indexes.
-  The specified line size will be used if a buffer is allocated in
-  system memory, or if a user buffer is associated.  If the
-  specified line size is zero, the allocated line size is rounded up
-  to the nearest DWORD boundry. }
-
-Function DiveAllocImageBuffer(hDiveInst       : cardinal;
-                          Var ulBufferNumber  : cardinal;
-                              fccColorSpace   : FourCC;
-                              ulWidth         : cardinal;
-                              ulHeight        : cardinal;
-                              ulLineSizeBytes : cardinal;
-                          Var bImageBuffer    : Pointer) : cardinal; cdecl;
-Function DiveFreeImageBuffer(hDiveInst : cardinal; ulBufferNumber : cardinal) : cardinal; cdecl;
-
-Function DiveBeginImageBufferAccess(hDiveInst              : cardinal;
-                                    ulBufferNumber         : cardinal;
-                                Var pbImageBuffer          : Pointer;
-                                Var ulBufferScanLineBytes  : cardinal;
-                                Var ulBufferScanLines      : cardinal) : cardinal; cdecl;
-Function DiveEndImageBufferAccess(hDiveInst : cardinal; ulBufferNumber : cardinal) : cardinal; cdecl;
-
-
-{/* Notes on palettes:
-      Neither DiveSetSourcePalette nor DiveSetDestinationPalette API's will set
-      the physical palette.  If your application MUST set the PHYSICAL palette,
-      try using no more than 236 entries (the middle 236: 10-245, thus leaving
-      the top and bottom 10 entries for the Workplace Shell).  If your
-      application MUST use ALL 256 entries, it must do so as a full-screen
-      (i.e. maximized) application.  Remember, No WM_REALIZEPALETTE message
-      will be sent to other running applications, meaning they will not redraw
-      and their colors will be all wrong.  It is not recommended that a
-      developer use these commands:
-
-   To set physical palette, do the following:
-            hps = WinGetPS ( HWND_DESKTOP );
-            hdc = GpiQueryDevice ( hps );
-            GpiCreateLogColorTable ( hps, LCOL_PURECOLOR | LCOL_REALIZABLE,
-                           LCOLF_CONSECRGB, 0, 256, (PLONG)plRGB2Entries );
-            Gre32EntrY3 ( hdc, 0L, 0x000060C6L );
-            WinInvalidateRect ( HWND_DESKTOP, (PRECTL)NULL, TRUE );
-            WinReleasePS ( hps );
-
-   To reset physical palette, do the following:
-            hps = WinGetPS ( HWND_DESKTOP );
-            hdc = GpiQueryDevice ( hps );
-            Gre32EntrY3 ( hdc, 0L, 0x000060C7L );
-            WinInvalidateRect ( HWND_DESKTOP, (PRECTL)NULL, TRUE );
-            WinReleasePS ( hps );
-*/}
-
-Function DiveSetDestinationPalette(hDiveInst    : cardinal;
-                                   ulStartIndex : cardinal;
-                                   ulNumEntries : cardinal;
-                               Var bRGB2Entries : Pointer) : cardinal; cdecl;
-
-Function DiveSetSourcePalette(hDiveInst    : cardinal;
-                              ulStartIndex : cardinal;
-                              ulNumEntries : cardinal;
-                          Var bRGB2Entries : Pointer) : cardinal; cdecl;
-
-Function DiveSetTransparentBlitMode(hDiveInst    : cardinal;
-                                    ulStartIndex : cardinal;
-                                    ulValue1     : cardinal;
-                                    ulValue2     : cardinal) : cardinal; cdecl;
-
-Implementation
-
-Function DiveQueryCaps(DiveCaps : PDIVE_CAPS; ulPlaneBufNum : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 1;
-
-Function DiveOpen(Var phDiveInst : cardinal; fNonScreenInstance : cardinal; Var ppFrameBuffer : Pointer) : cardinal; cdecl;
-External 'DIVE' Index 2;
-
-Function DiveClose(hDiveInst : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 3;
-
-Function DiveSetupBlitter(hDiveInst : cardinal; pSetupBlitter : PSetup_Blitter) : cardinal; cdecl;
-External 'DIVE' Index 4;
-
-Function DiveBlitImage(hDiveInst : cardinal; ulSrcBufNumber : cardinal; ulDstBufNumber : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 5;
-
-Function DiveAcquireFrameBuffer(hDiveInst : cardinal; prectlDst : PRectl) : cardinal; cdecl;
-External 'DIVE' Index 6;
-
-Function DiveDeacquireFrameBuffer(hDiveInst : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 8;
-
-Function DiveCalcFrameBufferAddress(hDiveInst           : cardinal;
-                                    prectlDest          : PRectl;
-                                Var pDestinationAddress : Pointer;
-                                Var ulBankNumber        : cardinal;
-                                Var ulRemLinesInBank    : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 11;
-
-Function DiveSwitchBank(hDiveInst : cardinal; ulBankNumber : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 7;
-
-
-Function DiveAllocImageBuffer(hDiveInst       : cardinal;
-                          Var ulBufferNumber  : cardinal;
-                              fccColorSpace   : FourCC;
-                              ulWidth         : cardinal;
-                              ulHeight        : cardinal;
-                              ulLineSizeBytes : cardinal;
-                          Var bImageBuffer    : Pointer) : cardinal; cdecl;
-External 'DIVE' Index 12;
-
-Function DiveFreeImageBuffer(hDiveInst      : cardinal;
-                             ulBufferNumber : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 13;
-
-Function DiveBeginImageBufferAccess(hDiveInst              : cardinal;
-                                    ulBufferNumber         : cardinal;
-                                Var pbImageBuffer          : Pointer;
-                                Var ulBufferScanLineBytes  : cardinal;
-                                Var ulBufferScanLines      : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 14;
-
-Function DiveEndImageBufferAccess(hDiveInst : cardinal; ulBufferNumber : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 15;
-
-Function DiveSetDestinationPalette(hDiveInst    : cardinal;
-                                   ulStartIndex : cardinal;
-                                   ulNumEntries : cardinal;
-                               Var bRGB2Entries : Pointer) : cardinal; cdecl;
-External 'DIVE' Index 9;
-
-Function DiveSetSourcePalette(hDiveInst    : cardinal;
-                              ulStartIndex : cardinal;
-                              ulNumEntries : cardinal;
-                          Var bRGB2Entries : Pointer) : cardinal; cdecl;
-External 'DIVE' Index 10;
-
-Function DiveSetTransparentBlitMode(hDiveInst    : cardinal;
-                                    ulStartIndex : cardinal;
-                                    ulValue1     : cardinal;
-                                    ulValue2     : cardinal) : cardinal; cdecl;
-External 'DIVE' Index 18;
-
-End.
-
-{
-  $Log$
-  Revision 1.1  2003-02-15 16:59:09  hajny
-    * mmtk directory corrected to lowercase
-
-  Revision 1.1  2003/02/09 13:49:06  hajny
-    + mmtk added
-
-}

+ 0 - 2534
packages/extra/os2units/mmtk/mci.pas

@@ -1,2534 +0,0 @@
-{
-    $Id$
-    Copyright (c) 1991, 1992, 1993 International Business Machines Corporation
-    Copyright (c) 2002 by Andry Svirgunov ([email protected])
-    Copyright (c) 2002-2003 by Yuri Prokushev ([email protected])
-
-    This is Media Control Interface of MMPM/2
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Library General Public License (LGPL) as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version. This program is
-    distributed in the hope that it will be useful, but WITHOUT ANY
-    WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.
-
-    See the GNU Library General Public License for more details. You should
-    have received a copy of the GNU Library General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- **********************************************************************}
-
-{
-@abstract(Media Control Interface of MMPM/2)
-@author(Andry Svirgunov ([email protected]))
-@author(Yuri Prokushev ([email protected]))
-@created(29 Nov 2002)
-@lastmod(05 Dec 2002)
-This is Media Control Interface of MMPM/2.
-Warning: This code is alfa. Future versions of this unit will propably
-not be compatible.
-}
-Unit mci;
-
-Interface
-
-Uses
-  mmbase,
-  os2def,
-  pmgpi;
-
-Const
-  MCI_TRUE                      = 1;
-  MCI_FALSE                     = 0;
-
-  // MCI command message identifiers
-  MCI_OPEN                      = 1;
-  MCI_CLOSE                     = 2;
-  MCI_ESCAPE                    = 3;
-  MCI_PLAY                      = 4;
-  MCI_SEEK                      = 5;
-  MCI_STOP                      = 6;
-  MCI_PAUSE                     = 7;
-  MCI_INFO                      = 8;
-  MCI_GETDEVCAPS                = 9;
-  MCI_STATUS                    = 10;
-  MCI_SPIN                      = 11;
-  MCI_SET                       = 12;
-  MCI_STEP                      = 13;
-  MCI_RECORD                    = 14;
-  MCI_SYSINFO                   = 15;
-  MCI_SAVE                      = 16;
-  MCI_CUE                       = 17;
-  MCI_UPDATE                    = 18;
-  MCI_SET_CUEPOINT              = 19;
-  MCI_SET_POSITION_ADVISE       = 20;
-  MCI_SET_SYNC_OFFSET           = 21;
-  MCI_LOAD                      = 22;
-  MCI_ACQUIREDEVICE             = 23;
-  MCI_RELEASEDEVICE             = 24;
-  MCI_MASTERAUDIO               = 25;
-  MCI_GETTOC                    = 26;
-  MCI_DEVICESETTINGS            = 27;
-  MCI_CONNECTOR                 = 28;
-  MCI_RESUME                    = 29;
-  MCI_CONNECTORINFO             = 31;
-  MCI_DEFAULT_CONNECTION        = 32;
-  MCI_CONNECTION                = 33;
-  MCI_GROUP                     = 34;
-  MCI_NETWORD_DEFAULT_CONNECTION= 35;
-
-  // MCI command message identifiers reserved for Digital Video and Video Overlay
-  MCI_CAPTURE                   = 40;
-  MCI_FREEZE                    = 41;
-  MCI_GETIMAGEBUFFER            = 42;
-  MCI_GETIMAGEPALETTE           = 43;
-  MCI_PUT                       = 44;
-  MCI_REALIZE                   = 45;
-  MCI_REWIND                    = 46;
-  MCI_RESTORE                   = 47;
-  MCI_SETIMAGEBUFFER            = 48;
-  MCI_SETIMAGEPALETTE           = 49;
-  MCI_UNFREEZE                  = 50;
-  MCI_WHERE                     = 51;
-  MCI_WINDOW                    = 52;
-
-  MCI_DELETE                    = 53;
-  MCI_CUT                       = 54;
-  MCI_PASTE                     = 55;
-  MCI_COPY                      = 56;
-  MCI_REDO                      = 57;
-  MCI_UNDO                      = 58;
-  MCI_MIXNOTIFY                 = 59;
-  MCI_SETTUNER                  = 60;
-  MCI_FILTER                    = 61;
-  MCI_BUFFER                    = 62;
-  MCI_MIXSETUP                  = 63;
-
-  MCI_MAX_COMMAND               = 64;
-
-Type
-  RECT = LongInt;
-  HDCT = LongInt;
-
-Const
-  // this and all subsequent message ID's are reserved for the user
-  MCI_USER_MESSAGES             = 2000;
-
-  // Special Device ID for "all"
-  MCI_ALL_DEVICE_ID             = $FFFF;
-
-  // MCI implementation limits
-  MAX_DEVICE_NAME               = 20;
-  MAX_ALIAS_NAME                = 20;
-  MAX_PRODINFO                  = 40;
-  MAX_EXTENSION_NAME            = 4;
-  MAX_DEV_PARAMS                = 128;
-  MAX_VERSION_NUMBER            = 6;
-  MAX_PDD_NAME                  = 9;
-  MAX_DLL_NAME                  = 260;
-  MAX_CLASSES                   = 10;
-  MAX_CONNECTORS                = 10;
-  MAX_EXTENSIONS                = 25;
-  MAX_TYPEBUFFER                = 256;
-
-  // MCI Device Type Constants
-  MCI_DEVTYPE_VIDEOTAPE         = 1;
-  MCI_DEVTYPE_VIDEODISC         = 2;
-  MCI_DEVTYPE_CD_AUDIO          = 3;
-  MCI_DEVTYPE_DAT               = 4;
-  MCI_DEVTYPE_AUDIO_TAPE        = 5;
-  MCI_DEVTYPE_OTHER             = 6;
-  MCI_DEVTYPE_WAVEFORM_AUDIO    = 7;
-  MCI_DEVTYPE_SEQUENCER         = 8;
-  MCI_DEVTYPE_AUDIO_AMPMIX      = 9;
-  MCI_DEVTYPE_OVERLAY           = 10;
-  MCI_DEVTYPE_ANIMATION         = 11;
-  MCI_DEVTYPE_DIGITAL_VIDEO     = 12;
-  MCI_DEVTYPE_SPEAKER           = 13;
-  MCI_DEVTYPE_HEADPHONE         = 14;
-  MCI_DEVTYPE_MICROPHONE        = 15;
-  MCI_DEVTYPE_MONITOR           = 16;
-  MCI_DEVTYPE_CDXA              = 17;
-  MCI_DEVTYPE_FILTER            = 18;
-  MCI_DEVTYPE_TTS               = 19;
-
-  // MCI Device Type Names
-  MCI_DEVTYPE_VIDEOTAPE_NAME    = 'Videotape';
-  MCI_DEVTYPE_VIDEODISC_NAME    = 'Videodisc';
-  MCI_DEVTYPE_CD_AUDIO_NAME     = 'CDaudio';
-  MCI_DEVTYPE_DAT_NAME          = 'DAT';
-  MCI_DEVTYPE_AUDIO_TAPE_NAME   = 'Audiotape';
-  MCI_DEVTYPE_OTHER_NAME        = 'Other';
-  MCI_DEVTYPE_WAVEFORM_AUDIO_NAME = 'Waveaudio';
-  MCI_DEVTYPE_SEQUENCER_NAME    = 'Sequencer';
-  MCI_DEVTYPE_AUDIO_AMPMIX_NAME = 'Ampmix';
-  MCI_DEVTYPE_OVERLAY_NAME      = 'Overlay';
-  MCI_DEVTYPE_ANIMATION_NAME    = 'Animation';
-  MCI_DEVTYPE_DIGITAL_VIDEO_NAME= 'Digitalvideo';
-  MCI_DEVTYPE_SPEAKER_NAME      = 'Speaker';
-  MCI_DEVTYPE_HEADPHONE_NAME    = 'Headphone';
-  MCI_DEVTYPE_MICROPHONE_NAME   = 'Microphone';
-  MCI_DEVTYPE_MONITOR_NAME      = 'Monitor';
-  MCI_DEVTYPE_CDXA_NAME         = 'CDXA';
-  MCI_DEVTYPE_FILTER_NAME       = 'Filter';
-  MCI_DEVTYPE_TTS_NAME          = 'Texttospeech';
-  MCI_MAX_SYSTEM_DEVICE_NAMES   = 19;
-
-
-  // Getdevcaps, set, and status item base values
-  MCI_AMP_ITEM_BASE             = $1000;
-  MCI_CD_ITEM_BASE              = $2000;
-  MCI_CDXA_ITEM_BASE            = $3000;
-  MCI_VD_ITEM_BASE              = $4000;
-  MCI_SEQ_ITEM_BASE             = $5000;
-  MCI_WAVE_ITEM_BASE            = $6000;
-  MCI_VID_ITEM_BASE             = $7000;
-  MCI_DGV_ITEM_BASE             = $8000;
-  MCI_OVLY_ITEM_BASE            = $9000;
-
-  // Flags for mciDriverNotify
-  MCI_NOTIFY_SUCCESSFUL         = $0000;
-  MCI_NOTIFY_SUPERSEDED         = $0001;
-  MCI_NOTIFY_ABORTED            = $0002;
-  MCI_NOTIFY_ERROR              = $0003;
-  // mciDriverNotify  Message Types
-  MM_MCINOTIFY                  = $0500;
-  MM_MCIPASSDEVICE              = $0501;
-  MM_MCIPOSITIONCHANGE          = $0502;
-  MM_MCICUEPOINT                = $0503;
-  MM_MCIPLAYLISTMESSAGE         = $0504;
-  MM_MCIEVENT                   = $0505;
-  MM_MCISYNCH                   = $0506;
-
-  MCI_LOSING_USE                = $00000001;
-  MCI_GAINING_USE               = $00000002;
-
-  // Common message flags 0x000000XX are reserved for common flags                      */
-  MCI_NOTIFY                    = $00000001;
-  MCI_WAIT                      = $00000002;
-  MCI_FROM                      = $00000004;
-  MCI_TO                        = $00000008;
-  MCI_MILLISECONDS              = $00000010;
-  MCI_TRACK                     = $00000020;
-  MCI_OVER                      = $00000040;
-  MCI_TEST                      = $00000080;
-  MCI_TO_BUFFER                 = $00000100;
-  MCI_FROM_BUFFER               = $00000200;
-  MCI_CONVERT_FORMAT            = $00000400;
-
-  // Time formats
-  MCI_FORMAT_MILLISECONDS       = $00000001;
-  MCI_FORMAT_mmTime             = $00000002;
-  MCI_FORMAT_MSF                = $00000005;
-  MCI_FORMAT_TMSF               = $00000006;
-  MCI_FORMAT_CHAPTERS           = $00000007;
-  MCI_FORMAT_FRAMES             = $00000008;
-  MCI_FORMAT_HMS                = $00000009;
-  MCI_FORMAT_TRACKS             = $0000000A;
-  MCI_FORMAT_BYTES              = $0000000B;
-  MCI_FORMAT_SAMPLES            = $0000000C;
-  MCI_FORMAT_HMSF               = $0000000D;
-  MCI_FORMAT_SET_SMPTE_24       = $0000000E;
-  MCI_FORMAT_SET_SMPTE_25       = $0000000F;
-  MCI_FORMAT_SET_SMPTE_30       = $00000010;
-  MCI_FORMAT_SET_SMPTE_30DROP   = $00000011;
-  MCI_FORMAT_SET_SONGPTR        = $00000012;
-  MCI_FORMAT_uSec               = $00000013;
-
-  // Speed formats
-  MCI_FORMAT_PERCENTAGE         = $00000003;
-  MCI_FORMAT_FPS                = $00000004;
-
-//  Time format conversions functions
-
-function mSecFromMM(Value: mmTime): LongInt;
-
-function mSecToMM(Value: Cardinal): mmTime;
-
-function RedBookToMM(Value: Cardinal): mmTime;
-
-function fps24ToMM(Value: Cardinal): mmTime;
-
-function fps25ToMM(Value: Cardinal): mmTime;
-
-function fps30ToMM(Value: Cardinal): mmTime;
-
-function HMSToMM(Value: Cardinal): mmTime;
-
-// The +20 is used for rounding purposes.  It is derived by:
-//   1/2 * ((300 MMTIME/SEC / (75 FRAMES/SEC)) = 20 MMTIME/HALF-FRAME
-function RedBookFromMM(Value: mmTime): Cardinal;
-
-function FPS24FromMM(Value: mmTime): Cardinal;
-
-function FPS25FromMM(value: mmTime): Cardinal;
-
-function FPS30FromMM(value: mmTime): Cardinal;
-
-function HMSFromMM(value: mmTime): Cardinal;
-
-function tmsf_track(time: mmTime): Byte;
-
-function tmsf_minute(time: mmTime): Byte;
-
-function tmsf_second(time: mmTime): Byte;
-
-function tmsf_frame(time: mmTime): Byte;
-
-function msf_minute(time: mmTime): Byte;
-
-function msf_second(time: mmTime): Byte;
-
-function msf_frame(time: mmTime): Byte;
-
-//  BYTE ACCESS WITH A DWORD MACROS
-function uLong_lwlb(var ul): Byte;   // Low word low byte
-
-function uLong_lwhb(var ul): Byte;   // Low word high byte
-
-function uLong_hwlb(var ul): Byte;   // High word low byte
-
-function uLong_hwhb(var ul): Byte;   // High word high byte
-
-function uLong_lowd(var ul): Word;   // Low word
-
-function uLong_hiwd(var ul): Word;   // High word
-
-// parameters for default command messages with empty parameter lists
-type
-  mci_Generic_Parms = record
-    hwndCallback : hwnd;
-  end;
-  pmci_Generic_Parms = ^mci_Generic_Parms;
-
-// flags for the MCI_ACQUIREDEVICE message
-//     0x00000X00 are reserved for MCI_ACQUIREDEVICE flags
-Const
-  MCI_EXCLUSIVE                 = $00000100;
-  MCI_EXCLUSIVE_INSTANCE        = $00000200;
-  MCI_ACQUIRE_QUEUE             = $00000400;
-
-  // flags for the MCI_CAPTURE message                                 */
-  //     0x0000XX00 are reserved for MCI_CAPTURE flags                 */
-  //     MCI_CONVERT is used by MCI_GETIMAGEBUFFER, MCI_SETIMAGEBUFFER */
-  //                            MCI_CAPTURE, and MCI_RESTORE           */
-  MCI_CAPTURE_RECT              = $00000100;
-  MCI_CONVERT                   = $00001000;
-type
-  // parameter structure for the MCI_CAPTURE message                   */
-  mci_Capture_Parms = record
-    hwndCallback : hwnd;
-    Rect         : RectL;
-  end;
-  pmci_Capture_Parms = ^mci_Capture_Parms;
-
-  // flags for MCI_CONNECTOR and MCI_CONNECTION messages               */
-Const
-  MCI_ENABLE_CONNECTOR          = $00000100;
-  MCI_DISABLE_CONNECTOR         = $00000200;
-  MCI_QUERY_CONNECTOR_STATUS    = $00000400;
-  MCI_CONNECTOR_TYPE            = $00000800;
-  MCI_CONNECTOR_INDEX           = $00001000;
-  MCI_TO_CONNECTOR_INDEX        = $00002000;
-  MCI_TO_CONNECTOR_TYPE         = $00004000;
-  MCI_QUERY_CONNECTION          = $00008000;
-  MCI_MAKE_CONNECTION           = $00010000;
-  MCI_BREAK_CONNECTION          = $00020000;
-  MCI_ENUMERATE_CONNECTORS      = $00040000;
-  MCI_QUERY_CONNECTOR_TYPE      = $00080000;
-  MCI_QUERY_VALID_CONNECTION    = $00100000;
-  MCI_CONNECTOR_ALIAS           = $00200000;
-  MCI_EXTERNAL_CONNECTION       = $00400000;
-
-  // Connector types
-  MCI_MIDI_STREAM_CONNECTOR     = $00000001;
-  MCI_CD_STREAM_CONNECTOR       = $00000002;
-  MCI_WAVE_STREAM_CONNECTOR     = $00000003;
-  MCI_AMP_STREAM_CONNECTOR      = $00000004;
-  MCI_XA_STREAM_CONNECTOR       = $00000005;
-  MCI_HEADPHONES_CONNECTOR      = $00000006;
-  MCI_SPEAKERS_CONNECTOR        = $00000007;
-  MCI_MICROPHONE_CONNECTOR      = $00000008;
-  MCI_LINE_IN_CONNECTOR         = $00000009;
-  MCI_LINE_OUT_CONNECTOR        = $0000000a;
-  MCI_VIDEO_IN_CONNECTOR        = $0000000b;
-  MCI_VIDEO_OUT_CONNECTOR       = $0000000c;
-  MCI_PHONE_SET_CONNECTOR       = $0000000d;
-  MCI_PHONE_LINE_CONNECTOR      = $0000000e;
-  MCI_AUDIO_IN_CONNECTOR        = $0000000f;
-  MCI_AUDIO_OUT_CONNECTOR       = $00000010;
-  MCI_UNIVERSAL_CONNECTOR       = $00000011;
-  MCI_INTERNAL_AUDIO_CONNECTOR  = $00000012;
-  MCI_MIDI_IN_CONNECTOR         = $00000013;
-  MCI_MIDI_OUT_CONNECTOR        = $00000014;
-  MCI_NULL_CONNECTOR            = $00000015;
-
-Type
-  // parameter structure for the MCI_CONNECTION message
-  mci_Connection_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    ulConnectorType  : LongInt;                  // Connector type
-    ulConnectorIndex : LongInt;                  // Connector index
-    pszAlias         : pChar;                  // Connection device alias
-    usToDeviceID     : Integer;                 // Connected to device ID
-    usReserved0      : Integer;                 // Reserved field
-    ulReserved1      : LongInt;                  // Reserved field
-    ulReserved2      : LongInt;                  // Reserved field
-  end;
-  pmci_Connection_Parms = ^mci_Connection_Parms;
-
-      //********************************************************************/
-      // parameter structure for the MCI_CONNECTOR message                 */
-      //********************************************************************/
-  mci_Connector_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    ulReturn         : LongInt;                  // Return information
-    ulConnectorType  : LongInt;                  // If specified, ulConnectorIndex is relative
-                                               // to the specified connector type
-    ulConnectorIndex : LongInt;                  // Connector number
-  end;
-  pmci_Connector_Parms = ^mci_Connector_Parms;
-
-
-      //********************************************************************/
-      // Flags for use with ulParam1                                       */
-      //********************************************************************/
-
-CONST
-      MCI_MIXSETUP_INIT            =$00010000;
-      MCI_MIXSETUP_DEINIT          =$00020000;
-      MCI_MIXSETUP_QUERYMODE       =$00040000;
-
-
-      //********************************************************************/
-      // parameter structure for the MCI_BUFFER    message                 */
-      //********************************************************************/
-Type
-        mci_mix_buffer = record
-         ulStructLength:LongInt;   // Length of the structure          */
-         pBuffer:Pointer;          // Pointer to a buffer              */
-         ulBufferLength:LongInt;   // Length of the buffer             */
-         ulFlags:LongInt;          // Flags                            */
-         ulUserParm:LongInt;       // Caller parameter                 */
-         ulTime:LongInt;           // OUT--Current time in MS          */
-         ulReserved1:LongInt;      // Unused.                          */
-         ulReserved2:LongInt;      // Unused.                          */
-         end;
-
-      PMCI_MIX_BUFFER=^mci_mix_buffer;
-
-
-      //********************************************************************/
-      // valid options for the ulFlags field of MCI_MIX_BUFFER             */
-      //********************************************************************/
-
-CONST
-      MIX_BUFFER_EOS                =$00000001;
-
-type
-  MixerProc=Function(ulHandle:LongInt;pBuffer:PMCI_MIX_BUFFER;ulFlags:LongInt):Longint; cdecl;
-  MixerEvent=Function(ulStatus:LongInt;pBuffer:PMCI_MIX_BUFFER;ulFlags:LongInt):LongInt; cdecl;
-
-      //********************************************************************/
-      // valid returns for the ulFlags param of the MIXEREVENT entry       */
-      //********************************************************************/
-
-CONST
-      MIX_STREAM_ERROR             =$00000080;
-      MIX_READ_COMPLETE            =$00000001;
-      MIX_WRITE_COMPLETE           =$00000002;
-
-
-
-      //********************************************************************/
-      // parameter structure for the MCI_MIXSETUP_PARMS message            */
-      //********************************************************************/
-
-TYPE MCI_MIXSETUP_PARMS = record
-         hwndCallback:HWND;     // PM window handle for MCI notify message      */
-         ulBitsPerSample:LongInt;  // IN Number of Bits per Sample                 */
-         ulFormatTag:LongInt;      // IN Format Tag                                */
-         ulSamplesPerSec:LongInt;  // IN Sampling Rate                             */
-         ulChannels:LongInt;       // IN Number of channels                        */
-         ulFormatMode:LongInt;     // IN Either MCI_RECORD or MCI_PLAY             */
-         ulDeviceType:LongInt;     // IN MCI_DEVTYPE (i.e. DEVTYPE_WAVEFORM etc.)  */
-         ulMixHandle:LongInt;      // OUT--mixer returns handle for write/read     */
-         pmixWrite:MixerProc;        // OUT-Mixer Write Routine entry point          */
-         pmixRead:MixerProc;         // OUT-Mixer Read Routine entry point           */
-         pmixEvent:MixerEvent;        // IN--Mixer Read Routine entry point           */
-         pExtendedInfo:Pointer;    // Ptr to extended wave information             */
-         ulBufferSize:longInt;     // OUT--suggested buffer size for current mode  */
-         ulNumBuffers:LongInt;     // OUT--suggested # of buffers for current mode */
-         end;
-
-pmci_mixsetup_parms=^mci_mixsetup_parms;
-
-      //********************************************************************/
-      // Flags for use with ulParam1                                       */
-      //********************************************************************/
-
-CONST
-
-      MCI_BUFFER_QUERY         =$00010000;
-      MCI_BUFFER_SET           =$00020000;
-      MCI_ALLOCATE_MEMORY      =$00040000;
-      MCI_DEALLOCATE_MEMORY    =$00080000;
-
-
-      //********************************************************************/
-      // parameter structure for the MCI_BUFFER    message                 */
-      //********************************************************************/
-type mci_buffer_parms=record
-         hwndCallback:hwnd;     // PM window handle for MCI notify message    */
-         ulStructLength:longint;   // Length of the MCI Buffer command           */
-         ulNumBuffers:longInt;     // Number of buffers MCI driver should use    */
-         ulBufferSize:longint;     // Size of buffers MCI driver should use      */
-         ulMinToStart:longint;     // Min number of buffers to create a stream.  */
-         ulSrcStart:longint;       // # of EMPTY buffers required to start Source*/
-         ulTgtStart:longint;       // # of FULL buffers required to start Target */
-
-         pBufList:pointer;         // Pointer to a list of buffers               */
-
-         end;
- pmci_buffer_parms=^mci_buffer_parms;
-
-
-      //********************************************************************/
-      // parameter structure for the MCI_CONNECTORINFO message             */
-      //********************************************************************/
-  mci_ConnectorInfo_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    ulReturn         : Longint;                  // Return information
-    ulDeviceTypeID   : Longint;                  // MCI device type
-    ulConnectorType  : Longint;                  // If specified, ulConnectorIndex is relative
-                                               // to the specified connector type
-    ulConnectorIndex : Longint;                  // Connector number
-    ulToConnectorType: Longint;                  // Connector type to test if
-                                               // MCI_QUERY_VALID_CONNECTION is specified
-  end;
-  pmci_ConnectorInfo_Parms = ^mci_ConnectorInfo_Parms;
-
-      //********************************************************************/
-      // flags for the MCI_CUE message                                     */
-      //     0x00000x00 are reserved for MCI_CUE flags                     */
-      //********************************************************************/
-CONST
-  MCI_CUE_INPUT                 = $00000100;
-  MCI_CUE_OUTPUT                = $00000200;
-  MCI_SHOW                      = $00000400;
-  MCI_NOSHOW                    = $00000800;
-
-      //************************************************/
-      // Additional flags for Wave Audio for MCI_CUE   */
-      //************************************************/
-  MCI_WAVE_INPUT                = $00001000;
-  MCI_WAVE_OUTPUT               = $00002000;
-
-      //****************************************************************************/
-      // the MCI_CONNLIST structure used in the NETWORK_DEFAULT_CONNECTION message */
-      //****************************************************************************/
-type mci_connlist=record
-         ulFromDevice: LongInt;  // Ordinal position of device within pDevices array */
-         ulSrcConnType: LongInt; // Type of source connector                         */
-         ulSrcConnNum: LongInt;  // Source Connector Number                          */
-         ulToDevice: LongInt;    // Ordinal position of device within pDevices array */
-         ulTgtConnType: LongInt; // Type of target connector                         */
-         ulTgtConnNum: Longint;  // Target Connector Number                          */
-         end;
-      pmci_connlist=^mci_connlist;
-
-
-      //****************************************************************************/
-      // parameter structure for the MCI_NETWORK_DEFAULT_CONNECTION message        */
-      //****************************************************************************/
-type mci_network_default_connection_parms=record
-     hwndCallback:HWND;                   // PM window handle for MCI notify message    */
-     szInstallName:ARRAY [0..MAX_DEVICE_NAME] of Char; // Name of section containing default conn.   */
-     ulNumDevices:LongInt;                   // Number of additional devices in connection */
-     ulNumPlayConnections:LongInt;           // Number of Play connections                 */
-     ulNumRecordConnections:LongInt;         // Number of Record connections               */
-     pDevices:ARRAY [0..MAX_DEVICE_NAME] of ^Char;    // Pointer to array of device names to open   */
-     pPlayConnections:PMCI_CONNLIST;               // Pointer to array of connections to "make"  */
-     pRecordConnections:PMCI_CONNLIST;             // Pointer to array of connections to "make"  */
-     end;
-type pmci_network_default_connection_parms=^mci_network_default_connection_parms;
-
-
-      //******************************************************/
-      // Additional flags for MCI_NETWORK_DEFAULT_CONNECTION */
-      //******************************************************/
-CONST
-      MCI_RECORD_DEFAULTS             =$00000004;
-      MCI_PLAY_DEFAULTS               =$00000008;
-
-
-      //********************************************************************/
-      // parameter structure for the MCI_DEFAULT_CONNECTION message        */
-      //********************************************************************/
-type  mci_Default_Connection_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    pszDevice        : pChar;                  // Device name
-    ulConnectorType  : LongInt;                  // If specified, ulConnectorIndex is relative
-                                               // to the specified connector type
-    ulConnectorIndex : LongInt;                  // Connector number
-    pszToDevice      : pChar;                  // Return device name to which the connection exists
-    ulToConnectorType: LongInt;                  // Connector type
-    ulToConnectorIndex:LongInt;                  // Connector number
-  end;
-  pmci_Default_Connection_Parms = ^mci_Default_Connection_Parms;
-
-      //********************************************************************/
-      // parameter structure for the MCI_DEVICESETTINGS message            */
-      //********************************************************************/
-  mci_DeviceSettings_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    hwndNotebook     : hwnd;                   // Hwhd to notebook window
-    usDeviceType     : Integer;                 // Device type
-    pszDeviceName    : pChar;                  // Device name
-  end;
-  pmci_DeviceSettings_Parms = ^mci_DeviceSettings_Parms;
-
-      //*********************************************************************/
-      // parameter structure for the MCI_CUT / COPY / DELETE / UNDO / etc...*/
-      //*********************************************************************/
-  mci_Edit_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    ulStructLen      : Longint;                  // Length of the Structure
-    ulFrom           : Longint;                  // Beginning Point of Range
-    ulTo             : Longint;                  // ending point of range
-    pBuff            : Pointer;                // user buffer
-    ulBufLen         : Longint;                  // length of user buffer
-    pHeader          : Pointer;                // header which describes the buffer
-  end;
-  pmci_Edit_Parms = ^mci_Edit_Parms;
-
-      //********************************************************************/
-      // flags and parameter structure for the MCI_ESCAPE message          */
-      //     0x00000X00 are reserved for MCI_ESCAPE flags                  */
-      //********************************************************************/
-const
-  mci_Escape_String             = $00000100;
-
-type
-  mci_Escape_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    pszCommand       : pChar;                  // Command to send to the device
-  end;
-  pmci_Escape_Parms = ^mci_Escape_Parms;
-
-      //********************************************************************/
-      // flags for the MCI_FREEZE message                                  */
-      //     0x0000XX00 are reserved for MCI_FREEZE flags                  */
-      //********************************************************************/
-CONST
-  MCI_OVLY_FREEZE_RECT          = $00000100;
-  MCI_OVLY_FREEZE_RECT_OUTSIDE  = $00000200;
-
-      //********************************************************************/
-      // flags for the MCI_GETDEVCAPS message                              */
-      //     0x00XXXX00 are reserved for MCI_GETDEVCAPS flags              */
-      //********************************************************************/
-  MCI_GETDEVCAPS_MESSAGE        = $00000100;
-  MCI_GETDEVCAPS_ITEM           = $00000200;
-  MCI_GETDEVCAPS_EXTENDED       = $00000400;
-      //************************************************/
-      // General MCI_GETDEVCAPS item values            */
-      //************************************************/
-  MCI_GETDEVCAPS_CAN_EJECT                                                = $00000001;
-  MCI_GETDEVCAPS_CAN_LOCKEJECT  = $00000002;
-  MCI_GETDEVCAPS_CAN_PLAY       = $00000003;
-  MCI_GETDEVCAPS_CAN_PROCESS_INTERNAL = $00000004;
-  MCI_GETDEVCAPS_CAN_RECORD     = $00000005;
-  MCI_GETDEVCAPS_CAN_RECORD_INSERT    = $00000006;
-  MCI_GETDEVCAPS_CAN_SAVE       = $00000007;
-  MCI_GETDEVCAPS_CAN_SETVOLUME  = $00000008;
-  MCI_GETDEVCAPS_CAN_STREAM     = $00000009;
-  MCI_GETDEVCAPS_DEVICE_TYPE    = $0000000A;
-  MCI_GETDEVCAPS_HAS_AUDIO      = $0000000B;
-  MCI_GETDEVCAPS_HAS_VIDEO      = $0000000C;
-  MCI_GETDEVCAPS_PREROLL_TIME   = $0000000D;
-  MCI_GETDEVCAPS_PREROLL_TYPE   = $0000000E;
-  MCI_GETDEVCAPS_USES_FILES     = $0000000F;
-  MCI_GETDEVCAPS_HAS_IMAGE      = $00000010;
-  MCI_GETDEVCAPS_WAVE_FORMAT    = $00000011;
-  MCI_GETDEVCAPS_CAN_CLOSE_DOOR = $00000012;
-
-      //**********************************************/
-      // return ID's for videodisc MCI_GETDEVCAPS    */
-      //**********************************************/
-  MCI_VD_MEDIA_CLV=$00000001;
-  MCI_VD_MEDIA_CAV=$00000002;
-  MCI_VD_MEDIA_OTHER=$00000003;
-
-      //************************************************/
-      // MCI_GETDEVCAPS item values for video devices  */
-      //************************************************/
-  MCI_VID_GETDEVCAPS_CAN_STRETCH         = MCI_VID_ITEM_BASE;
-  MCI_VID_GETDEVCAPS_CAN_DISTORT         = MCI_VID_ITEM_BASE+1;
-  MCI_VID_GETDEVCAPS_VIDEO_X_EXTENT      = MCI_VID_ITEM_BASE+2;
-  MCI_VID_GETDEVCAPS_VIDEO_Y_EXTENT      = MCI_VID_ITEM_BASE+3;
-  MCI_VID_GETDEVCAPS_IMAGE_X_EXTENT      = MCI_VID_ITEM_BASE+4;
-  MCI_VID_GETDEVCAPS_IMAGE_Y_EXTENT      = MCI_VID_ITEM_BASE+5;
-  MCI_VID_GETDEVCAPS_MAX_WINDOWS         = MCI_VID_ITEM_BASE+6;
-  MCI_VID_GETDEVCAPS_CAN_FREEZE          = MCI_VID_ITEM_BASE+7;
-  MCI_VID_GETDEVCAPS_OVERLAY_GRAPHICS    = MCI_VID_ITEM_BASE+8;
-  MCI_VID_GETDEVCAPS_CAN_REVERSE         = MCI_VID_ITEM_BASE+9;
-  MCI_VID_GETDEVCAPS_FAST_RATE           = MCI_VID_ITEM_BASE+10;
-  MCI_VID_GETDEVCAPS_SLOW_RATE           = MCI_VID_ITEM_BASE+11;
-  MCI_VID_GETDEVCAPS_NORMAL_RATE         = MCI_VID_ITEM_BASE+12;
-  MCI_VID_GETDEVCAPS_MINIMUM_RATE        = MCI_VID_ITEM_BASE+13;
-  MCI_VID_GETDEVCAPS_MAXIMUM_RATE        = MCI_VID_ITEM_BASE+14;
-
-
-      //************************************************/
-      // MCI_GETDEVCAPS flag values for Videodisc      */
-      //************************************************/
-  MCI_VD_GETDEVCAPS_CLV                  = $00000400;
-  MCI_VD_GETDEVCAPS_CAV                  = $00000800;
-
-      //************************************************/
-      // MCI_GETDEVCAPS item values for Videodisc      */
-      //************************************************/
-
-  MCI_VD_GETDEVCAPS_CAN_REVERSE          = MCI_VID_GETDEVCAPS_CAN_REVERSE;
-  MCI_VD_GETDEVCAPS_FAST_RATE            = MCI_VID_GETDEVCAPS_FAST_RATE;
-  MCI_VD_GETDEVCAPS_SLOW_RATE            = MCI_VID_GETDEVCAPS_SLOW_RATE;
-  MCI_VD_GETDEVCAPS_NORMAL_RATE          = MCI_VID_GETDEVCAPS_NORMAL_RATE;
-  MCI_VD_GETDEVCAPS_MINIMUM_RATE         = MCI_VID_GETDEVCAPS_MINIMUM_RATE;
-  MCI_VD_GETDEVCAPS_MAXIMUM_RATE         = MCI_VID_GETDEVCAPS_MAXIMUM_RATE;
-      //***********************************************/
-      // MCI_GETDEVCAPS item values for Digital Video */
-      //***********************************************/
-  MCI_DGV_GETDEVCAPS_CAN_REVERSE         = MCI_VID_GETDEVCAPS_CAN_REVERSE;
-  MCI_DGV_GETDEVCAPS_CAN_STRETCH         = MCI_VID_GETDEVCAPS_CAN_STRETCH;
-  MCI_DGV_GETDEVCAPS_CAN_DISTORT         = MCI_VID_GETDEVCAPS_CAN_DISTORT;
-  MCI_DGV_GETDEVCAPS_FAST_RATE           = MCI_VID_GETDEVCAPS_FAST_RATE;
-  MCI_DGV_GETDEVCAPS_SLOW_RATE           = MCI_VID_GETDEVCAPS_SLOW_RATE;
-  MCI_DGV_GETDEVCAPS_NORMAL_RATE         = MCI_VID_GETDEVCAPS_NORMAL_RATE;
-  MCI_DGV_GETDEVCAPS_MINIMUM_RATE        = MCI_VID_GETDEVCAPS_MINIMUM_RATE;
-  MCI_DGV_GETDEVCAPS_MAXIMUM_RATE        = MCI_VID_GETDEVCAPS_MAXIMUM_RATE;
-  MCI_DGV_GETDEVCAPS_VIDEO_X_EXTENT      = MCI_VID_GETDEVCAPS_VIDEO_X_EXTENT;
-  MCI_DGV_GETDEVCAPS_VIDEO_Y_EXTENT      = MCI_VID_GETDEVCAPS_VIDEO_Y_EXTENT;
-  MCI_DGV_GETDEVCAPS_IMAGE_X_EXTENT      = MCI_VID_GETDEVCAPS_IMAGE_X_EXTENT;
-  MCI_DGV_GETDEVCAPS_IMAGE_Y_EXTENT      = MCI_VID_GETDEVCAPS_IMAGE_Y_EXTENT;
-  MCI_DGV_GETDEVCAPS_MAX_WINDOWS         = MCI_VID_GETDEVCAPS_MAX_WINDOWS;
-  MCI_DGV_GETDEVCAPS_OVERLAY_GRAPHICS    = MCI_VID_GETDEVCAPS_OVERLAY_GRAPHICS;
-  MCI_DGV_GETDEVCAPS_HAS_TUNER           = MCI_DGV_ITEM_BASE;
-  MCI_DGV_GETDEVCAPS_HAS_TELETEX         = MCI_DGV_ITEM_BASE+1;
-  MCI_DGV_GETDEVCAPS_HAS_AFC             = MCI_DGV_ITEM_BASE+2;
-
-      //************************************************/
-      // MCI_GETDEVCAPS item values for Video Overlay  */
-      //************************************************/
-  MCI_OVLY_GETDEVCAPS_CAN_STRETCH        = MCI_VID_GETDEVCAPS_CAN_STRETCH;
-  MCI_OVLY_GETDEVCAPS_CAN_DISTORT        = MCI_VID_GETDEVCAPS_CAN_DISTORT;
-  MCI_OVLY_GETDEVCAPS_VIDEO_X_EXTENT     = MCI_VID_GETDEVCAPS_VIDEO_X_EXTENT;
-  MCI_OVLY_GETDEVCAPS_VIDEO_Y_EXTENT     = MCI_VID_GETDEVCAPS_VIDEO_Y_EXTENT;
-  MCI_OVLY_GETDEVCAPS_IMAGE_X_EXTENT     = MCI_VID_GETDEVCAPS_IMAGE_X_EXTENT;
-  MCI_OVLY_GETDEVCAPS_IMAGE_Y_EXTENT     = MCI_VID_GETDEVCAPS_IMAGE_Y_EXTENT;
-  MCI_OVLY_GETDEVCAPS_MAX_WINDOWS        = MCI_VID_GETDEVCAPS_MAX_WINDOWS;
-  MCI_OVLY_GETDEVCAPS_CAN_FREEZE         = MCI_VID_GETDEVCAPS_CAN_FREEZE;
-  MCI_OVLY_GETDEVCAPS_OVERLAY_GRAPHICS   = MCI_VID_GETDEVCAPS_OVERLAY_GRAPHICS;
-
-  MCI_PREROLL_NOTIFIED                   = $00000001;
-  MCI_PREROLL_DETERMINISTIC              = $00000002;
-  MCI_PREROLL_NONE                       = $00000003;
-
-      //********************************************************************/
-      // parameter structure for the MCI_GETDEVCAPS message                */
-      //********************************************************************/
-TYPE
-  mci_GetDevCaps_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    ulReturn         : Longint;                  // Return field
-    ulItem           : Longint;                  // Item field for GETDEVCAPS item to query
-    usMessage        : integer;                 // Field to hold MCI message to query
-    usReserved0      : integer;                 // Reserved field
-  end;
-  pmci_GetDevCaps_Parms = ^mci_GetDevCaps_Parms;
-
-      //********************************************************************/
-      // parameter structure for the MCI_WAVE_GETDEVCAPS                   */
-      //********************************************************************/
-  mci_Wave_GetDevCaps_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    ulReturn         : Longint;                  // Return field
-    ulItem           : Longint;                  // Item field for GETDEVCAPS item to query
-    usMessage        : Integer;                 // Field to hold MCI message to query
-    usReserved0      : Integer;                 // Reserved field
-    ulLength         : Longint;                  // Length of structure in ULONGS
-    ulBitsPerSample  : Longint;                  // Number of Bits per Sample
-    ulFormatTag      : Longint;                  // Format Tag
-    ulSamplesPerSec  : Longint;                  // Sampling Rate
-    ulChannels       : Longint;                  // Number of channels
-    ulFormatMode     : Longint;                  // Either MCI_RECORD or MCI_PLAY
-  end;
-  pmci_Wave_GetDevCaps_Parms = ^mci_Wave_GetDevCaps_Parms;
-
-      //********************************************************************/
-      // potential values for the ulValue field of MCI_AMP_GETDEVCAPS  */
-      //********************************************************************/
-CONST
-  MCI_SET_MONITOR                 = $00000001;
-  MCI_SET_MONITOR_AUDIO           = $00000002;
-  MCI_SET_MONITOR_VIDEO           = $00000003;
-  MCI_SET_RECORD                  = $00000004;
-
-  // MCI_SET flags for amp/mixer;
-  MCI_AMP_SET_BALANCE             = $00100000;
-  MCI_AMP_SET_PITCH               = $00200000;
-  MCI_AMP_SET_TREBLE              = $00400000;
-  MCI_AMP_SET_BASS                = $00800000;
-  MCI_AMP_SET_GAIN                = $01000000;
-  MCI_AMP_SET_ALC                 = $00000004;
-  MCI_AMP_SET_AUDIO               = $00000008;
-  MCI_AMP_SET_CROSSOVER           = $00000010;
-  MCI_AMP_SET_LOUDNESS            = $00000020;
-  MCI_AMP_SET_MUTE                = $00000040;
-  MCI_AMP_SET_REVERB              = $00000080;
-  MCI_AMP_SET_STEREOENHANCE       = $00000100;
-  MCI_AMP_SET_CUSTOM1             = $00000200;
-  MCI_AMP_SET_CUSTOM2             = $00000400;
-  MCI_AMP_SET_CUSTOM3             = $00000800;
-  MCI_AMP_SET_LRVOLUME            = $00001000;
-  MCI_AMP_SET_MID                 = $00020000;
-  MCI_AMP_SET_CHORUS              = $00004000;  // typo? 40000?
-  MCI_AMP_SET_VOLUME              = $00080000;  // MCI_SET_VOLUME;
-  MCI_AMP_SET_MONITOR             = MCI_SET_MONITOR_AUDIO;
-
-  // Potential values for the ulValue field of MCI_AMP_GETDEVCAPS
-  MCI_AMP_CAN_SET_MONITOR         = MCI_AMP_SET_MONITOR;
-  MCI_AMP_CAN_SET_BALANCE         = MCI_AMP_SET_BALANCE;
-  MCI_AMP_CAN_SET_ALC             = MCI_AMP_SET_ALC;
-  MCI_AMP_CAN_SET_CROSSOVER       = MCI_AMP_SET_CROSSOVER;
-  MCI_AMP_CAN_SET_LOUDNESS        = MCI_AMP_SET_LOUDNESS;
-  MCI_AMP_CAN_SET_MUTE            = MCI_AMP_SET_MUTE;
-  MCI_AMP_CAN_SET_REVERB          = MCI_AMP_SET_REVERB;
-  MCI_AMP_CAN_SET_STEREOENHANCE   = MCI_AMP_SET_STEREOENHANCE;
-  MCI_AMP_CAN_SET_CUSTOM1         = MCI_AMP_SET_CUSTOM1;
-  MCI_AMP_CAN_SET_CUSTOM2         = MCI_AMP_SET_CUSTOM2;
-  MCI_AMP_CAN_SET_CUSTOM3         = MCI_AMP_SET_CUSTOM3;
-  MCI_AMP_CAN_SET_LRVOLUME        = MCI_AMP_SET_LRVOLUME;
-  MCI_AMP_CAN_SET_BASS            = MCI_AMP_SET_BASS;
-  MCI_AMP_CAN_SET_MID             = MCI_AMP_SET_MID;
-  MCI_AMP_CAN_SET_TREBLE          = MCI_AMP_SET_TREBLE;
-  MCI_AMP_CAN_SET_PITCH           = MCI_AMP_SET_PITCH;
-  MCI_AMP_CAN_SET_GAIN            = MCI_AMP_SET_GAIN;
-  MCI_AMP_CAN_SET_CHORUS          = MCI_AMP_SET_CHORUS;
-  MCI_AMP_CAN_SET_VOLUME          = MCI_AMP_SET_VOLUME;
-
-      //************************************************************************/
-      // potential values for the ulExtended field of MCI_AMP_GETDEVCAPS_PARMS */
-      //************************************************************************/
-  MCI_MIXER_LINE                  = $00000001;
-
-
-      //********************************************************************/
-      // parameter structure for the MCI_AMP_GETDEVCAPS                    */
-      //********************************************************************/
-type
-  mci_Amp_GetDevCaps_Parms = record
-    hwndCallback  : Longint;                     // PM window handle for MCI notify message
-    ulReturn      : Longint;                     // Return field
-    ulItem        : Longint;                     // Item field for GETDEVCAPS item to query
-    usMessage     : Integer;                    // Field to hold MCI message to query
-    usReserved0   : Integer;                    // Reserved field
-    ulLength      : LongInt;                     // Length of structure in uLongS
-    ulValue       : LongInt;                     // Value to determine caps
-    ulAttribute   : LongInt;                     // Flags to modified the extended parms
-    ulExtended    : LongInt;                     // Extended flags field
-  end;
-  pmci_Amp_GetDevCaps_Parms = ^mci_Amp_GetDevCaps_Parms;
-
-
-      //********************************************************************/
-      // values for the ulFlags field of MCI_MIXEVENT_PARMS                */
-      //********************************************************************/
-CONST
-  MCI_MIX_ATTRIBUTE             = $00000001;
-  MCI_MIX_CONNECTOR             = $00000002;
-      //********************************************************************/
-      // values for the lParam field for mix_notify                        */
-      //********************************************************************/
-
-  MCI_MIXNOTIFY_ON              = $00000004;
-  MCI_MIXNOTIFY_OFF             = $00000008;
-
-      //********************************************************************/
-      // value to indicate type of MM_MCIEVENT                             */
-      //********************************************************************/
-
-  MCI_MIXEVENT                  = $00000001;
-
-
-      //********************************************************************/
-      // parameter structure for the MCI_MIXEVENT_PARMS                    */
-      //********************************************************************/
-type
-  mci_MixEvent_Parms = record
-    ulLength         : Longint;                  // Length of struct
-    hwndMixer        : hwnd;                   // window to inform of mixer changes
-    ulFlags          : Longint;                  // Either MCI_MIX_ATTRIBUTE
-                                               //      or MCI_MIX_CONNECTOR
-    usDeviceID       : Integer;                 // device id to notify of the change
-    ulDeviceType     : LongInt;                  // Device Type which generated the change
-    ulDeviceOrdinal  : LongInt;                  // Ordinal of device Type
-    ulAttribute      : LongInt;                  // Attribute that changed(volume, bass etc.)
-    ulValue          : LongInt;                  // new value of the attribute which changed
-    ulConnectorType  : LongInt;                  // Connector Type
-    ulConnectorIndex : LongInt;                  // Connector Index
-    ulConnStatus     : LongInt;                  // Is connector enabled/disabled.
-  end;
-  pmci_MixEvent_Parms = ^mci_MixEvent_Parms;
-
-
-      //********************************************************************/
-      // flag values for the MCI_GETIMAGEBUFFER and MCI_SETIMAGEBUFFER msg */
-      //     0x0000XX00 are reserved for MCI_GETIMAGEBUFFER and            */
-      //       MCI_SETIMAGEBUFFER Flags                                    */
-      //     MCI_CONVERT is defined by MCI_CAPTURE message as 0x00001000L  */
-      //********************************************************************/
-CONST
-  MCI_USE_HW_BUFFER             = $00000400;
-  MCI_GET_HW_BUFFER_PTR         = $00000800;
-
-      //**************************************************/
-      // parm structure for MCI_GETIMAGEBUFFER and       */
-      //                    MCI_SETIMAGEBUFFER messages  */
-      //**************************************************/
-type
-  mci_Image_Parms = record
-    hwndCallback       : hwnd;                 // PM window handle for MCI notify message
-    ulPelFormat        : Longint;                // Format of the image data returned
-    usBitCount         : Integer;               // Number of bitsimage data returned
-    usReserved0        : Integer;               // Reserved field
-    ulImageCompression : LongInt;                //
-    rect               : RectL;                // Image area to get/set
-    pPelBuffer         : Pointer;              // Pel data buffer
-    ulPelBufferHeight  : LongInt;                // Number of rows in buffer
-    ulPelBufferWidth   : LongInt;                // Pels per row in buffer
-    ulBufLen           : LongInt;                // Pel data buffer length in bytes
-  end;
-  pmci_Image_Parms = ^mci_Image_Parms;
-
-      //********************************************************************/
-      // flags for the MCI_GETIMAGEPALETTE message                         */
-      //     0x0000XX00 are reserved for MCI_GETIMAGEPALETTE flags         */
-      //********************************************************************/
-CONST
-  MCI_FIND_BEST_REGISTERED      = $00000100;
-  MCI_QUERY_REGISTERED_MAP      = $00000200;
-  MCI_QUERY_REGISTERED_MAP_SIZE = $00000400;
-
-
-      //**************************************************/
-      // parameter structure for MCI_GETIMAGEPALETTE and */
-      //    MCI_SETIMAGEPALETTE messages                 */
-      //**************************************************/
-type
-  mci_Palette_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    usRegisteredMap  : Integer;                 // Id of the palette from the registed color map
-    usReserved0      : Integer;                 // Reserved field
-    ulPalEntries     : LongInt;                  // size of the palette returned
-    pPalette         : Pointer;                // pointer to the palette
-  end;
-  pmci_Palette_Parms = ^mci_Palette_Parms;
-
-
-      //********************************************************************/
-      // Parameter structure for the MCI_GETTOC message                    */
-      //********************************************************************/
-  mci_Toc_Rec = record
-    TrackNum         : BYTE;                   // Returned Track Number
-    ulStartAddr      : LongInt;                  // Starting address of the track in MMTIME format
-    ulEndAddr        : LongInt;                  // Ending address of the track in MMTIME format
-    Control          : BYTE;                   // Track Control information
-    usCountry        : Integer;                 // Country
-    ulOwner          : LongInt;                  // Owner
-    ulSerialNum      : LongInt;                  // Serial Number
-  end;
-  pTocRec = ^mci_Toc_Rec;
-
-  mci_Toc_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    pBuf             : pTocRec;                // Pointer to array MCI_TOC_REC structures to
-                                               // be filled in by the mci device
-    ulBufSize        : LongInt;                  // Size of the array
-  end;
-  pmci_Toc_Parms = ^mci_Toc_Parms;
-
-      //********************************************************************/
-      // parameters for the MCI_GROUP message                              */
-      //     0x00XXXX00 are reserved for MCI_GROUP flags                   */
-      //********************************************************************/
-const
-  MCI_SYNCHRONIZE               = $00000100;
-  MCI_NOPIECEMEAL               = $00000200;
-  MCI_GROUP_MAKE                = $00000400;
-  MCI_GROUP_DELETE              = $00000800;
-  MCI_GROUP_ALIAS               = $00001000;
-  MCI_GROUP_MASTER              = $00002000;
-  MCI_GROUP_NONE                = $00004000;   // No group!
-
-type
-  mci_Group_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message.
-    usGroupID                   : Integer;      // GroupID
-    usReserved0                 : Integer;      // RESERVED
-    ulStructLength              : LongInt;       // Length of Structure in ULONGS.
-    usMasterID                  : Integer;      // ID of Master device in Synchrounous groups.
-    usReserved1                 : Integer;      // RESERVED
-    pszGroupAlias               : pChar;       // Pointer to Alias Name.
-    ulNumDevices                : LongInt;       // Number of Devices in group.
-    paulDeviceID                : PLongInt;      // Array of Device ids in the group.
-  end;
-  pmci_Group_Parms = ^mci_Group_Parms;
-
-
-      //********************************************************************/
-      // flags for the MCI_INFO message                                    */
-      //     0x00000X00 are reserved for MCI_INFO flags                    */
-      //********************************************************************/
-CONST
-  MCI_INFO_PRODUCT              = $00000100;
-  MCI_INFO_FILE                 = $00000200;
-      //***********************************************/
-      // CD Audio                MCI_INFO             */
-      //***********************************************/
-  MCI_CD_INFO_ID                = $00010000;
-  MCI_CD_INFO_UPC               = $00020000;
-
-      //***********************************************/
-      // Videodisc               MCI_INFO             */
-      //***********************************************/
-  MCI_VD_INFO_LABEL             = $00001000;
-
-      //***********************************************/
-      // Digital Video           MCI_INFO             */
-      //***********************************************/
-  MCI_DGV_INFO_VIDEO_FILE       = $00001000;
-  MCI_DGV_INFO_IMAGE_FILE       = $00002000;
-  MCI_DGV_INFO_REGION           = $00004000;
-  MCI_DGV_INFO_REGION_TEXT      = $00008000;
-  MCI_DGV_INFO_TEXT             = $00010000;
-
-      //***********************************************/
-      // Video Overlay           MCI_INFO             */
-      //***********************************************/
-  MCI_OVLY_INFO_TEXT            = $00010000;
-
-
-type
-  mci_Info_Parms = record
-    hwndCallback      : hwnd;                  // PM window handle for MCI notify message
-    pszReturn         : pChar;                 // Pointer to return buffer
-    ulRetSize         : LongInt;                 // Return buffer size
-  end;
-  pmci_Info_Parms = ^mci_Info_Parms;
-
-
-      //********************************************************************/
-      // parameters and flags for the MCI_LOAD message                     */
-      //     0x00000X00 are reserved for MCI_LOAD flags                    */
-      //********************************************************************/
-  mci_Load_Parms = record
-    hwndCallback      : hwnd;                  // PM window handle for MCI notify message
-    pszElementName    : pChar;                 // File name to loads
-  end;
-  pmci_Load_Parms = ^mci_Load_Parms;
-
-      //********************************************************************/
-      // parameters and flags for the MCI_MASTERAUDIO                      */
-      //     0x000XXX00 are reserved for MCI_MASTERAUDIO  flags            */
-      //********************************************************************/
-CONST
-  MCI_ON                        = $00000100;
-  MCI_OFF                       = $00000200;
-  MCI_HEADPHONES                = $00000400;
-  MCI_SPEAKERS                  = $00000800;
-  MCI_MASTERVOL                 = $00001000;
-  MCI_SAVESETTING               = $00002000;
-  MCI_QUERYSAVEDSETTING         = $00004000;
-  MCI_QUERYCURRENTSETTING       = $00008000;
-
-type
-  mci_MasterAudio_Parms = record
-    hwndDummyCallback : hwnd;                  // Notify not allowed for this message
-    ulReturn          : LongInt;                 // Return field for query information
-    ulMasterVolume    : LongInt;                 // Master volume field
-  end;
-  pmci_MasterAudio_Parms = ^mci_MasterAudio_Parms;
-
-      //********************************************************************/
-      // parameters and flags for the MCI_OPEN message                     */
-      //     0x0000XX00 are reserved for MCI_OPEN flags                    */
-      //********************************************************************/
-CONST
-  MCI_OPEN_ELEMENT              = $00000100;
-  MCI_OPEN_ALIAS                = $00000200;
-  MCI_OPEN_ELEMENT_ID           = $00000400;
-  MCI_OPEN_PLAYLIST             = $00000800;
-  MCI_OPEN_TYPE_ID              = $00001000;
-  MCI_OPEN_SHAREABLE            = $00002000;
-  MCI_OPEN_MMIO                 = $00004000;
-  MCI_READONLY                  = $00008000;
-
-      //**************************************************/
-      // parameters and flags for the MCI_OPEN message   */
-      // Digital Video, Video Overlay specific           */
-      //**************************************************/
-  MCI_VID_OPEN_PARENT           = $01000000;
-  MCI_DGV_OPEN_PARENT           = MCI_VID_OPEN_PARENT;
-  MCI_OVLY_OPEN_PARENT          = MCI_VID_OPEN_PARENT;
-
-type
-  mci_Open_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    usDeviceID       : Integer;                 // Device ID returned to user
-    usReserved0      : Integer;                 // Reserved
-    pszDeviceType    : pChar;                  // Device name from SYSTEM.INI
-    pszElementName   : pChar;                  // Typically a file name or NULL
-    pszAlias         : pChar;                  // Optional device alias
-  end;
-  pmci_Open_Parms = ^mci_Open_Parms;
-
-      //*********************************************************/
-      // parameters for the AMP MCI_OPEN message                */
-      //*********************************************************/
-  mci_Amp_Open_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    usDeviceID       : Integer;                 // Device ID returned to user
-    usReserved0      : Integer;                 // Reserved field
-    pszDeviceType    : pChar;                  // Device name from SYSTEM.INI
-    pszElementName   : pChar;                  // Typically a file name or NULL
-    pszAlias         : pChar;                  // Optional device alias
-    pDevDataPtr      : Pointer;                // Pointer to device data
-  end;
-  pmci_Amp_Open_Parms = ^mci_Amp_Open_Parms;
-
-      //*********************************************************/
-      // parameters for MCI_OPEN message for video devices      */
-      //*********************************************************/
-
-  mci_Vid_Open_Parms = record
-    hwndCallback     : hwnd;                   // PM window handle for MCI notify message
-    usDeviceID       : Integer;                 // Device ID returned to user
-    usReserved0      : Integer;                 // Reserved field
-    pszDeviceType    : pChar;                  // Device name from SYSTEM.INI
-    pszElementName   : pChar;                  // Typically a file name or NULL
-    pszAlias         : pChar;                  // Optional device alias
-    hwndParent       : hwnd;                   // Parent window handle
-  end;
-  pmci_Vid_Open_Parms = ^mci_Vid_Open_Parms;
-
-  mci_dgv_Open_Parms   = mci_Vid_Open_Parms;
-  pmci_dgv_Open_Parms  = ^mci_dgv_Open_Parms;
-
-  mci_Ovly_Open_Parms  = mci_Vid_Open_Parms;
-  pmci_Ovly_Open_Parms = ^mci_Ovly_Open_Parms;
-
-      //**************************************************/
-      // MCI_PLAY flag values for videodisc              */
-      //**************************************************/
-CONST
-  MCI_VD_PLAY_REVERSE           = $00001000;
-  MCI_VD_PLAY_FAST              = $00002000;
-  MCI_VD_PLAY_SPEED             = $00004000;
-  MCI_VD_PLAY_SCAN              = $00008000;
-  MCI_VD_PLAY_SLOW              = $00010000;
-
-      //**************************************************/
-      // MCI_PLAY flag values for digital video          */
-      //**************************************************/
-  MCI_DGV_PLAY_REVERSE          = $00001000;
-  MCI_DGV_PLAY_FAST             = $00002000;
-  MCI_DGV_PLAY_SPEED            = $00004000;
-  MCI_DGV_PLAY_SCAN             = $00008000;
-  MCI_DGV_PLAY_SLOW             = $00010000;
-  MCI_DGV_PLAY_REPEAT           = $00020000;
-
-type
-  mci_Play_Parms = record
-    hwndCallback      : hwnd;
-    ulFrom            : LongInt;
-    ulTo              : LongInt;
-  end;
-  pmci_Play_Parms = ^mci_Play_Parms;
-
-  mci_VD_Play_Parms = record
-    hwndCallback      : hwnd;
-    ulFrom            : LongInt;
-    ulTo              : LongInt;
-    ulFactor          : LongInt;
-  end;
-  pmci_VD_Play_Parms = ^mci_VD_Play_Parms;
-
-  mci_DGV_play_Parms = record
-    hwndCallback      : hwnd;
-    ulFrom            : LongInt;
-    ulTo              : LongInt;
-    ulSpeed           : LongInt;
-  end;
-  pmci_DGV_play_Parms = ^mci_DGV_play_Parms;
-
-      //********************************************************************/
-      // parameters for the MCI_PUT  message                               */
-      //     0x00000X00 are reserved for MCI_PUT  flags                    */
-      //********************************************************************/
-CONST
-  MCI_VID_PUT_RECT              = $00000100;
-  MCI_VID_PUT_DESTINATION       = $00000200;
-  MCI_VID_PUT_SOURCE            = $00000400;
-  MCI_VID_PUT_WINDOW_MOVE       = $00000800;
-  MCI_VID_PUT_WINDOW_SIZE       = $00001000;
-
-  MCI_DGV_PUT_RECT              = MCI_VID_PUT_RECT;
-  MCI_DGV_PUT_DESTINATION       = MCI_VID_PUT_DESTINATION;
-  MCI_DGV_PUT_SOURCE            = MCI_VID_PUT_SOURCE;
-  MCI_DGV_PUT_WINDOW_MOVE       = MCI_VID_PUT_WINDOW_MOVE;
-  MCI_DGV_PUT_WINDOW_SIZE       = MCI_VID_PUT_WINDOW_SIZE;
-  MCI_DGV_MONITOR               = $00010000;
-  MCI_DGV_RECORD                = $00020000;
-
-  MCI_OVLY_PUT_RECT             = MCI_VID_PUT_RECT;
-  MCI_OVLY_PUT_DESTINATION      = MCI_VID_PUT_DESTINATION;
-  MCI_OVLY_PUT_SOURCE           = MCI_VID_PUT_SOURCE;
-  MCI_OVLY_PUT_WINDOW_MOVE      = MCI_VID_PUT_WINDOW_MOVE;
-  MCI_OVLY_PUT_WINDOW_SIZE      = MCI_VID_PUT_WINDOW_SIZE;
-
-      //**************************************************/
-      // Rectangle parameters for MCI_PUT, MCI_WHERE,    */
-      // MCI_FREEZE, and MCI_UNFREEZE                    */
-      //**************************************************/
-
-type
-  mci_Vid_Rect_Parms = record
-    hwndCallback      : hwnd;                  // PM window handle for MCI notify message
-    rc                : RectL;                 // rectangle array specifying the offset
-                                               // and size of a rectangle
-  end;
-
-  mci_Dgv_Rect_Parms            = mci_Vid_Rect_Parms;
-  pmci_Dgv_Rect_Parms           = ^mci_Dgv_Rect_Parms;
-
-  mci_Ovly_Rect_Parms           = mci_Vid_Rect_Parms;
-  pmci_Ovly_Rect_Parms          = ^mci_Ovly_Rect_Parms;
-
-      //********************************************************************/
-      // parameters for the MCI_RECORD message                             */
-      //     0x00000X00 are reserved for MCI_RECORD flags                  */
-      //********************************************************************/
-CONST
-  MCI_RECORD_INSERT             = $00000100;
-  MCI_RECORD_OVERWRITE          = $00000200;
-
-  MCI_DGV_RECORD_RECT           = $00000400;
-
-type
-  mci_Record_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulFrom                      : LongInt;       // Record from position
-    ulTo                        : LongInt;       // Record to position
-  end;
-  pmci_Record_Parms = ^mci_Record_Parms;
-
-      //********************************************************************/
-      // parameters for the MCI_RELEASEDEVICE message                      */
-      //     0xXXXXXX00 are reserved for MCI_RELEASEDEVICE message         */
-      //********************************************************************/
-CONST
-  MCI_RETURN_RESOURCE           = $00000100;
-
-      //********************************************************************/
-      // parameters for the MCI_RESTORE message                            */
-      //     0x0000XX00 are reserved for MCI_RESTORE flags                 */
-      //     MCI_CONVERT is defined by MCI_CAPTURE message as 0x00001000L  */
-      //********************************************************************/
-  MCI_RESTORE_SRC_RECT          = $00000100;
-  MCI_RESTORE_DEST_RECT         = $00000200;
-
-type  mci_Restore_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    SrcRect                     : RectL;       // Rectangle array specifying the source
-                                               // area to be restored
-    RestRect                    : RectL;       // Rectangle array specifying the destination
-                                               // area to be restored
-  end;
-  pmci_Restore_Parms = ^mci_Restore_Parms;
-
-      //********************************************************************/
-      // parameters for the MCI_SAVE  message                              */
-      //     0x00000X00 are reserved for MCI_SAVE  flags                   */
-      //********************************************************************/
-const
-  MCI_SAVE_FILE                 = $00000100;
-
-      //************************************************/
-      // Digital Video               MCI_SAVE          */
-      //************************************************/
-
-  MCI_DGV_SAVE_VIDEO_FILE       = $00001000;
-  MCI_DGV_SAVE_IMAGE_FILE       = $00002000;
-
-type
-  mci_Save_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    pszFileName                 : pChar;       // Filename to save data to
-  end;
-  pmci_Save_Parms = ^mci_Save_Parms;
-
-      //********************************************************************/
-      // parameters for the MCI_SEEK message                               */
-      //     0x00000X00 are reserved for MCI_SEEK flags                    */
-      //********************************************************************/
-const
-  MCI_TO_START                  = $00000100;
-  MCI_TO_END                    = $00000200;
-
-      //************************************************/
-      // Digital Video               MCI_SEEK          */
-      //************************************************/
-
-  MCI_DGV_SEEK_TO_NEAREST_IFRAME = $00100000;
-
-      //************************************************/
-      // Videodisc                   MCI_SEEK          */
-      //************************************************/
-  MCI_VD_SEEK_REVERSE           = $00001000;
-
-type
-  mci_Seek_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulTo                        : LongInt;       // Seek to this position
-  end;
-  pmci_Seek_Parms = ^mci_Seek_Parms;
-
-      //********************************************************************/
-      // Flags for the MCI_SET message                                     */
-      //     0x00XXXX00 are reserved for MCI_SET  flags                    */
-      //********************************************************************/
-const
-  MCI_SET_ITEM                  = $00000100;
-  MCI_SET_ON                    = $00000200;
-  MCI_SET_OFF                   = $00000400;
-  MCI_SET_VIDEO                 = $00000800;
-  MCI_SET_AUDIO                 = $00001000;
-  MCI_SET_DOOR_OPEN             = $00002000;
-  MCI_SET_DOOR_CLOSED           = $00004000;
-  MCI_SET_SPEED_FORMAT          = $00008000;
-  MCI_SET_TIME_FORMAT           = $00010000;
-  MCI_SET_DOOR_LOCK             = $00020000;
-  MCI_SET_DOOR_UNLOCK           = $00040000;
-  MCI_SET_VOLUME                = $00080000;
-  MCI_SET_ITEM_FOURCC           = $00100000;
-  MCI_SET_REVERSE               = $00200000;
-
-      //******************************************************/
-      // Values for the ulAudio field                        */
-      //******************************************************/
-  MCI_SET_AUDIO_ALL             = $00000000;
-  MCI_SET_AUDIO_LEFT            = $00000001;
-  MCI_SET_AUDIO_RIGHT           = $00000002;
-
-
-
-
-      //******************************************************/
-      // MCI_SET flags for CDXA                              */
-      //******************************************************/
-  MCI_CDXA_SET_CHANNEL          = $01000000;
-  MCI_CDXA_AUDIO_DEVICE         = $10000000;
-  MCI_CDXA_AUDIO_BUFFER         = $02000000;
-  MCI_CDXA_VIDEO_BUFFER         = $04000000;
-  MCI_CDXA_DATA_BUFFER          = $08000000;
-
-      //******************************************************/
-      // MCI_SET flags for videodisc                         */
-      //******************************************************/
-  MCI_VD_SET_ON                 = MCI_SET_ON;
-  MCI_VD_SET_OFF                = MCI_SET_OFF;
-  MCI_VD_SET_VIDEO              = MCI_SET_VIDEO;
-  MCI_VD_SET_CHANNEL            = $00100000;
-  MCI_VD_SET_DISPLAY            = $00200000;
-  MCI_VD_SET_DONTCARE           = $00400000;   // Dont care!
-
-      //******************************************************/
-      // Generic MCI_SET item values for video devices       */
-      //******************************************************/
-  MCI_VID_SET_VIDEO_COMPRESSION = MCI_VID_ITEM_BASE;
-  MCI_VID_SET_IMAGE_COMPRESSION = MCI_VID_ITEM_BASE+1;
-  MCI_VID_SET_IMAGE_BITSPERPEL  = MCI_VID_ITEM_BASE+2;
-  MCI_VID_SET_IMAGE_PELFORMAT   = MCI_VID_ITEM_BASE+3;
-  MCI_VID_SET_BRIGHTNESS        = MCI_VID_ITEM_BASE+4;
-  MCI_VID_SET_CONTRAST          = MCI_VID_ITEM_BASE+5;
-  MCI_VID_SET_HUE               = MCI_VID_ITEM_BASE+6;
-  MCI_VID_SET_SATURATION        = MCI_VID_ITEM_BASE+7;
-  MCI_VID_SET_SHARPNESS         = MCI_VID_ITEM_BASE+8;
-  MCI_VID_SET_GREYSCALE         = MCI_VID_ITEM_BASE+9;
-  MCI_VID_SET_IMAGE_QUALITY     = MCI_VID_ITEM_BASE+10;
-  MCI_VID_SET_VIDEO_QUALITY     = MCI_VID_ITEM_BASE+11;
-  MCI_VID_SET_IMAGE_COMPRESSION_METHOD = MCI_VID_ITEM_BASE+12;
-  MCI_VID_SET_MINIMUM_VIDEO_REFRESH_RATE = MCI_VID_ITEM_BASE+13;
-  MCI_VID_SET_IMAGE_FILE_FORMAT = MCI_VID_ITEM_BASE+14;
-  MCI_VID_SET_REF_INTERVAL      = MCI_VID_ITEM_BASE+15;
-  MCI_VID_SET_MAXDATARATE       = MCI_VID_ITEM_BASE+16;
-  MCI_VID_SET_VIDEO_FILE_FORMAT = MCI_VID_ITEM_BASE+17;
-
-      //******************************************************/
-      // MCI_SET item values for video overlay               */
-      //******************************************************/
-  MCI_OVLY_SET_IMAGE_COMPRESSION = MCI_VID_SET_IMAGE_COMPRESSION;
-  MCI_OVLY_SET_IMAGE_BITSPERPEL = MCI_VID_SET_IMAGE_BITSPERPEL;
-  MCI_OVLY_SET_IMAGE_PELFORMAT  = MCI_VID_SET_IMAGE_PELFORMAT;
-  MCI_OVLY_SET_BRIGHTNESS       = MCI_VID_SET_BRIGHTNESS;
-  MCI_OVLY_SET_CONTRAST         = MCI_VID_SET_CONTRAST;
-  MCI_OVLY_SET_HUE              = MCI_VID_SET_HUE;
-  MCI_OVLY_SET_SATURATION       = MCI_VID_SET_SATURATION;
-  MCI_OVLY_SET_SHARPNESS        = MCI_VID_SET_SHARPNESS;
-  MCI_OVLY_SET_GREYSCALE        = MCI_VID_SET_GREYSCALE;
-  MCI_OVLY_SET_IMAGE_QUALITY    = MCI_VID_SET_IMAGE_QUALITY;
-  MCI_OVLY_SET_IMAGE_COMPRESSION_METHOD = MCI_VID_SET_IMAGE_COMPRESSION_METHOD;
-  MCI_OVLY_SET_MINIMUM_VIDEO_REFRESH_RATE = MCI_VID_SET_MINIMUM_VIDEO_REFRESH_RATE;
-  MCI_OVLY_SET_IMAGE_FILE_FORMAT = MCI_VID_SET_IMAGE_FILE_FORMAT;
-
-      //******************************************************/
-      // MCI_SET item values for digital video               */
-      //******************************************************/
-  MCI_DGV_SET_VIDEO_COMPRESSION = MCI_VID_SET_VIDEO_COMPRESSION;
-  MCI_DGV_SET_IMAGE_COMPRESSION = MCI_VID_SET_IMAGE_COMPRESSION;
-  MCI_DGV_SET_IMAGE_BITSPERPEL  = MCI_VID_SET_IMAGE_BITSPERPEL;
-  MCI_DGV_SET_IMAGE_PELFORMAT   = MCI_VID_SET_IMAGE_PELFORMAT;
-  MCI_DGV_SET_BRIGHTNESS        = MCI_VID_SET_BRIGHTNESS;
-  MCI_DGV_SET_CONTRAST          = MCI_VID_SET_CONTRAST;
-  MCI_DGV_SET_HUE               = MCI_VID_SET_HUE;
-  MCI_DGV_SET_SATURATION        = MCI_VID_SET_SATURATION;
-  MCI_DGV_SET_SHARPNESS         = MCI_VID_SET_SHARPNESS;
-  MCI_DGV_SET_GREYSCALE         = MCI_VID_SET_GREYSCALE;
-  MCI_DGV_SET_IMAGE_QUALITY     = MCI_VID_SET_IMAGE_QUALITY;
-  MCI_DGV_SET_VIDEO_QUALITY     = MCI_VID_SET_VIDEO_QUALITY;
-  MCI_DGV_SET_IMAGE_COMPRESSION_METHOD = MCI_VID_SET_IMAGE_COMPRESSION_METHOD;
-  MCI_DGV_SET_MONITOR           = MCI_SET_MONITOR;
-  MCI_DGV_SET_MINIMUM_VIDEO_REFRESH_RATE = MCI_VID_SET_MINIMUM_VIDEO_REFRESH_RATE;
-  MCI_DGV_SET_IMAGE_FILE_FORMAT = MCI_VID_SET_IMAGE_FILE_FORMAT;
-  MCI_DGV_SET_REF_INTERVAL      = MCI_VID_SET_REF_INTERVAL;
-  MCI_DGV_SET_MAXDATARATE       = MCI_VID_SET_MAXDATARATE;
-  MCI_DGV_SET_VIDEO_FILE_FORMAT = MCI_VID_SET_VIDEO_FILE_FORMAT;
-
-  MCI_DGV_SET_AUDIO_COMPRESSION = MCI_DGV_ITEM_BASE;
-  MCI_DGV_SET_AUDIO_QUALITY     = MCI_DGV_ITEM_BASE+1;
-  MCI_DGV_SET_CHANNELS          = MCI_DGV_ITEM_BASE+2;
-  MCI_DGV_SET_BITSPERSAMPLE     = MCI_DGV_ITEM_BASE+3;
-  MCI_DGV_SET_SAMPLESPERSEC     = MCI_DGV_ITEM_BASE+4;
-  MCI_DGV_SET_FORMATTAG         = MCI_DGV_ITEM_BASE+5;
-  MCI_DGV_SET_BLOCKALIGN        = MCI_DGV_ITEM_BASE+6;
-  MCI_DGV_SET_AVGBYTESPERSEC    = MCI_DGV_ITEM_BASE+7;
-
-  MCI_DGV_SET_VIDEO_COMPRESSION_SUBTYPE = MCI_DGV_ITEM_BASE+8;
-  MCI_DGV_SET_VIDEO_RECORD_RATE = MCI_DGV_ITEM_BASE+9;
-  MCI_DGV_SET_VIDEO_RECORD_FRAME_DURATION = MCI_DGV_ITEM_BASE+10;
-  MCI_DGV_SET_RECORD_AUDIO      = MCI_DGV_ITEM_BASE+11;
-  MCI_DGV_SET_TRANSPARENT_COLOR = MCI_DGV_ITEM_BASE+12;
-  MCI_DGV_SET_GRAPHIC_TRANSPARENT_COLOR = MCI_DGV_ITEM_BASE+12;
-  MCI_DGV_SET_AUDIOSYNC         = MCI_DGV_ITEM_BASE+13;
-  MCI_DGV_SET_VIDEO_TRANSPARENT_COLOR = MCI_DGV_ITEM_BASE+14;
-
-      //******************************************************/
-      // Video file format                                   */
-      //******************************************************/
-  MCI_VID_FILE_FORMAT_AVI       = $20495641;
-
-      //******************************************************/
-      // Audio/video/image compression types                 */
-      //******************************************************/
-  MCI_AUD_COMP_ADPCM4           = $00000001;
-  MCI_AUD_COMP_PCM8             = $00000002;
-
-  MCI_VID_COMP_RTV_2_0          = $00000101;
-  MCI_VID_COMP_RTV_2_1          = $00000102;
-  MCI_VID_COMP_ULTI             = $49544C55;
-  MCI_VID_COMP_RT21             = $31325452;
-  MCI_VID_COMP_NONE             = $20424944;   // This is 'DIB ' now.
-
-  MCI_IMG_COMP_NONE             = $00000201;
-  MCI_IMG_COMP_PIC9_1_0         = $00000202;
-  MCI_IMG_COMP_PIC16_1_0        = $00000203;
-  MCI_IMG_COMP_JPEG9            = $00000204;
-  MCI_IMG_COMP_JPEG9_1_0        = MCI_IMG_COMP_JPEG9;
-  MCI_IMG_COMP_BMP_RLE4         = $00000205;
-  MCI_IMG_COMP_BMP_RLE8         = $00000206;
-  MCI_IMG_COMP_JPEGN            = $00000207;
-
-      //******************************************************/
-      // PEL Formats (video/image)                           */
-      //******************************************************/
-  MCI_VID_PALETTE               = $00000001;
-  MCI_VID_RGB                   = $00000002;
-  MCI_VID_YUV                   = $00000003;
-
-  MCI_IMG_PALETTE               = MCI_VID_PALETTE;
-  MCI_IMG_RGB                   = MCI_VID_RGB;
-  MCI_IMG_YUV                   = MCI_VID_YUV;
-
-
-      //******************************************************/
-      // Audio/video/image quality levels                    */
-      //******************************************************/
-  MCI_AUD_QUALITY_HIGH          = $00000001;
-  MCI_AUD_QUALITY_MED           = $00000002;
-  MCI_AUD_QUALITY_LOW           = $00000003;
-
-  MCI_VID_QUALITY_HIGH          = $00000101;
-  MCI_VID_QUALITY_MED           = $00000102;
-  MCI_VID_QUALITY_LOW           = $00000103;
-  MCI_VID_QUALITY_BEST          = MCI_VID_QUALITY_HIGH;
-  MCI_VID_QUALITY_CDROM         = MCI_VID_QUALITY_MED;
-  MCI_VID_QUALITY_COMPACT       = MCI_VID_QUALITY_LOW;
-  MCI_VID_QUALITY_BETTER        = MCI_VID_QUALITY_MED;
-  MCI_VID_QUALITY_GOOD          = MCI_VID_QUALITY_LOW;
-
-  MCI_IMG_QUALITY_HIGH          = $00000201;
-  MCI_IMG_QUALITY_MED           = $00000202;
-  MCI_IMG_QUALITY_LOW           = $00000203;
-
-      //******************************************************/
-      // MCI_SET flags for wave audio                        */
-      //******************************************************/
-  MCI_WAVE_SET_SAMPLESPERSEC    = $01000000;
-  MCI_WAVE_SET_AVGBYTESPERSEC   = $02000000;
-  MCI_WAVE_SET_BLOCKALIGN       = $04000000;
-  MCI_WAVE_SET_FORMATTAG        = $08000000;
-  MCI_WAVE_SET_CHANNELS         = $10000000;
-  MCI_WAVE_SET_BITSPERSAMPLE    = $80000000;
-
-      //******************************************************/
-      // Wave format tag defines                             */
-      //******************************************************/
-  MCI_WAVE_FORMAT_PCM           = DATATYPE_WAVEFORM;
-  MCI_WAVE_FORMAT_ADPCM         = $0002;
-  MCI_WAVE_FORMAT_IBM_CVSD      = $0005;
-  MCI_WAVE_FORMAT_ALAW          = DATATYPE_RIFF_ALAW;
-  MCI_WAVE_FORMAT_MULAW         = DATATYPE_RIFF_MULAW;
-  MCI_WAVE_FORMAT_OKI_ADPCM     = $0010;
-  MCI_WAVE_FORMAT_DVI_ADPCM     = $0011;
-  MCI_WAVE_FORMAT_DIGISTD       = $0015;
-  MCI_WAVE_FORMAT_DIGIFIX       = $0016;
-  MCI_WAVE_FORMAT_AVC_ADPCM     = DATATYPE_ADPCM_AVC;
-  MCI_WAVE_FORMAT_IBM_ADPCM     = DATATYPE_ADPCM_AVC;
-  MCI_WAVE_FORMAT_IBM_MULAW     = DATATYPE_MULAW;
-  MCI_WAVE_FORMAT_IBM_ALAW      = DATATYPE_ALAW;
-  MCI_WAVE_FORMAT_CT_ADPCM      = DATATYPE_CT_ADPCM;
-  MCI_WAVE_FORMAT_MPEG1         = DATATYPE_MPEG1AUDIO;
-
-      //******************************************************/
-      // MCI_SET flags for sequencer                         */
-      //******************************************************/
-  MCI_SEQ_SET_TEMPO             = $00100000;
-  MCI_SEQ_SET_PORT              = $00200000;
-  MCI_SEQ_ENABLE_PORT_MAPPER    = $00400000;
-  MCI_SEQ_DISABLE_PORT_MAPPER   = $00800000;
-  MCI_SEQ_SET_OFFSET            = $01000000;
-  MCI_SEQ_SET_MASTER            = $02000000;
-  MCI_SEQ_SET_SLAVE             = $04000000;
-
-      //*********************************************/
-      // SEQ time formats                           */
-      //*********************************************/
-  MCI_SEQ_SET_SMPTE_24          = $00000100;
-  MCI_SEQ_SET_SMPTE_25          = $00000200;
-  MCI_SEQ_SET_SMPTE_30          = $00000300;
-  MCI_SEQ_SET_SMPTE_30DROP      = $00000400;
-  MCI_SEQ_SET_SONGPTR           = $00000500;
-
-      //*********************************************/
-      // SEQ synchronization types                  */
-      //*********************************************/
-  MCI_SEQ_MIDI                  = $00000001;
-  MCI_SEQ_SMPTE                 = $00000002;
-  MCI_SEQ_FILE                  = $00000003;
-  MCI_SEQ_NONE                  = $00000004;
-
-      //*********************************************/
-      // SEQ PORT TYPES                             */
-      //*********************************************/
-  MCI_SET_NONE                  = $10000000;
-  MIDI_MAPPER                   = $20000000;
-  MCI_MIDI_MAPPER               = MIDI_MAPPER;
-
-type
-  mci_Set_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulTimeFormat                : Longint;       // Time format to be used by the device
-    ulSpeedFormat               : Longint;       // Speed format used by this device
-    ulAudio                     : Longint;       // Channel number for this operation
-                                               // (MCI_SET_AUDIO_LEFT, MCI_SET_AUDIO_RIGHT,
-                                               //  MCI_SET_AUDIO_ALL)
-    ulLevel                     : Longint;       // Volume, treble or bass level as % of max.
-    ulOver                      : Longint;       // Delay time for vectored change in millisecond
-    ulItem                      : Longint;       // Item field for set item flags
-    ulValue                     : Longint;       // Value associated with item flag
-  end;
-  pmci_Set_Parms = ^mci_Set_Parms;
-
-  mci_Amp_Set_Parms            = mci_Set_Parms;
-  pmci_Amp_Set_Parms           = ^mci_Amp_Set_Parms;
-
-  mci_DGV_Set_Parms            = mci_Set_Parms;
-  pmci_DGV_Set_Parms           = ^mci_DGV_Set_Parms;
-
-  mci_Ovly_Set_Parms           = mci_Set_Parms;
-  pmci_Ovly_Set_Parms          = ^mci_Ovly_Set_Parms;
-
-
-  mci_CDXA_Set_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulTimeFormat                : Longint;       // Time format to be used by the device
-    ulSpeedFormat               : Longint;       // Speed format used by this device
-    ulAudio                     : Longint;       // Channel number for this operation
-                                               // (MCI_SET_AUDIO_LEFT, MCI_SET_AUDIO_RIGHT,
-                                               //  MCI_SET_AUDIO_ALL)
-    ulLevel                     : Longint;       // Volume, treble or bass level as % of max.
-    ulOver                      : Longint;       // Delay time for vectored change in milliseconds
-    ulItem                      : Longint;       // Item field for set item flags
-    ulValue                     : Longint;       // Value associated with item flag
-    ulChannel                   : Longint;       // Channel number
-    pPlayList                   : Pointer;     // Pointer to play list
-    ulPlayListSize              : Longint;       // Play list size
-  end;
-  pmci_CDXA_Set_Parms = ^mci_CDXA_Set_Parms;
-
-  mci_VD_Set_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulTimeFormat                : LongInt;       // Time format to be used by the device
-    ulSpeedFormat               : LongInt;       // Speed format used by this device
-    ulAudio                     : LongInt;       // Channel number for this operation
-                                               // (MCI_SET_AUDIO_LEFT, MCI_SET_AUDIO_RIGHT,
-                                               //  MCI_SET_AUDIO_ALL)
-    ulLevel                     : LongInt;       // Volume, treble or bass level as % of max.
-    ulOver                      : LongInt;       // Delay time for vectored change in milliseconds
-    ulItem                      : LongInt;       // Item field for set item flags
-    ulValue                     : LongInt;       // Value associated with item flag
-    ulChannel                   : LongInt;       // Videodisc channel
-  end;
-  pmci_VD_Set_Parms = ^mci_VD_Set_Parms;
-
-  mci_Wave_Set_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulTimeFormat                : Longint;       // Time format to be used by the device
-    ulSpeedFormat               : Longint;       // Speed format used by this device
-    ulAudio                     : Longint;       // Channel number for this operation
-                                               // (MCI_SET_AUDIO_LEFT, MCI_SET_AUDIO_RIGHT,
-                                               //  MCI_SET_AUDIO_ALL)
-    ulLevel                     : Longint;       // Volume, trebble or bass level as % of max.
-    ulOver                      : Longint;       // Delay time for vectored change in milliseconds
-    ulItem                      : Longint;       // Item field for set item flags
-    ulValue                     : Longint;       // Value associated with item flag
-    usInput                     : Integer;      // Channel for input
-    usReserved0                 : Integer;      // Reserved field
-    usOutput                    : Integer;      // Channel for output
-    usReserved1                 : Integer;      // Reserved field
-    usFormatTag                 : Integer;      // Format tag
-    usReserved2                 : Integer;      // Reserved field
-    usChannels                  : Integer;      // mono(1) or stereo(2)
-    usReserved3                 : Integer;      // Reserved field
-    ulSamplesPerSec             : Longint;       // Samples per seconds
-    ulAvgBytesPerSec            : LongInt;       // Bytes per seconds
-    usBlockAlign                : Integer;      // Block alignment of data
-    usReserved4                 : Integer;      // Reserved field
-    usBitsPerSample             : Integer;      // Bits per seconds
-    usReserved5                 : Integer;      // Reserved field
-  end;
-  pmci_Wave_Set_Parms = ^mci_Wave_Set_Parms;
-
-  mci_Seq_Set_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulTimeFormat                : Longint;       // Time format to be used by the device
-    ulSpeedFormat               : Longint;       // Speed format used by this device
-    ulAudio                     : Longint;       // Channel number for this operation
-                                               // (MCI_SET_AUDIO_LEFT, MCI_SET_AUDIO_RIGHT,
-                                               //  MCI_SET_AUDIO_ALL)
-    ulLevel                     : Longint;       // Volume, trebble or bass level as % of max.
-    ulOver                      : Longint;       // Delay time for vectored change in millisecond
-    ulItem                      : Longint;       // Item field for set item flags
-    ulValue                     : Longint;       // Value associated with item flag
-    ulTempo                     : Longint;       // Specified the tempo
-    ulPort                      : Longint;       // Output port
-    ulSlave                     : Longint;       // Unused field
-    ulMaster                    : Longint;       // Unused field
-    ulOffset                    : Longint;       // Specified the data offset
-  end;
-  pmci_Seq_Set_Parms = ^mci_Seq_Set_Parms;
-
-
-      //********************************************************************/
-      // parameters for the MCI_SET_CUEPOINT message                       */
-      //     0x00000x00 are reserved for MCI_SET_CUEPOINT flags            */
-      //********************************************************************/
-CONST
-  MCI_SET_CUEPOINT_ON           = $00000100;
-  MCI_SET_CUEPOINT_OFF          = $00000200;
-
-type
-  mci_CuePoint_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulCuepoint                  : Longint;       // Specifies the cuepoint location
-    usUserParm                  : Integer;      // User parmameter returned on cuepoint
-                                               // notify message
-    usReserved0                 : Integer;      // Reserved field
-  end;
-  pmci_CuePoint_Parms = ^mci_CuePoint_Parms;
-
-      //********************************************************************/
-      // parameters for the MCI_SETIMAGEPALETTE message                    */
-      //     0x000XXX00 are reserved for MCI_SETIMAGEPALETTE flags         */
-      //********************************************************************/
-CONST
-  MCI_SET_REGISTERED            = $00000100;
-
-      //********************************************************************/
-      // flags and parameter structure for the MCI_SET_POSITION_ADVISE msg */
-      //     0x00000X00 are reserved for MCI_SET_POSITION_ADVISE flags     */
-      //********************************************************************/
-  MCI_SET_POSITION_ADVISE_ON    = $00000100;
-  MCI_SET_POSITION_ADVISE_OFF   = $00000200;
-
-type
-  mci_Position_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulUnits                     : Longint;       // Specifies position change notifiication
-                                               // granularity
-    usUserParm                  : Integer;      // User parameter returned on position change
-                                               // notification message.
-    Reserved0                   : Integer;      // Reserved field
-    Reserved1                   : LongInt;       // Reserved field
-  end;
-  pmci_Position_Parms = ^mci_Position_Parms;
-
-      //********************************************************************/
-      // parameter structure for the MCI_SET_SYNC_OFFSET message           */
-      //********************************************************************/
-  mci_Sync_Offset_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulOffset                    : LongInt;       // Specifies the device media position offset
-                                               // in the currently specified device units.
-  end;
-  pmci_Sync_Offset_Parms = ^mci_Sync_Offset_Parms;
-
-      //********************************************************************/
-      // flags for the MCI_SPIN message                                    */
-      //     0x00000X00 are reserved for MCI_SPIN flags                    */
-      //********************************************************************/
-CONST
-  MCI_SPIN_UP                   = $00000100;
-  MCI_SPIN_DOWN                 = $00000200;
-
-      //********************************************************************/
-      // MCI_STATUS message flags                                          */
-      //     0x000XXX00 are reserved for MCI_STATUS flags                  */
-      //     MCI_VOLUME and MCI_VOLUME_DELAY are 0x00000100 and 0x00000200 */
-      //********************************************************************/
-  MCI_STATUS_ITEM               = $00000100;
-  MCI_STATUS_START              = $00000200;
-  MCI_STATUS_CONNECTOR          = $00000400;
-
-      //************************************************/
-      // General MCI_STATUS item values                */
-      //************************************************/
-  MCI_STATUS_CURRENT_TRACK      = $00000001;
-  MCI_STATUS_LENGTH             = $00000002;
-  MCI_STATUS_MODE               = $00000003;
-  MCI_STATUS_NUMBER_OF_TRACKS   = $00000004;
-  MCI_STATUS_POSITION           = $00000005;
-  MCI_STATUS_POSITION_IN_TRACK  = $00000006;
-  MCI_STATUS_MEDIA_PRESENT      = $00000007;
-  MCI_STATUS_VOLUME             = $00000008;
-  MCI_STATUS_READY              = $00000009;
-  MCI_STATUS_TIME_FORMAT        = $0000000A;
-  MCI_STATUS_SPEED_FORMAT       = $0000000B;
-  MCI_STATUS_MONITOR            = $0000000C;
-  MCI_STATUS_AUDIO              = $0000000D;
-  MCI_STATUS_VIDEO              = $0000000E;
-  MCI_STATUS_CLIPBOARD          = $0000000F;
-  MCI_STATUS_CAN_PASTE          = $00000010;
-  MCI_STATUS_CAN_REDO           = $00000020;
-  MCI_STATUS_CAN_UNDO           = $00000030;
-
-      //************************************************/
-      // ulValue field values for MCI_STATUS_AUDIO     */
-      //************************************************/
-  MCI_STATUS_AUDIO_ALL          = $00000000;
-  MCI_STATUS_AUDIO_LEFT         = $00000001;
-  MCI_STATUS_AUDIO_RIGHT        = $00000002;
-
-      //************************************************/
-      // MCI_STATUS item values for amp/mixer          */
-      //************************************************/
-  MCI_AMP_STATUS_PITCH          = MCI_AMP_ITEM_BASE;
-  MCI_AMP_STATUS_TREBLE         = MCI_AMP_ITEM_BASE+1;
-  MCI_AMP_STATUS_BASS           = MCI_AMP_ITEM_BASE+2;
-  MCI_AMP_STATUS_BALANCE        = MCI_AMP_ITEM_BASE+3;
-  MCI_AMP_STATUS_GAIN           = MCI_AMP_ITEM_BASE+4;
-  MCI_AMP_STATUS_MONITOR        = MCI_AMP_ITEM_BASE+5;
-  MCI_AMP_STATUS_MID            = MCI_AMP_ITEM_BASE+6;
-  MCI_AMP_STATUS_VOLUME         = MCI_STATUS_VOLUME;
-  MCI_AMP_STATUS_LOUDNESS       = MCI_AMP_ITEM_BASE+7;
-  MCI_AMP_STATUS_CROSSOVER      = MCI_AMP_ITEM_BASE+8;
-  MCI_AMP_STATUS_REVERB         = MCI_AMP_ITEM_BASE+9;
-  MCI_AMP_STATUS_ALC            = MCI_AMP_ITEM_BASE+10;
-  MCI_AMP_STATUS_CHORUS         = MCI_AMP_ITEM_BASE+11;
-  MCI_AMP_STATUS_CUSTOM1        = MCI_AMP_ITEM_BASE+12;
-  MCI_AMP_STATUS_CUSTOM2        = MCI_AMP_ITEM_BASE+13;
-  MCI_AMP_STATUS_CUSTOM3        = MCI_AMP_ITEM_BASE+14;
-  MCI_AMP_STATUS_MUTE           = MCI_AMP_ITEM_BASE+15;
-  MCI_AMP_STATUS_STEREOENHANCE  = MCI_AMP_ITEM_BASE+16;
-
-
-      //************************************************/
-      // MCI_STATUS item values for cd audio           */
-      //************************************************/
-  MCI_CD_STATUS_TRACK_TYPE      = MCI_CD_ITEM_BASE;
-  MCI_CD_STATUS_TRACK_COPYPERMITTED = MCI_CD_ITEM_BASE+1;
-  MCI_CD_STATUS_TRACK_CHANNELS  = MCI_CD_ITEM_BASE+2;
-  MCI_CD_STATUS_TRACK_PREEMPHASIS = MCI_CD_ITEM_BASE+3;
-
-      //***********************************************/
-      // return values for CD MCI_STATUS message with */
-      //   MCI_CD_STATUS_TRACK_TYPE set               */
-      //***********************************************/
-  MCI_CD_TRACK_AUDIO            = $00000001;
-  MCI_CD_TRACK_DATA             = $00000002;
-  MCI_CD_TRACK_OTHER            = $00000003;
-
-      //************************************************/
-      // MCI_STATUS item values for CDXA               */
-      //************************************************/
-  MCI_CDXA_STATUS_CHANNEL       = MCI_CDXA_ITEM_BASE;
-
-      //***********************************************/
-      //returned from call for MCI_CDXA_STATUS_CHANNEL*/
-      //***********************************************/
-  MCI_CDXA_NONE                 = $00000000;
-
-
-      //************************************************/
-      // MCI_STATUS item values for sequencer          */
-      //************************************************/
-  MCI_SEQ_STATUS_TEMPO          = MCI_SEQ_ITEM_BASE;
-  MCI_SEQ_STATUS_OFFSET         = MCI_SEQ_ITEM_BASE+1;
-  MCI_SEQ_STATUS_DIVTYPE        = MCI_SEQ_ITEM_BASE+2;
-  MCI_SEQ_STATUS_MASTER         = MCI_SEQ_ITEM_BASE+3;
-  MCI_SEQ_STATUS_PORT           = MCI_SEQ_ITEM_BASE+4;
-  MCI_SEQ_STATUS_SLAVE          = MCI_SEQ_ITEM_BASE+5;
-
-      //*********************************************/
-      // Return value for current division type     */
-      //*********************************************/
-  MCI_SEQ_DIV_PPQN              = $00000001;
-  MCI_SEQ_DIV_SMPTE_24          = $00000002;
-  MCI_SEQ_DIV_SMPTE_25          = $00000003;
-  MCI_SEQ_DIV_SMPTE_30DROP      = $00000004;
-  MCI_SEQ_DIV_SMPTE_30          = $00000005;
-
-      //************************************************/
-      // MCI_STATUS items for videodisc                */
-      //************************************************/
-  MCI_VD_STATUS_SPEED           = MCI_VD_ITEM_BASE;
-  MCI_VD_STATUS_FORWARD         = MCI_VD_ITEM_BASE+1;
-  MCI_VD_MEDIA_TYPE             = MCI_VD_ITEM_BASE+2;
-  MCI_VD_STATUS_SIDE            = MCI_VD_ITEM_BASE+3;
-  MCI_VD_STATUS_DISC_SIZE       = MCI_VD_ITEM_BASE+4;
-
-      //**********************************************/
-      // return values for videodisc status command  */
-      //**********************************************/
-  MCI_VD_SPEED_NORMAL           = $00000000;
-  MCI_VD_SPEED_FAST             = $00000001;
-  MCI_VD_SPEED_SLOW             = $00000002;
-
-      //************************************************/
-      // MCI_STATUS items for wave audio               */
-      //************************************************/
-  MCI_WAVE_STATUS_LEVEL         = MCI_WAVE_ITEM_BASE;
-  MCI_WAVE_STATUS_SAMPLESPERSEC = MCI_WAVE_ITEM_BASE+1;
-  MCI_WAVE_STATUS_AVGBYTESPERSEC = MCI_WAVE_ITEM_BASE+2;
-  MCI_WAVE_STATUS_BLOCKALIGN    = MCI_WAVE_ITEM_BASE+3;
-  MCI_WAVE_STATUS_FORMATTAG     = MCI_WAVE_ITEM_BASE+4;
-  MCI_WAVE_STATUS_CHANNELS      = MCI_WAVE_ITEM_BASE+5;
-  MCI_WAVE_STATUS_BITSPERSAMPLE = MCI_WAVE_ITEM_BASE+6;
-
-      //************************************************/
-      // Common video MCI_STATUS items                 */
-      //************************************************/
-  MCI_VID_STATUS_hwnd                          = MCI_VID_ITEM_BASE;
-  MCI_VID_STATUS_AUDIO_COMPRESSION             = MCI_VID_ITEM_BASE+1;
-  MCI_VID_STATUS_VIDEO_COMPRESSION             = MCI_VID_ITEM_BASE+2;
-  MCI_VID_STATUS_IMAGE_COMPRESSION             = MCI_VID_ITEM_BASE+3;
-  MCI_VID_STATUS_AUDIO_QUALITY                 = MCI_VID_ITEM_BASE+4;
-  MCI_VID_STATUS_VIDEO_QUALITY                 = MCI_VID_ITEM_BASE+5;
-  MCI_VID_STATUS_IMAGE_QUALITY                 = MCI_VID_ITEM_BASE+6;
-  MCI_VID_STATUS_IMAGE_BITSPERPEL              = MCI_VID_ITEM_BASE+7;
-  MCI_VID_STATUS_IMAGE_PELFORMAT               = MCI_VID_ITEM_BASE+8;
-  MCI_VID_STATUS_FORWARD                       = MCI_VID_ITEM_BASE+9;
-  MCI_VID_STATUS_NORMAL_RATE                   = MCI_VID_ITEM_BASE+10;
-  MCI_VID_STATUS_VIDEO_X_EXTENT                = MCI_VID_ITEM_BASE+11;
-  MCI_VID_STATUS_VIDEO_Y_EXTENT                = MCI_VID_ITEM_BASE+12;
-  MCI_VID_STATUS_IMAGE_X_EXTENT                = MCI_VID_ITEM_BASE+13;
-  MCI_VID_STATUS_IMAGE_Y_EXTENT                = MCI_VID_ITEM_BASE+14;
-  MCI_VID_STATUS_BRIGHTNESS                    = MCI_VID_ITEM_BASE+15;
-  MCI_VID_STATUS_CONTRAST                      = MCI_VID_ITEM_BASE+16;
-  MCI_VID_STATUS_HUE                           = MCI_VID_ITEM_BASE+17;
-  MCI_VID_STATUS_SATURATION                    = MCI_VID_ITEM_BASE+18;
-  MCI_VID_STATUS_GREYSCALE                     = MCI_VID_ITEM_BASE+19;
-  MCI_VID_STATUS_SHARPNESS                     = MCI_VID_ITEM_BASE+20;
-  MCI_VID_STATUS_SPEED                         = MCI_VID_ITEM_BASE+21;
-  MCI_VID_STATUS_IMAGE_FILE_FORMAT             = MCI_VID_ITEM_BASE+22;
-  MCI_VID_STATUS_TRANSPARENT_TYPE              = MCI_VID_ITEM_BASE+23;
-  MCI_VID_STATUS_REF_INTERVAL                  = MCI_VID_ITEM_BASE+24;
-  MCI_VID_STATUS_MAXDATARATE                   = MCI_VID_ITEM_BASE+25;
-  MCI_VID_STATUS_VIDEO_FILE_FORMAT             = MCI_VID_ITEM_BASE+26;
-
-      //************************************************/
-      // Status Transparent Type returns               */
-      // MCI_VID_PALETTE                               */
-      // MCI_VID_RGB                                   */
-      // MCI_VID_YUV                                   */
-      //************************************************/
-  MCI_VID_STATUS_TRANSPARENT_COLOR             = MCI_VID_ITEM_BASE+24;
-
-      //************************************************/
-      // MCI_STATUS items for digital video            */
-      //************************************************/
-  MCI_DGV_STATUS_hwnd                          = MCI_VID_STATUS_hwnd;
-  MCI_DGV_STATUS_AUDIO_COMPRESSION             = MCI_VID_STATUS_AUDIO_COMPRESSION;
-  MCI_DGV_STATUS_VIDEO_COMPRESSION             = MCI_VID_STATUS_VIDEO_COMPRESSION;
-  MCI_DGV_STATUS_IMAGE_COMPRESSION             = MCI_VID_STATUS_IMAGE_COMPRESSION;
-  MCI_DGV_STATUS_AUDIO_QUALITY                 = MCI_VID_STATUS_AUDIO_QUALITY;
-  MCI_DGV_STATUS_VIDEO_QUALITY                 = MCI_VID_STATUS_VIDEO_QUALITY;
-  MCI_DGV_STATUS_IMAGE_QUALITY                 = MCI_VID_STATUS_IMAGE_QUALITY;
-  MCI_DGV_STATUS_IMAGE_BITSPERPEL              = MCI_VID_STATUS_IMAGE_BITSPERPEL;
-  MCI_DGV_STATUS_IMAGE_PELFORMAT               = MCI_VID_STATUS_IMAGE_PELFORMAT;
-  MCI_DGV_STATUS_FORWARD                       = MCI_VID_STATUS_FORWARD;
-  MCI_DGV_STATUS_NORMAL_RATE                   = MCI_VID_STATUS_NORMAL_RATE;
-  MCI_DGV_STATUS_VIDEO_X_EXTENT                = MCI_VID_STATUS_VIDEO_X_EXTENT;
-  MCI_DGV_STATUS_VIDEO_Y_EXTENT                = MCI_VID_STATUS_VIDEO_Y_EXTENT;
-  MCI_DGV_STATUS_IMAGE_X_EXTENT                = MCI_VID_STATUS_IMAGE_X_EXTENT;
-  MCI_DGV_STATUS_IMAGE_Y_EXTENT                = MCI_VID_STATUS_IMAGE_Y_EXTENT;
-  MCI_DGV_STATUS_BRIGHTNESS                    = MCI_VID_STATUS_BRIGHTNESS;
-  MCI_DGV_STATUS_CONTRAST                      = MCI_VID_STATUS_CONTRAST;
-  MCI_DGV_STATUS_HUE                           = MCI_VID_STATUS_HUE;
-  MCI_DGV_STATUS_SATURATION                    = MCI_VID_STATUS_SATURATION;
-  MCI_DGV_STATUS_SPEED                         = MCI_VID_STATUS_SPEED;
-  MCI_DGV_STATUS_SHARPNESS                     = MCI_VID_STATUS_SHARPNESS;
-  MCI_DGV_STATUS_REF_INTERVAL                  = MCI_VID_STATUS_REF_INTERVAL;
-  MCI_DGV_STATUS_MAXDATARATE                   = MCI_VID_STATUS_MAXDATARATE;
-  MCI_DGV_STATUS_VIDEO_FILE_FORMAT             = MCI_VID_STATUS_VIDEO_FILE_FORMAT;
-
-  MCI_DGV_STATUS_CHANNELS                      = MCI_DGV_ITEM_BASE+13;
-  MCI_DGV_STATUS_BITSPERSAMPLE                 = MCI_DGV_ITEM_BASE+14;
-  MCI_DGV_STATUS_SAMPLESPERSEC                 = MCI_DGV_ITEM_BASE+15;
-  MCI_DGV_STATUS_FORMATTAG                     = MCI_DGV_ITEM_BASE+16;
-  MCI_DGV_STATUS_BLOCKALIGN                    = MCI_DGV_ITEM_BASE+17;
-  MCI_DGV_STATUS_AVGBYTESPERSEC                = MCI_DGV_ITEM_BASE+18;
-  MCI_DGV_STATUS_VIDEO_COMPRESSION_SUBTYPE     = MCI_DGV_ITEM_BASE+19;
-  MCI_DGV_STATUS_VIDEO_RECORD_RATE             = MCI_DGV_ITEM_BASE+20;
-  MCI_DGV_STATUS_VIDEO_RECORD_FRAME_DURATION   = MCI_DGV_ITEM_BASE+21;
-  MCI_DGV_STATUS_RECORD_AUDIO                  = MCI_DGV_ITEM_BASE+22;
-  MCI_DGV_STATUS_TRANSPARENT_COLOR             = MCI_DGV_ITEM_BASE+23;
-  MCI_DGV_STATUS_GRAPHIC_TRANSPARENT_COLOR     = MCI_DGV_ITEM_BASE+23;  // MUST BE SAME AS TRANSPARENT COLOR
-  MCI_DGV_STATUS_hwnd_MONITOR                  = MCI_DGV_ITEM_BASE+24;
-  MCI_DGV_STATUS_DROPPED_FRAME_PCT             = MCI_DGV_ITEM_BASE+25;
-  MCI_DGV_STATUS_AUDIOSYNC                     = MCI_DGV_ITEM_BASE+26;
-  MCI_DGV_STATUS_AUDIOSYNC_DIRECTION           = MCI_DGV_ITEM_BASE+27;
-  MCI_DGV_STATUS_VIDEO_TRANSPARENT_COLOR       = MCI_DGV_ITEM_BASE+28;  // MUST BE SAME AS TRANSPARENT COLOR
-  MCI_DGV_STATUS_TUNER_TV_CHANNEL              = MCI_DGV_ITEM_BASE+29;
-  MCI_DGV_STATUS_TUNER_LOW_TV_CHANNEL          = MCI_DGV_ITEM_BASE+29;
-  MCI_DGV_STATUS_TUNER_HIGH_TV_CHANNEL         = MCI_DGV_ITEM_BASE+29;
-  MCI_DGV_STATUS_TUNER_REGION                  = MCI_DGV_ITEM_BASE+30;
-  MCI_DGV_STATUS_TUNER_FINETUNE                = MCI_DGV_ITEM_BASE+31;
-  MCI_DGV_STATUS_TUNER_FREQUENCY               = MCI_DGV_ITEM_BASE+32;
-  MCI_DGV_STATUS_TUNER_AUDIO_CHANNEL           = MCI_DGV_ITEM_BASE+33;
-  MCI_DGV_STATUS_TUNER_AFC                     = MCI_DGV_ITEM_BASE+34;
-  MCI_DGV_STATUS_VALID_SIGNAL                  = MCI_DGV_ITEM_BASE+35;
-
-      //************************************************/
-      // MCI_STATUS item values for video overlay      */
-      //************************************************/
-  MCI_OVLY_STATUS_hwnd                         = MCI_VID_STATUS_hwnd;
-  MCI_OVLY_STATUS_IMAGE_COMPRESSION            = MCI_VID_STATUS_IMAGE_COMPRESSION;
-  MCI_OVLY_STATUS_IMAGE_BITSPERPEL             = MCI_VID_STATUS_IMAGE_BITSPERPEL;
-  MCI_OVLY_STATUS_IMAGE_PELFORMAT              = MCI_VID_STATUS_IMAGE_PELFORMAT;
-  MCI_OVLY_STATUS_IMAGE_X_EXTENT               = MCI_VID_STATUS_IMAGE_X_EXTENT;
-  MCI_OVLY_STATUS_IMAGE_Y_EXTENT               = MCI_VID_STATUS_IMAGE_Y_EXTENT;
-  MCI_OVLY_STATUS_BRIGHTNESS                   = MCI_VID_STATUS_BRIGHTNESS;
-  MCI_OVLY_STATUS_CONTRAST                     = MCI_VID_STATUS_CONTRAST;
-  MCI_OVLY_STATUS_HUE                          = MCI_VID_STATUS_HUE;
-  MCI_OVLY_STATUS_SATURATION                   = MCI_VID_STATUS_SATURATION;
-  MCI_OVLY_STATUS_GREYSCALE                    = MCI_VID_STATUS_GREYSCALE;
-  MCI_OVLY_STATUS_IMAGE_QUALITY                = MCI_VID_STATUS_IMAGE_QUALITY;
-  MCI_OVLY_STATUS_SHARPNESS                    = MCI_VID_STATUS_SHARPNESS;
-  MCI_OVLY_STATUS_IMAGE_FILE_FORMAT            = MCI_VID_STATUS_IMAGE_FILE_FORMAT;
-  MCI_OVLY_STATUS_TRANSPARENT_TYPE             = MCI_VID_STATUS_TRANSPARENT_TYPE;
-  MCI_OVLY_STATUS_TRANSPARENT_COLOR            = MCI_VID_STATUS_TRANSPARENT_COLOR;
-
-      //************************************************/
-      // Status Mode return values                     */
-      //************************************************/
-  MCI_MODE_NOT_READY            = $00000001;
-  MCI_MODE_PAUSE                = $00000002;
-  MCI_MODE_PLAY                 = $00000003;
-  MCI_MODE_STOP                 = $00000004;
-  MCI_MODE_RECORD               = $00000005;
-  MCI_MODE_SEEK                 = $00000006;
-
-      //************************************************/
-      // Status Direction return values                */
-      //************************************************/
-  MCI_FORWARD                   = $00000000;
-  MCI_REVERSE                   = $00000001;
-
-type
-  mci_Status_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulReturn                    : LongInt;       // Return field
-    ulItem                      : LongInt;       // Item field for STATUS item to query
-    ulValue                     : LongInt;       // Status value field (this used to be)
-                                               //  ulTrack but was changed in Rel 1.1
-                                               //  to extend the status structure.
-                                               //  See the programming reference on when
-                                               //  ulValue is used and how...
-  end;
-  pmci_Status_Parms = ^mci_Status_Parms;
-
-
-  mci_CDXA_Status_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulReturn                    : LongInt;       // Return field
-    ulItem                      : LongInt;       // Item field for STATUS item to query
-    ulValue                     : LongInt;       // Status value field (this used to be)
-                                               //  ulTrack but was changed in Rel 1.1
-                                               //  to extend the status structure.
-                                               //  See the programming reference on when
-                                               //  ulValue is used and how...
-    ulChannel                   : LongInt;       // Channel
-  end;
-  pmci_CDXA_Status_Parms = ^mci_CDXA_Status_Parms;
-
-      //********************************************************************/
-      // flags and parameter structure for the MCI_STEP message            */
-      //     0x00000X00 are reserved for MCI_STEP flags                    */
-      //********************************************************************/
-CONST
-  MCI_STEP_FRAMES               = $00000100;
-  MCI_STEP_REVERSE              = $00000200;
-
-type
-  mci_Step_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulStep                      : LongInt;       // amount to step in current time format
-  end;
-  pmci_Step_Parms = ^mci_Step_Parms;
-
-      //********************************************************************/
-      // flags for the MCI_SYSINFO message                                 */
-      //     0xXXXXXX00 are reserved for MCI_SYSINFO flags                 */
-      //********************************************************************/
-CONST
-  MCI_SYSINFO_QUANTITY          = $00000100;
-  MCI_SYSINFO_OPEN              = $00000200;
-  MCI_SYSINFO_NAME              = $00000400;
-  MCI_SYSINFO_INSTALLNAME       = $00000800;
-  MCI_SYSINFO_ITEM              = $00001000;
-  MCI_SYSINFO_INI_LOCK          = $00002000;
-
-      //*******************************************************/
-      // Extended SYSINFO functions                           */
-      //*******************************************************/
-  MCI_SYSINFO_INSTALL_DRIVER    = $00000001;
-  MCI_SYSINFO_QUERY_DRIVER      = $00000002;
-  MCI_SYSINFO_DELETE_DRIVER     = $00000004;
-  MCI_SYSINFO_SET_PARAMS        = $00000008;
-  MCI_SYSINFO_QUERY_PARAMS      = $00000010;
-  MCI_SYSINFO_SET_CONNECTORS    = $00000020;
-  MCI_SYSINFO_QUERY_CONNECTORS  = $00000040;
-  MCI_SYSINFO_SET_EXTENSIONS    = $00000080;
-  MCI_SYSINFO_QUERY_EXTENSIONS  = $00000100;
-  MCI_SYSINFO_SET_ALIAS         = $00000200;
-  MCI_SYSINFO_QUERY_NAMES       = $00000400;
-  MCI_SYSINFO_SET_DEFAULT       = $00000800;
-  MCI_SYSINFO_QUERY_DEFAULT     = $00001000;
-  MCI_SYSINFO_SET_TYPES         = $00002000;
-  MCI_SYSINFO_QUERY_TYPES       = $00004000;
-
-      //*******************************************************/
-      // Device Flags                                         */
-      //*******************************************************/
-  MCI_SYSINFO_DEV_CONTROLLABLE  = $00000001;
-  MCI_SYSINFO_DEV_NONCONTROLLABLE = $00000002;
-  MCI_SYSINFO_DEVICESETTINGS    = $00000004;
-
-      //********************************************************************/
-      // parameter structures for the MCI_SYSINFO message                  */
-      //********************************************************************/
-TYPE
-  MaxDevNameChar = array [0..Max_Device_Name-1] of CHAR;
-  MaxVerNumChar = array [0..Max_Version_Number-1] of CHAR;
-  MaxProdInfChar = array [0..Max_ProdInfo-1] of CHAR;
-  MaxPddNameChar = array [0..Max_Pdd_Name-1] of CHAR;
-  MaxClsShort    = array [0..Max_Classes-1] of integer;
-  MaxClsShort2   = array [0..Max_Classes-1,0..Max_Classes-1] of integer;
-  MaxDevParmChar = array [0..Max_Dev_Params-1] of CHAR;
-
-  mci_SysInfo_Parms = record
-    hwndDummyCallback        : hwnd;           // NOTIFY not allowed for SYSINFO
-    pszReturn                : pChar;          // Pointer to return buffer
-    ulRetSize                : LongInt;          // Return buffer size
-    ulNumber                 : LongInt;          // Ordinal Number
-    usDeviceType             : Integer;         // MCI device type number
-    usReserved0              : Integer;         // Reserved field
-    ulItem                   : LongInt;          // Used to indicate the MCI_SYSINFO
-    pSysInfoParm             : Pointer;        // extended function to perform
-  end;
-  pmci_SysInfo_Parms = ^mci_SysInfo_Parms;
-
-  mci_SysInfo_LogDevice = packed record
-    szInstallName            : MaxDevNameChar; // Device install name
-    usDeviceType             : Integer;         // Device type number
-    ulDeviceFlag             : Longint;          // Flag indicating whether device
-                                               //  device is controllable or not
-    szVersionNumber          : MaxVerNumChar;  // INI file version number
-    szProductInfo            : MaxProdInfChar; // Textual product description
-    szMCDDriver              : MaxDevNameChar; // MCI Driver dll name
-    szVSDDriver              : MaxDevNameChar; // VSD dll name
-    szPDDName                : MaxPddNameChar; // Device PDD name
-    szMCDTable               : MaxDevNameChar; // Device type command table
-    szVSDTable               : MaxDevNameChar; // Device specific command table
-    usShareType              : Integer;         // Device sharing mode
-    szResourceName           : MaxDevNameChar; // Resource name
-    usResourceUnits          : Integer;         // Total resource units available
-                                               //  for this device
-    usResourceClasses        : Integer;         // Number of resource classes for
-                                               //  this device
-    ausClassArray            : MaxClsShort;    // Maximum number of resource
-                                               //  units for each class
-    ausValidClassArray       : MaxClsShort2;   // Valid class combinations
-  end;
-  pmci_SysInfo_LogDevice = ^mci_SysInfo_LogDevice;
-
-
-  mci_SysInfo_DevParams = record
-    szInstallName            : MaxDevNameChar; // Device install name
-    szDevParams              : MaxDevParmChar; // Device specific parameters
-  end;
-  pmci_SysInfo_DevParams = ^mci_SysInfo_DevParams;
-
-type
-  Connect = record
-    usConnectType            : Integer;         // Connector type
-    szToInstallName          : MaxDevNameChar; // Install name this connector
-                                               //  is connected to
-    usToConnectIndex         : Integer;         // Connector index this connector
-                                               //  is connected to
-  end;
-  pConnect = ^Connect;
-
-
-  MaxCnctCnct      = array[0..MAX_CONNECTORS-1] of Connect;
-  MaxExtChar2      = array[0..MAX_EXTENSIONS-1,0..MAX_EXTENSION_NAME-1] of CHAR;
-  MaxAliasNameChar = array[0..Max_Alias_Name-1] of Char;
-  MaxTypeBufChar   = array[0..Max_TypeBuffer] of Char;
-
-  mci_SysInfo_ConParams = record
-    szInstallName            : MaxDevNameChar; // Device install name
-    usNumConnectors          : Integer;         // Number of device connectors
-    ConnectorList            : MaxCnctCnct;    // Connector list array
-  end;
-  pmci_SysInfo_ConParams = ^mci_SysInfo_ConParams;
-
-  mci_SysInfo_Extension = record
-    szInstallName            : MaxDevNameChar; // Device install name
-    usNumExtensions          : Integer;         // Number of extensions
-    szExtension              : MaxExtChar2;    // Extension name array
-  end;
-  pmci_SysInfo_Extension = ^mci_SysInfo_Extension;
-
-  mci_SysInfo_Alias = record
-    szInstallName            : MaxDevNameChar;   // Device install name
-    szAliasName              : MaxAliasNameChar; // Alias name
-  end;
-  pmci_SysInfo_Alias = ^mci_SysInfo_Alias;
-
-  mci_SysInfo_DefaultDevice = record
-    szInstallName            : MaxDevNameChar; // Device install name
-    usDeviceType             : Integer;         // Device type number
-  end;
-  pmci_SysInfo_DefaultDevice = ^mci_SysInfo_DefaultDevice;
-
-  mci_SysInfo_Query_Name = record
-    szInstallName            : MaxDevNameChar; // Device install name
-    szLogicalName            : MaxDevNameChar; // Logical device name
-    szAliasName              : MaxAliasNameChar; // Alias name
-    usDeviceType             : Integer;         // Device type number
-    usDeviceOrd              : Integer;         // Device type ordinal
-  end;
-  pmci_SysInfo_Query_Name = ^mci_SysInfo_Query_Name;
-
-  mci_SysInfo_Types = record
-    szInstallName            : MaxDevNameChar; // Device install name
-    szTypes                  : MaxTypeBufChar; // EA types
-  end;
-  pmci_SysInfo_Types = ^mci_SysInfo_Types;
-
-
-      //********************************************************************/
-      // flags for the MCI_UNFREEZE message                                */
-      //     0x00000X00 are reserved for MCI_UNFREEZE flags                */
-      //********************************************************************/
-CONST
-  MCI_OVLY_UNFREEZE_RECT         = $00000100;
-  MCI_OVLY_UNFREEZE_RECT_OUTSIDE = $00000200;
-
-      //********************************************************************/
-      // flags for the MCI_WHERE message                                   */
-      //     0x0000XX00 are reserved for MCI_WHERE flags                   */
-      //********************************************************************/
-  MCI_VID_WHERE_DESTINATION     = $00000100;
-  MCI_VID_WHERE_SOURCE          = $00000200;
-  MCI_VID_WHERE_WINDOW          = $00000400;
-
-  MCI_DGV_WHERE_DESTINATION     = MCI_VID_WHERE_DESTINATION;
-  MCI_DGV_WHERE_SOURCE          = MCI_VID_WHERE_SOURCE;
-  MCI_DGV_WHERE_WINDOW          = MCI_VID_WHERE_WINDOW;
-  MCI_DGV_WHERE_ADJUSTED        = $00000800;
-
-  MCI_OVLY_WHERE_DESTINATION    = MCI_VID_WHERE_DESTINATION;
-  MCI_OVLY_WHERE_SOURCE         = MCI_VID_WHERE_SOURCE;
-  MCI_OVLY_WHERE_WINDOW         = MCI_VID_WHERE_WINDOW;
-      //********************************************************************/
-      // flags and parameter structure for the MCI_WINDOW message          */
-      //     0x0000XX00   are reserved for MCI_WINDOW flags                */
-      //********************************************************************/
-  MCI_VID_WINDOW_hwnd           = $00000100;
-  MCI_VID_WINDOW_STATE          = $00000200;
-  MCI_VID_WINDOW_TEXT           = $00000400;
-  MCI_VID_WINDOW_DEFAULT        = $00000800;
-
-  MCI_DGV_WINDOW_hwnd           = MCI_VID_WINDOW_hwnd;
-  MCI_DGV_WINDOW_STATE          = MCI_VID_WINDOW_STATE;
-  MCI_DGV_WINDOW_TEXT           = MCI_VID_WINDOW_TEXT;
-  MCI_DGV_WINDOW_DEFAULT        = MCI_VID_WINDOW_DEFAULT;
-
-  MCI_OVLY_WINDOW_hwnd          = MCI_VID_WINDOW_hwnd;
-  MCI_OVLY_WINDOW_STATE         = MCI_VID_WINDOW_STATE;
-  MCI_OVLY_WINDOW_TEXT          = MCI_VID_WINDOW_TEXT;
-  MCI_OVLY_WINDOW_DEFAULT       = MCI_VID_WINDOW_DEFAULT;
-
-type
-  mci_Vid_Window_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    hwndDest                    : hwnd;        // Handle to the client window used for
-                                               // the destination of the video image
-    usCmdShow                   : Integer;      // Specifies how the window is displayed
-    usReserved1                 : Integer;      // Reserved
-    pszText                     : pChar;       // The text to use as the window caption
-    pszAlias                    : pChar;       // The window alias for the display window
-  end;
-  pmci_Vid_Window_Parms = ^mci_Vid_Window_Parms;
-
-  mci_dgv_Window_Parms = mci_Vid_Window_Parms;
-  pmci_dgv_Window_Parms = ^mci_dgv_Window_Parms;
-
-  mci_Ovly_Window_Parms = mci_Vid_Window_Parms;
-  pmci_Ovly_Window_Parms = ^mci_Ovly_Window_Parms;
-
-
-      //********************************************************************/
-      // flags and parameter structure for the MCI_TUNER  message          */
-      //********************************************************************/
-CONST
-  MCI_DGV_AUDIO_CHANNEL         = $00010000;
-  MCI_DGV_TV_CHANNEL            = $00020000;
-  MCI_DGV_FREQUENCY             = $00040000;
-  MCI_DGV_FINETUNE_PLUS         = $00080000;
-  MCI_DGV_FINETUNE_MINUS        = $00100000;
-  MCI_DGV_REGION                = $00200000;
-  MCI_DGV_AFC_ON                = $00400000;
-  MCI_DGV_AFC_OFF               = $00800000;
-  MCI_DGV_POLARIZATION          = $00800000;
-  MCI_DGV_QUERY                 = $01000000;
-
-type
-  mci_Dgv_Tuner_Parms = record
-    hwndCallback                : hwnd;        // PM window handle for MCI notify message
-    ulFrequency                 : LongInt;       // Tuner Frequency
-    ulReserved0                 : LongInt;       // Reserved 0
-    ulTVChannel                 : LongInt;       // TV Channel
-    lFineTune                   : LongInt;        // Fine tuning adjustments.
-    pszRegion                   : pChar;       // TV Channel Region
-    ulReserved1                 : LongInt;       // Reserved 1
-    ulReserved2                 : LongInt;       // Reserved 2
-  end;
-  pmci_Dgv_Tuner_Parms = ^mci_Dgv_Tuner_Parms;
-
-      //********************************************************************/
-      //                                                                   */
-      //  MCI system value defines                                         */
-      //                                                                   */
-      //********************************************************************/
-CONST
-  MSV_CLOSEDCAPTION             = $0;
-  MSV_MASTERVOLUME              = $1;
-  MSV_HEADPHONES                = $2;
-  MSV_SPEAKERS                  = $3;
-  MSV_WORKPATH                  = $4;
-  MSV_SYSQOSVALUE               = $5;
-  MSV_SYSQOSERRORFLAG           = $6;
-
-  MSV_MAX                       = $7;
-
-
-      //********************************************************************/
-      // Playlist defines                                                  */
-      //********************************************************************/
-  DATA_OPERATION                = 0;
-  BRANCH_OPERATION              = 1;
-  LOOP_OPERATION                = 2;
-  CALL_OPERATION                = 3;
-  RETURN_OPERATION              = 4;
-  EXIT_OPERATION                = 5;
-  NOP_OPERATION                 = 6;
-  MESSAGE_OPERATION             = 7;
-  CUEPOINT_OPERATION            = 8;
-  SEMWAIT_OPERATION             = 9;
-  SEMPOST_OPERATION             = 10;
-
-      //********************************************************************/
-      //                                                                   */
-      //  MCI Function prototypes                                          */
-      //                                                                   */
-      //********************************************************************/
-
-
-function mciSendCommand(usDeviceID: Integer; usMessage: Integer; ulParam1: LongInt;
-         var Param2; usUserParm: Integer): longint; cdecl;
-
-function mciSendString(pszCommandBuf: pChar; pszReturnString: pChar;
-         wReturnLength: Integer; hwndCallBack: hwnd; usUserParm: Integer): longInt; cdecl;
-
-function mciGetErrorString(ulError: LongInt; pszBuffer: pChar; usLength: Integer): longint; cdecl;
-
-function mciMakeGroup(var usDeviceGroupID:Integer; usDeviceCount: Integer;
-             var ausDeviceList: Integer; ulFlags: LongInt; ulMMTime: LongInt): longint; cdecl;
-
-function mciDeleteGroup(usGroupID:Integer): longint; cdecl;
-
-function mciSetSysValue(iSysValue: Integer; var Value): Boolean; cdecl;
-
-function mciQuerySysValue(iSysValue: Integer;var Value): Boolean; cdecl;
-
-function mciGetDeviceID(pszName: pChar): Longint; cdecl;
-
-Implementation
-
-function mSecToMM(Value: Cardinal): mmTime;
-begin
-  If Value > $FFFFFFFF div 3 then
-    mSecToMM := 0
-  else
-    mSecToMM := Value div 3;
-end;
-
-function mSecFromMM(Value: mmTime): LongInt;
-begin
-  mSecFromMM := (Value+1) div 3;
-end;
-
-function RedBookToMM(Value: Cardinal): mmTime;
-begin
-  RedBookToMM := ( Value and $0000FF ) * 60 * 3000 +
-            ( Value and $00FF00 ) * $100 * 3000 +
-            ( Value and $FF0000 ) * $10000 * 3000 div 75;
-
-end;
-
-function fps24ToMM(Value: Cardinal): mmTime;
-begin
-  fps24toMM := ( Value and $000000FF ) * 60 * 60 * 3000 +
-            ( Value and $0000FF00 ) * $100 * 60 * 3000 +
-            ( Value and $00FF0000 ) * $10000 * 3000 +
-            ( Value and $FF000000 ) * $10000 * 3000 div 24;
-end;
-
-function fps25ToMM(Value: Cardinal): mmTime;
-begin
-  fps25ToMM := ( Value and $000000FF ) * 60 * 60 * 3000 +
-            ( Value and $0000FF00 ) * $100 * 60 * 3000 +
-            ( Value and $00FF0000 ) * $10000 * 3000 +
-            ( Value and $FF000000 ) * $10000 * 3000 div 25;
-end;
-
-function fps30ToMM(Value: Cardinal): mmTime;
-begin
-  fps30ToMM := ( Value and $000000FF ) * 60 * 60 * 3000 +
-            ( Value and $0000FF00 ) * $100 * 60 * 3000 +
-            ( Value and $00FF0000 ) * $10000 * 3000 +
-            ( Value and $FF000000 ) * $10000 * 3000 div 30;
-end;
-
-function HMSToMM(Value: Cardinal): mmTime;
-begin
-  HMSToMM := ( Value and $0000FF ) * 60 * 60 * 3000 +
-            ( Value and $00FF00 ) * $100 * 60 * 3000 +
-            ( Value and $FF0000 ) * $10000 * 3000;
-end;
-
-function RedBookFromMM(Value: mmTime): Cardinal;
-begin
-  if Value+20 >= $100*60*3000 then
-    RedBookFromMM := 0
-  else
-    RedBookFromMM := (Value+20) div (60*3000) +
-              ((Value+20) mod ((60*3000) div 3000)) shl 8 +
-              ((Value+20) div ((3000 div 75) mod 75)) shl 16;
-end;
-
-function FPS24FromMM(Value: mmTime): Cardinal;
-begin
-  if Value+63 >= $A4CB8000 then // $100*60*60*3000 then
-    FPS24FromMM := 0
-  else
-    FPS24FromMM := ((((Value+63) mod 3000) div (3000 div 24)) shl 24) and $FF000000 +
-              ((((Value+63) div 3000) mod 60) shl 16) and $00FF0000 +
-              (((((Value+63) div 3000) div 60) mod 60) shl 8) and $0000FF00 +
-              ((((Value+63) div 3000) div 60) div 60) and $000000FF;
-end;
-
-function FPS25FromMM(value: mmTime): Cardinal;
-begin
-  if Value+60 >= $A4CB8000 then // $100*60*60*3000
-    FPS25FromMM := 0
-  else
-    FPS25FromMM := ((((Value+60) mod 3000) div (3000 div 25)) shl 24) and $FF000000 +
-              ((((Value+60) div 3000) mod 60) shl 16) and $00FF0000 +
-              (((((Value+60) div 3000) div 60) mod 60) shl 8) and $0000FF00 +
-              ((((Value+60) div 3000) div 60) div 60) and $000000FF;
-end;
-
-function FPS30FromMM(value: mmTime): Cardinal;
-begin
-  if Value+50 >= $A4CB8000 then // $100*60*60*3000
-    FPS30FromMM := 0
-  else
-    FPS30FromMM := ((((Value+50) mod 3000) div (3000 div 30)) shl 24) and $FF000000 +
-              ((((Value+50) div 3000) mod 60) shl 16) and $00FF0000 +
-              (((((Value+50) div 3000) div 60) mod 60) shl 8) and $0000FF00 +
-              ((((Value+50) div 3000) div 60) div 60) and $000000FF;
-end;
-
-function HMSFromMM(value: mmTime): Cardinal;
-begin
-  if Value+50 >= $A4CB8000 then // $100*60*60*3000
-    HMSFromMM := 0
-  else
-    HMSFromMM := (((( Value+50) div 3000) mod 60) shl 16) and $00FF0000 +
-              (((((Value+50) div 3000) div 60) mod 60) shl 8) and $0000FF00 +
-              (((( Value+50) div 3000) div 60) div 60) and $000000FF;
-end;
-
-function tmsf_track(time: mmTime): Byte;
-begin
-  tmsf_track := byte(time);
-end;
-
-function tmsf_minute(time: mmTime): Byte;
-begin
-  tmsf_minute := pbyte(pchar(@time)+1)^;
-end;
-
-function tmsf_second(time: mmTime): Byte;
-begin
-  tmsf_second := pbyte(pchar(@time)+2)^;
-end;
-
-function tmsf_frame(time: mmTime): Byte;
-begin
-  tmsf_frame := pbyte(pchar(@time)+3)^;
-end;
-
-function msf_minute(time: mmTime): Byte;
-begin
-  msf_minute := byte(time);
-end;
-
-function msf_second(time: mmTime): Byte;
-begin
-  msf_second := pbyte(pchar(@time)+1)^;
-end;
-
-function msf_frame(time: mmTime): Byte;
-begin
-  msf_frame := pbyte(pchar(@time)+2)^;
-end;
-
-function uLong_lwlb(var ul): Byte;   // Low word low byte
-begin
-  uLong_lwlb := LongInt(ul);
-end;
-
-function uLong_lwhb(var ul): Byte;   // Low word high byte
-begin
-  uLong_lwhb := pbyte(pchar(@ul)+1)^;
-end;
-
-function uLong_hwlb(var ul): Byte;   // High word low byte
-begin
-  uLong_hwlb := pbyte(pchar(@ul)+2)^;
-end;
-
-function uLong_hwhb(var ul): Byte;   // High word high byte
-begin
-  uLong_hwhb := pbyte(pchar(@ul)+3)^;
-end;
-
-function uLong_lowd(var ul): Word;   // Low word
-begin
-  uLong_lowd:=pWord(pchar(@ul))^;
-end;
-
-function uLong_hiwd(var ul): Word;   // High word
-begin
-  uLong_hiwd := pWord(pchar(@ul)+Sizeof(Word))^;
-end;
-
-function mciSendCommand(usDeviceID: Integer; usMessage: Integer; ulParam1: LongInt;
-         var Param2; usUserParm: Integer): longint; cdecl; external 'MDM' index 1;
-
-function mciSendString(pszCommandBuf: pChar; pszReturnString: pChar;
-         wReturnLength: Integer; hwndCallBack: hwnd; usUserParm: Integer): longInt; cdecl; external 'MDM' index 2;
-
-function mciGetErrorString(ulError: LongInt; pszBuffer: pChar; usLength: Integer): longint;  cdecl; external 'MDM' index 3;
-
-function mciMakeGroup(var usDeviceGroupID:Integer; usDeviceCount: Integer;
-             var ausDeviceList: Integer; ulFlags: LongInt; ulMMTime: LongInt): longint; cdecl; external 'MDM' index 12;
-
-function mciDeleteGroup(usGroupID:Integer): longint; cdecl; external 'MDM' index 13;
-
-function mciSetSysValue(iSysValue: Integer; var Value): Boolean; cdecl; external 'MDM' index 10;
-
-function mciQuerySysValue(iSysValue: Integer;var Value): Boolean; cdecl; external 'MDM' index 11;
-
-function mciGetDeviceID(pszName: pChar): Longint; cdecl; external 'MDM' index 16;
-
-End.
-
-{
-$Log$
-Revision 1.1  2003-02-15 16:59:09  hajny
-  * mmtk directory corrected to lowercase
-
-Revision 1.1  2003/02/09 13:49:06  hajny
-  + mmtk added
-
-}

+ 0 - 134
packages/extra/os2units/mmtk/mciapi.pas

@@ -1,134 +0,0 @@
-{
-    $Id$
-    Copyright (c) 1992, 1993 by International Business Machines Corporation
-    Copyright (c) 2002 by Andry Svirgunov ([email protected])
-    Copyright (c) 2002-2003 by Yuri Prokushev ([email protected])
-
-    High-Level MCI Interfaces of OS/2 Multimedia subsystem
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Library General Public License (LGPL) as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version. This program is
-    distributed in the hope that it will be useful, but WITHOUT ANY
-    WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.
-
-    See the GNU Library General Public License for more details. You should
-    have received a copy of the GNU Library General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- **********************************************************************}
-
-{
-@abstract(High-Level MCI Interfaces of OS/2 Multimedia subsystem)
-@author(Andry Svirgunov ([email protected]))
-@author(Yuri Prokushev ([email protected]))
-@created(01 Oct 2002)
-@lastmod(19 Jan 2003)
-This is the High-Level Macro Service API Routines of OS/2 Multimedia subsystem.
-All functions are from MCIAPI dll (which also contains REXX functions.
-See "Multimedia with REXX" for more information.).
-Warning: This code is alfa. Future versions of this unit will propably
-not be compatible.
-}
-Unit mciapi;
-
-{$MODE ObjFPC}
-
-Interface
-
-// Flags for mciPlayFile
-Const
-  // digital and overlay
-  MCI_OWNERISPARENT   = $0001;
-  // stop playing whatever is playing
-  MCI_STOPACTIVE      = $0002;
-  // play and return immediately
-  MCI_ASYNCRENDEZVOUS = $0004;
-  // wait til prev is finished then play
-  MCI_RENDEZVOUS      = $0008;
-  // no syncup will be done
-  MCI_ASYNC           = $0010;
-
-{
-This function plays a multimedia data file (video, audio) using MCI commands.
-hwndOwner is handle of owner window. If hwndOwner equial to zero used active
-          window.
-pszFile is pointer to asciiz name of data file. For compound files can be
-        used 'filename+element'.
-ulFlags is MCI_* flags.
-pszTitle is title of generated window (e.g. for video). Ignored if not generated.
-hwndViewport is handle of window for displaying video. If none, then default
-             window displayed.
-}
-Function mciPlayFile(hwndOwner: Cardinal;               // Ownerwindow
-                     pszFile: PChar;                    // File
-                     ulFlags: Cardinal;                 // Flags
-                     pszTitle: PChar;                   // Title
-                     hwndViewport: Cardinal):           // Viewport Window
-                       Cardinal; cdecl;
-
-Function mciPlayResource(hwndOwner: Cardinal;           // Owner Window
-                         hmod: LongInt;                 // Module
-                         resType: LongInt;              // Resource Type
-                         resID: LongInt;                // Resource ID
-                         ulFlags: Cardinal;             // Flags
-                         pszTitle: PChar;               // Title
-                         hwndViewport: Cardinal):       // Viewport Window
-                           Cardinal; cdecl;
-
-Function mciRecordAudioFile(hwndOwner: Cardinal;
-                            pszFile,
-                            pszTitle: PChar;
-                            ulFlags: Cardinal):
-                              Cardinal; cdecl;
-
-// Audio Macro Service Constants and Routines
-
-Const
-  MMIO_FE_FINDFIRST        = 1;
-  MMIO_FE_FINDNEXT         = 2;
-  MMIO_FE_FINDEND          = 3;
-  MMIO_FE_FINDELEMENT      = 4;
-
-  MMIO_RE_COMPACT          = 1;
-
-Function mmioRemoveElement(pszFileElement: pChar;
-                           ulFlag: LongInt):
-                             Cardinal; cdecl;
-
-Function mmioFindElement(ulCode: LongInt;              // Find Code
-                         pszElement: PChar;            // Element
-                         ulElementLen: LongInt;        // Element Buffer Length
-                         pszFile: PChar;
-                         ulReserved: LongInt):         // Compound File
-                           Cardinal; cdecl;
-
-
-
-Implementation
-
-Function mciPlayFile(hwndOwner: Cardinal; pszFile: PChar; ulFlags: Cardinal; pszTitle: PChar; hwndViewport: Cardinal): Cardinal; cdecl;
-    external 'MCIAPI' index 10;
-Function mciPlayResource(hwndOwner: Cardinal; hmod: LongInt; resType: LongInt; resID: LongInt; ulFlags: Cardinal; pszTitle: PChar; hwndViewport: Cardinal): Cardinal;  cdecl;
-    external 'MCIAPI' index 11;
-Function mciRecordAudioFile(hwndOwner: Cardinal; pszFile, pszTitle: PChar; ulFlags: Cardinal): Cardinal; cdecl;
-    external 'MCIAPI' index 12;
-Function mmioRemoveElement(pszFileElement: PChar; ulFlag: LongInt): Cardinal; cdecl;
-    external 'MCIAPI' index 16;
-Function mmioFindElement(ulCode: LongInt; pszElement: PChar; ulElementLen: LongInt; pszFile: PChar; ulReserved: LongInt): Cardinal; cdecl;
-    external 'MCIAPI' index 18;
-
-end.
-
-{
-$Log$
-Revision 1.1  2003-02-15 16:59:09  hajny
-  * mmtk directory corrected to lowercase
-
-Revision 1.1  2003/02/09 13:49:06  hajny
-  + mmtk added
-
-}

+ 0 - 369
packages/extra/os2units/mmtk/mcidrv.pas

@@ -1,369 +0,0 @@
-{
-    $Id$
-    Copyright (c) 1991, 1992 by International Business Machines Corporation
-    Copyright (c) 2002 by Andry Svirgunov ([email protected])
-    Copyright (c) 2002-2003 by Yuri Prokushev ([email protected])
-
-    MCI drivers interface
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Library General Public License (LGPL) as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version. This program is
-    distributed in the hope that it will be useful, but WITHOUT ANY
-    WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.
-
-    See the GNU Library General Public License for more details. You should
-    have received a copy of the GNU Library General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- **********************************************************************}
-
-{
-@abstract(MCI drivers interface)
-@author(Andry Svirgunov ([email protected]))
-@author(Yuri Prokushev ([email protected]))
-@created(01 Oct 2002)
-@lastmod(19 Jan 2003)
-MCI drivers interface
-Warning: This code is alfa. Future versions of this unit will propably
-not be compatible.
-}
-Unit mcidrv;
-
-Interface
-
-Type
-  GID=Integer;
-
-///**************************************************************************/
-//             MCI Driver  message identifiers                              */
-///**************************************************************************/
-const
-  MCIDRV_SAVE                   = 900;
-  MCIDRV_RESTORE                = 901;
-  MCIDRV_SYNC                   = 902;
-  MCIDRV_CHANGERESOURCE         = 903;
-  MCIDRV_CONNECT                = 904;
-  MCIDRV_ASSOCIATE              = 905;
-  MCIDRV_DISCONNECT             = 906;
-  MCIDRV_TEST_CONNECTION        = 907;
-  MCIDRV_START                  = 908;
-  MCIDRV_SEEK                   = 909;
-  MCIDRV_STOP                   = 910;
-  MCIDRV_MODIFY_CONNECTION      = 911;
-  MCIDRV_INIT_CONNECTION        = 912;
-  MCIDRV_DEINIT_CONNECTION      = 913;
-  MCIDRV_ENABLE_EVENT           = 915;
-  MCIDRV_GETTIME                = 917;
-
-///*******************************************************************/
-// The following messages are used by the MCIDRV_CONNECT message     */
-///*******************************************************************/
-
-  MCIDRV_CONNECT_TARGET         = $00010000;
-  MCIDRV_CONNECT_SOURCE         = $00020000;
-  MCIDRV_SET_CONNNECTOR_TYPE    = $00040000;
-  MCIDRV_CHANGE_SEM             = $00080000;
-
-///*******************************************************************/
-// The following messages are used by MCIDRV_MODIFY_CONNECTION       */
-///*******************************************************************/
-
-
-  MCIDRV_MODIFY_10              =$00100000;  // back level MCI driver.
-  MCIDRV_MIX_STANDALONE         =$00200000;
-
-
-///*******************************************************************/
-// The following messages are used by MCIDRV_START                   */
-///*******************************************************************/
-
-  MCIDRV_CUE_PLAYBACK           = $00010000;
-  MCIDRV_CUE_RECORD             = $00020000;
-  MCIDRV_START_PLAYBACK         = $00040000;
-  MCIDRV_START_RECORD           = $00080000;
-  MCIDRV_START_PREROLL          = $00100000;
-
-///*******************************************************************/
-// The following messages are used by MCIDRV_ASSOCIATE               */
-///*******************************************************************/
-
-  MCIDRV_OUTPUT                 = $00010000;
-  MCIDRV_INPUT                  = $00020000;
-
-///*******************************************************************/
-// The following messages are used by MCIDRV_STOP                    */
-///*******************************************************************/
-
-  MCIDRV_PAUSE_STREAM_NETWORK   = $00010000;
-  MCIDRV_FLUSH_STREAM_NETWORK   = $00020000;
-  MCIDRV_DISCARD_STREAM_NETWORK = $00040000;
-
-///*******************************************************************/
-// The following messages are used by MCIDRV_DEINIT_CONNECTION       */
-///*******************************************************************/
-
-  MCIDRV_MODIFY_HANDLER         =$00010000;
-
-
-
-///*******************************************************************/
-// The following range of message ID's are reserved for internal use */
-//  by MCI drivers                                                   */
-///*******************************************************************/
-  MCI_INTERNAL_MESSAGES_START   = 1000;
-  MCI_INTERNAL_MESSAGES_END     = 1999;
-
-///*******************************************************************/
-// Flags used by the string parser for command tables                */
-// NOTE: All flags must have an "L" suffix in order to be parsed as  */
-// DWORDs by the resource compiler                                   */
-///*******************************************************************/
-  MCI_COMMAND_HEAD              = $00000001;
-  MCI_END_COMMAND               = $00000002;
-  MCI_END_COMMAND_LIST          = $00000003;
-  MCI_RETURN                    = $00000004;
-  MCI_STRING                    = $00000005;
-  MCI_FLAG                      = $00000006;
-  MCI_INTEGER                   = $00000007;
-  MCI_CONSTANT                  = $00000008;
-  MCI_CONSTANT_INTEGER          = $00000009;
-  MCI_CONSTANT_STRING           = $0000000A;
-  MCI_END_CONSTANT              = $0000000B;
-  MCI_DEFAULT_STRING            = $0000000C;
-  MCI_DEFAULT_INTEGER           = $0000000D;
-  MCI_RETURN_TYPE               = $0000000E;
-  MCI_RETURN_TYPE_STRING        = $0000000F;
-  MCI_END_RETURN_TYPE           = $00000010;
-  MCI_CONSTANT_2                = $00000011;
-  MCI_END_CONSTANT_2            = $00000012;
-  MCI_CONSTANT_PAIR             = $00000013;
-  MCI_END_CONSTANT_PAIR         = $00000014;
-  MCI_CONSTANT_INTEGER_PAIR     = $00000015;
-  MCI_CONSTANT_STRING_PAIR      = $00000016;
-  MCI_RECTL                     = $00000017;
-  MCI_CONSTANT_4                = $00000018;
-  MCI_END_CONSTANT_4            = $00000019;
-  MCI_FOURCC                    = $0000001A;
-  MCI_OR                        = $0000001B;
-  MCI_END_OR                    = $0000001C;
-  MCI_STRING_LIST               = $0000001D;
-
-///*******************************************************************/
-// Return types supported by mciSendString                           */
-//   Values 0x0000 -> 0xFF00  are reserved by MMPM2                  */
-//   Values 0xFF01 -> 0xFFFF  are user definable                     */
-///*******************************************************************/
-  MCI_INTEGER_RETURNED          = $1000;
-  MCI_COLONIZED2_RETURN         = $2000;
-  MCI_COLONIZED3_RETURN         = $3000;
-  MCI_COLONIZED4_RETURN         = $4000;
-  MCI_TRUE_FALSE_RETURN         = $5000;
-  MCI_ON_OFF_RETURN             = $6000;
-  MCI_DEVICENAME_RETURN         = $7000;
-  MCI_TIME_FORMAT_RETURN        = $8000;
-  MCI_SPEED_FORMAT_RETURN       = $9000;
-  MCI_MODE_RETURN               = $A000;
-  MCI_MEDIA_TYPE_RETURN         = $B000;
-  MCI_TRACK_TYPE_RETURN         = $C000;
-  MCI_CONNECTOR_TYPE_RETURN     = $D000;
-  MCI_CDXA_CHANNEL_DESTINATION_RETURN = $E000;
-  MCI_PREROLL_TYPE_RETURN       = $F000;
-  MCI_FORMAT_TAG_RETURN         = $F100;
-  MCI_SEQ_SYNCHRONIZATION_RETURN = $F200;
-  MCI_VIDEO_QUALITY_RETURN      = $F300;
-  MCI_AUDIO_QUALITY_RETURN      = $F400;
-  MCI_IMAGE_QUALITY_RETURN      = $F500;
-  MCI_VIDEO_COMPRESSION_RETURN  = $F600;
-  MCI_AUDIO_COMPRESSION_RETURN  = $F700;
-  MCI_IMAGE_COMPRESSION_RETURN  = $F800;
-  MCI_RECTL_RETURN              = $F900;
-  MCI_FOURCC_RETURN             = $FA00;
-  MCI_IMAGE_PELFORMAT_RETURN    = $FB00;
-  MCI_DIRECTION_RETURN          = $FC00;
-  MCI_SIGNED_INTEGER_RETURN     = $FD00;
-
-  MCI_USER_RETURN               = $FF01;
-///*******************************************************************/
-// End of msg text used by mciGetErrorString                         */
-///*******************************************************************/
-  MCIERR_BASE                       = 5000;
-  MCIERR_MSG_TABLE_END          = MCIERR_BASE + 7000;
-
-///*******************************************************************/
-//                                                                   */
-//  MCI DEVICE shareability categories                               */
-//                                                                   */
-///*******************************************************************/
-  FIXEDSINGLECONTEXT            = $0001;
-  DYNAMICSINGLECONTEXT          = $0002;
-  LIMITEDMULTIPLECONTEXT        = $0003;
-  UNLIMITEDMULTIPLECONTEXT      = $0004;
-
-///*******************************************************************/
-// MCI driver flag for close during exit list processing             */
-///*******************************************************************/
-  MCI_CLOSE_EXIT                = $10000000;
-
-///*******************************************************************/
-// MCI driver specific error table resource number base              */
-///*******************************************************************/
-  MMERROR_TABLE_BASE            = 500;
-
-///*******************************************************************/
-//                                                                   */
-//  MCIDRV_CHANGERESOURCE  message flags                             */
-//                                                                   */
-///*******************************************************************/
-
-Type
-  mciDrv_ChangeResource_Parms = record
-    pInstance                   : Pointer;     // pointer to device instance
-    usResourceUnits             : Integer;      // required resource units
-    usResourceClass             : Integer;      // resource class
-    usResourcePriority          : Integer;      // resource priority
-  end;
-  pmciDrv_ChangeResource_Parms = ^mciDrv_ChangeResource_Parms;
-
-///*******************************************************************/
-//                                                                   */
-//  MCIDRV_ENABLE_EVENT message flags                                */
-//                                                                   */
-///*******************************************************************/
-
-Type
-  HSTREAM=LongInt;
-  hID=LongInt;
-  hEvent = LongInt;                // Event Handle
-  phEvent = ^hEvent;             // Pointer to Event Handle
-  HWND = LongInt;
-  MMTIME = LongInt;
-Type
-  evcb = record
-    ulType       : LongInt;              // Event type (input)
-    ulSubType    : LongInt;              // Event SubType (input)
-    ulFlags      : LongInt;              // 0 (Input), status (Output)
-    hstream      : HSTREAM;            // handle to stream for this event
-    hid          : hID;                // handler Id (input/output)
-    ulStatus     : LongInt;              // Event status (output)
-    ulEventParm1 : LongInt;              // Event parameters (input), hID if implicit event
-    ulEventParm2 : LongInt;              // Event parameters (input)
-    ulEventParm3 : LongInt;              // Event parameters (input)
-  end;
-  pevcb = ^evcb;
-
-Type
-  MCIDRV_EVENT_PARMS = record
-    ulLength:LongInt;   // Length of event parms                     */
-    pevcb:PEVCB;      // pointer to event control block            */
-    phevent:PHEVENT;    // pointer to the event to enable in network */
-  end;
-  PMCIDRV_EVENT_PARMS=^MCIDRV_EVENT_PARMS;
-
-///*******************************************************************/
-//                                                                   */
-//  MCIDRV_SYNC  message flags                                       */
-//                                                                   */
-///*******************************************************************/
-Const
-  MCIDRV_SYNC_ENABLE            = $00000100;
-  MCIDRV_SYNC_DISABLE           = $00000200;
-  MCIDRV_SYNC_REC_PULSE         = $00000400;
-  MCIDRV_SYNC_MASTER            = $00000800;
-  MCIDRV_SYNC_SET_MASTER        = $00001000;
-
-Type
-  sync_evcb = record
-    ulType       : LongInt;             // Event_SYNC
-    ulSubType    : LongInt;             // Not used
-    ulSyncFlags  : LongInt;             // 0 (input),status (output)
-    hstream      : HStream;           // handle to stream for this event
-    hid          : hID;               // Handler id
-    ulStatus     : LongInt;             // Event status (output)
-    mmtimeStart  : mmTime;            // Filled in by Sync/Stream manager
-                                      //  at SpiEnableSync time. (input)
-    mmtimeMaster : mmTime;            // Filled in by Master SH (input)
-    mmtimeSlave  : mmTime;            // Filled in by slave SH. (output)
-  end;
-  pSync_evcb = ^sync_Evcb;
-
-Type
-  mciDrv_Sync_Parms = record
-    hStreams                    : ^hStream;    // Pointer to list of stream IDs
-    ulNumStreams                : LongInt;       // number of stream IDs
-    mmTime                      : mmTime;      // Sync Pulse Time
-    NonStreamMaster             : Boolean;        // TRUE if this device can be master
-    pevcbSyncPulse              : pSync_evcb;  // pointer to EVCB address (output)
-    hidMaster                   : hID;         // Master NULL sh ID (valid only on
-                                               //    MCIDRV_SYNC_MASTER
-    ulReserved1                 : LongInt;       // Reserved field
-    ulReserved2                 : LongInt;       // Reserved field
-  end;
-  pmciDrv_Sync_Parms = ^mciDrv_Sync_Parms;
-
-
-//*******************************************************************/
-// contains information for open message for MCI drivers            */
-//*******************************************************************/
-Type
-  mmDrv_Open_Parms = record
-    hwndCallback                : hwnd;        // call back handle
-    usDeviceID                  : Integer;      // The device ID assigned to this instance
-    usDeviceType                : Integer;      // The device type number
-    usDeviceOrd                 : Integer;      // The device ordinal number
-    pInstance                   : Pointer;     //  pointer to the instance structure allocated
-                                               //  initialized by the driver. The MCI driver
-                                               // will fill in this parameter.
-    szDevDLLName : Array[0..259] of Char;      // Character string containing the device
-                                               // specific DLL name to call for the open.
-                                               // (ie. ACPA.DLL)
-    pszElementName              : pChar;       //   typically a file name or NULL
-    usDevParmLen                : Integer;      // Device parameters data block length.
-    pDevParm                    : Pointer;     // Device parameters data block. This data
-                                               // block is unique to each type of device.
-                                               // (ie. LVD "COM1 9600 N 7 1").
-    Reserved0                   : Pointer;
-    usResourceUnitsRequired     : Integer;      // number of resource units this instance
-                                               // requires.
-    usResourceClass             : Integer;      // resource class this instance belongs to
-    usResourcePriority          : Integer;      // resource priority for this instance
-    ulParam2                    : LongInt;       // Pointer to MCI_OPEN structure
-  end;
-  pmmDrv_Open_Parms = ^mmDrv_Open_Parms;
-
-
-///*******************************************************************/
-//                                                                   */
-//  MCIDRV_RESTORE message flags                                     */
-//                                                                   */
-///*******************************************************************/
-
-Type
-  MCIDRV_RESTORE_PARMS = record
-    ulLength:longint;        // Length of restore parms               */
-    ulMasterVolume:longint;  // Master volume value                   */
-  end;
-  PMCIDRV_RESTORE_PARMS=^MCIDRV_RESTORE_PARMS;
-
-function mdmDriverNotify( usDeviceID: Integer; wnd: Hwnd; usMsgType: Integer;
-                          usUserParm: Integer; ulMsgParm: LongInt): LongInt; cdecl;
-
-Implementation
-
-function mdmDriverNotify( usDeviceID: Integer; wnd: Hwnd; usMsgType: Integer;
-                          usUserParm: Integer; ulMsgParm: LongInt): LongInt; cdecl; external 'MDM' index 17;
-
-End.
-
-{
-$Log$
-Revision 1.1  2003-02-15 16:59:09  hajny
-  * mmtk directory corrected to lowercase
-
-Revision 1.1  2003/02/09 13:49:06  hajny
-  + mmtk added
-
-}

+ 0 - 3276
packages/extra/os2units/mmtk/mmbase.pas

@@ -1,3276 +0,0 @@
-{
-    $Id$
-    Copyright (c) 1990-1993 International Business Machines Corporation
-    Copyright (c) 2002 by Andry Svirgunov ([email protected])
-    Copyright (c) 2002-2003 by Yuri Prokushev ([email protected])
-
-    OS/2 Multimedia structures and definitions
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Library General Public License (LGPL) as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version. This program is
-    distributed in the hope that it will be useful, but WITHOUT ANY
-    WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.
-
-    See the GNU Library General Public License for more details. You should
-    have received a copy of the GNU Library General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- **********************************************************************}
-
-{
-@abstract(Multimedia structures and definitions)
-@author(Andry Svirgunov ([email protected]))
-@author(Yuri Prokushev ([email protected]))
-@created(17 Dec 2002)
-@lastmod(19 Jan 2003)
-OS/2 Multimedia structures and definitions
-Warning: This code is alfa. Future versions of this unit will propably
-not be compatible.
-}
-//****************************************************************************/
-//*                                                                          */
-//* Module Name: MMBase.pas                                                  */
-//*                                                                          */
-//* OS/2 2.0 Multimedia Extensions Base Definitions                          */
-//*                                                                          */
-//* Copyright (c) International Business Machines Corporation 1991, 1992     */
-//*                        All Rights Reserved                               */
-//*                                                                          */
-//*------------------------------------------------------------------------- */
-//* Converted by Andry Svirgunov. Email: [email protected]                        */
-//* 14.11.2002.                                                              */
-//* Revised by Yuri Prokushev ([email protected])                        */
-//****************************************************************************/
-
-Unit mmbase;
-
-{$MODE ObjFPC}
-
-Interface
-
-Uses Os2Def;
-
-Type
-        VERSION = WORD;
-        LPSTR = ^Char;
-        LPTR = Pointer;
-        LPRECT = Pointer;
-        HANDLE = HWND;
-        PW = ^Word;
-        PAW = ^Word;
-        PFN = Pointer ;
-        PPFN = ^PFN;
-
-type
-  FNMCI=Function(var p,w:Word;a,b,c:LongInt):Longint;
-
-TYPE
-        PFNMCI = ^FNMCI;
-        SZ = Char;              //* ASCIIZ char string type*/
-        MMTIME = LongInt;       //* universal Chinatown time (1/3000 second)*/
-        PMMTIME = ^MMTIME;      //* Ptr to MMTIME unit*/
-        HMMIO = LongInt;        //* Handle to an MMIO object*/
-        PHMMIO = ^HMMIO;        //* Handle to an MMIO object*/
-
-
-TYPE
-  FOURCC=Cardinal;
-
-//**********************************************
-//*
-//* SPCBKEY - Stream Protocol Key
-//*
-//**********************************************/
-Type _SPCBKEY = record                  //* spcbkey SPCB key (Stream data type) */
-        ulDataType : LongInt;
-        ulDataSubType : LongInt;
-        ulIntKey : LongInt;             //* generated internal key            */
-        end;
-TYPE PSPCBKEY = ^_SPCBKEY;
-
-Const
-
-        _SPCBKEY_DEFINED = 1;
-
-//**********************************************
-// *
-// * MMTRACKINFO - This structure is used to
-// *            represent a video, audio or
-// *            some other type of track
-// *            within a digital video movie
-// *            file.
-// *
-// **********************************************/
-TYPE _MMTRACKINFO = record      //* mmtrackinfo */
-        ulTrackID : LongInt;    //* track identifier */
-        ulMediaType : LongInt;  //* media type */
-        ulCountry : LongInt;    //* country code for the track */
-        ulCodePage : LongInt;   //* country code page for the track */
-        ulReserved1: LongInt;   //* reserved must be 0 */
-        ulReserved2 : LongInt;  //* reserved must be 0 */
-        end;
-
-TYPE PMMTRACKINFO = ^_MMTRACKINFO; //* Ptr to a track table entry */
-
-//************************
-// * Clipboard formats
-// ************************/
-CONST
-        CF_RMID = 10;
-        CF_RIFF = 11;
-        CF_WAVE = 12;
-        CF_AVI = 13;
-//************************
-// * Resource formats
-// ************************/
-        RT_RMID = 100;
-        RT_RIFF = 101;
-        RT_WAVE = 102;
-        RT_AVI = 103;
-        RT_AVS = 104;
-
-
-//************************
-// * Drag formats
-// ************************/
-        DRT_WAVE = 'DIGITAL AUDIO';
-        DRT_AVI = 'DIGITAL VIDEO';
-        DRT_MIDI = 'MIDI';
-
-
-//************************
-// * Sampling Rate
-// ************************/
-        HZ_8000 = 8000;         //* 8.0 kHz*/
-        HZ_11025 = 11025;       //* 11.025 kHz*/
-        HZ_14700 = 14700;       //* 14.700 kHz (SPV/2)*/
-        HZ_18900 = 18900;       //* 18.900 kHz (CD/XA LVL C)*/
-        HZ_22050 = 22050;       //* 22.050 kHz*/
-        HZ_37800 = 37800;       //* 37.800 kHz (CD/XA LVL B)*/
-        HZ_44100 = 44100;       //* 44.100 kHz*/
-
-//************************
-// * Bits per Sample
-// ************************/
-        BPS_4 = 4;              //* 4 bits/sample (ADPCM)*/
-        BPS_8 = 8;              //* 8 bits/sample (PCM)*/
-        BPS_16 =16;             //* 16 bits/sample(PCM)*/
-
-//************************
-//* Channels
-//************************/
-        CH_1 = 1;               //* Mono*//
-        CH_2 = 2;               //* Stereo*//
-        CH_4 = 4;               //* Quad*//
-
-
-//*************************************************************************
-// * Multimedia Datatypes (spcbkey values)
-// *************************************************************************/
-
-
-///****************
-// * NULL datatype
-// ****************/
-        DATATYPE_NULL = $0000;  //* NULL stream data type (NULL)*/
-        SUBTYPE_NONE = $0000;   //* No subtype for this data type*/
-
-//*********************
-// * WAVEFORM datatypes
-// *********************/
-        DATATYPE_WAVEFORM = $0001; //* WAVEFORM audio (PCM)*/
-
-
-//* Subtypes for DATATYPE_WAVEFORM:*/
-        WAVE_FORMAT_1M08 = $0001;       //* 11.025kHz, Mono  , 8-bit*/
-        WAVE_FORMAT_1S08 = $0002;       //* 11.025kHz, Stereo, 8-bit*/
-        WAVE_FORMAT_1M16 = $0003;       //* 11.025kHz, Mono  , 16-bit*/
-        WAVE_FORMAT_1S16 = $0004;       //* 11.025kHz, Stereo, 16-bit*/
-        WAVE_FORMAT_2M08 = $0005;       //* 22.05kHz , Mono  , 8-bit*/
-        WAVE_FORMAT_2S08 = $0006;       //* 22.05kHz , Stereo, 8-bit*/
-        WAVE_FORMAT_2M16 = $0007;       //* 22.05kHz , Mono  , 16-bit*/
-        WAVE_FORMAT_2S16 = $0008;       //* 22.05kHz , Stereo, 16-bit*/
-        WAVE_FORMAT_4M08 = $0009;       //* 44.1kHz  , Mono  , 8-bit*/
-        WAVE_FORMAT_4S08 = $000A;       //* 44.1kHz  , Stereo, 8-bit*/
-        WAVE_FORMAT_4M16 = $000B;       //* 44.1kHz  , Mono  , 16-bit*/
-        WAVE_FORMAT_4S16 = $000C;       //* 44.1kHz  , Stereo, 16-bit*/
-        WAVE_FORMAT_8M08 = $000D;       //*  8.0kHz  , Mono  , 8-bit*/
-        WAVE_FORMAT_8S08 = $000E;       //*  8.0kHz  , Stereo, 8-bit*/
-        WAVE_FORMAT_8M16 = $000F;       //*  8.0kHz  , Mono  , 16-bit*/
-        WAVE_FORMAT_8S16 = $0010;       //*  8.0kHz  , Stereo, 16-bit*/
-
-//*********************
-// * DIGVIDEO datatypes
-// *********************/
-        DATATYPE_DIGVIDEO = $0002;      //* Digital Video */
-
-//* Subtypes for DATATYPE_DIGVIDEO:*/
-        DIGVIDEO_PHOTOM = $544F4850;    //* Photmotion video, FOURCC value for phio */
-        DIGVIDEO_ULTIM = $49544C55;     //* Ultimotion video, FOURCC value for ulio */
-        DIGVIDEO_AVI = $20495641;       //* AVI video, FOURCC value for avio */
-        DIGVIDEO_MONITOR = $206E6FD;    //* MONITOR video, FOURCC value for monitoring */
-        DIGVIDEO_FLC = $63696C66;       //* FLIC video, FOURCC value for flic */
-        DIGVIDEO_MPEG = $4745504D;      //* MPEG video, FOURCC value for MPEG */
-
-//******************
-// * MuLaw datatypes
-//******************/
-        DATATYPE_MULAW = $0101;         //* MuLaw*/
-        DATATYPE_RIFF_MULAW = $0007;    //* MuLaw*/
-
-//* Subtypes for DATATYPE_MULAW:*/
-
-        MULAW_8B8KS = $0001;            //* 8bit 8kHz stereo*/
-        MULAW_8B11KS = $0002;           //* 8bit 11kHz stereo*/
-        MULAW_8B22KS = $0003;           //* 8bit 22kHz stereo*/
-        MULAW_8B44KS = $0004;           //* 8bit 44kHz stereo*/
-        MULAW_8B8KM = $0005;            //* 8bit 8kHz mono*/
-        MULAW_8B11KM = $0006;           //* 8bit 11kHz mono*/
-        MULAW_8B22KM = $0007;           //* 8bit 22kHz mono*/
-        MULAW_8644KM = $0008;           //* 8bit 44kHz mono*/
-
-//*****************
-// * ALaw datatypes
-// *****************/
-        DATATYPE_ALAW = $0102;          //* ALaw*/
-        DATATYPE_RIFF_ALAW = $0006;     //* ALaw*/
-
-//* Subtypes for DATATYPE_ALAW:*/
-        ALAW_8B8KS = $0001;             //* 8bit 8kHz stereo*/
-        ALAW_8B11KS = $0002;            //* 8bit 11kHz stereo*/
-        ALAW_8B22KS = $0003;            //* 8bit 22kHz stereo*/
-        ALAW_8B44KS = $0004;            //* 8bit 44kHz stereo*/
-        ALAW_8B8KM = $0005;             //* 8bit 8kHz mono*/
-        ALAW_8B11KM = $0006;            //* 8bit 11kHz mono*/
-        ALAW_8B22KM = $0007;            //* 8bit 22kHz mono*/
-        ALAW_8B44KM = $0008;            //* 8bit 44kHz mono*/
-
-//*******************************
-// * AVC ADPCM WAVEFORM datatypes
-// *******************************/
-        DATATYPE_ADPCM_AVC = $0103;     //* ADPCM audio*/
-
-//* Subtypes for DATATYPE_ADPCM_AVC:*/
-        ADPCM_AVC_VOICE = $0001;
-        ADPCM_AVC_MUSIC = $0002;
-        ADPCM_AVC_STEREO = $0003;
-        ADPCM_AVC_HQ = $0004;
-
-//******************
-// * CT_ADPCM datatypes
-// ******************/
-        DATATYPE_CT_ADPCM = $0200;      //* Creative technologies */
-
-//* Subtypes for DATATYPE_CT_ADPCM:*/
-
-        CD_ADPCM_16B8KS = $0001;        //* 16bit 8kHz stereo*/
-        CD_ADPCM_16B11KS = $0002;       //* 16bit 11kHz stereo*/
-        CD_ADPCM_16B22KS = $0003;       //* 16bit 22kHz stereo*/
-        CD_ADPCM_16B44KS = $0004;       //* 16bit 44kHz stereo*/
-        CD_ADPCM_16B8KM = $0005;        //* 16bit 8kHz mono*/
-        CD_ADPCM_16B11KM = $0006;       //* 16bit 11kHz mono*/
-        CD_ADPCM_16B22KM = $0007;       //* 16bit 22kHz mono*/
-        CD_ADPCM_16B44KM = $0008;       //* 16bit 44kHz mono*/
-
-//****************
-// * MIDI datatype
-// ****************/
-
-        DATATYPE_MIDI = $0201;          //* MIDI*/
-//*         SUBTYPE_NONE            0x0000L      No subtype for this data type*/
-
-
-//********************
-// * GENERIC datatypes
-// ********************/
-        DATATYPE_GENERIC = $0202;       //* Generic for files / memory. This*/
-                                        //* datatype will match any other*/
-                                        //* datatype at stream creation time.*/
-
-//**************************
-// * Speech Viewer datatypes
-// **************************/
-
-        DATATYPE_SPV2 = $0203;          //* Speech Viewer*/
-
-//* Subtypes for DATATYPE_SPV2:*/
-
-        SPV2_BPCM = $0001;
-        SPV2_PCM = $0002;
-        SPV2_NONE = $0003;
-
-//******************
-// * CD-XA datatypes
-// ******************/
-
-        DATATYPE_CDXA_VIDEO = $0204;    //* CD-XA Video datatype*/
-        DATATYPE_CDXA_DATA = $0205;     //* CD-XA sub-band data datatype*/
-        DATATYPE_CDXA_AUDIO = $0206;    //* CD-XA ADPCM Audio datatype*/
-        DATATYPE_CDXA_AUDIO_HD = $0207; //* CD-XA ADPCM Audio with Headers*/
-        DATATYPE_CDXA_HEADERS = $0208;  //* CD-XA Headers and Subheaders*/
-
-//* Subtypes for DATATYPE_CDXA_AUDIO:*/
-
-        DATATYPE_LEVELB = $0000;        //* LEVEL B Audio Stereo*/
-        DATATYPE_LEVELC = $0001;        //* LEVEL C Audio Stereo*/
-        DATATYPE_LEVELB_MONO = $0002;   //* LEVEL B Audio Mono*/
-        DATATYPE_LEVELC_MONO = $0003;   //* LEVEL C Audio Mono*/
-
-//*********************
-// * DIGISPEECH datatype
-// *********************/
-        DATATYPE_DIGISPEECH = $0208;    //* DIGISPEECH */
-        DATATYPE_NATIVE = $0001;        //* Native digispeech */
-
-//*********************
-// * MPEG-1 Audio datatypes
-// *********************/
-        DATATYPE_MPEG1AUDIO = $0050;    //* MPEG-1 Audio */
-
-//* Subtypes for DATATYPE_MPEG1AUDIO:*/
-        MPEG1_FORMAT_3M16 = $0001;      //* 32.000kHz,  Mono  , 16-bit*/
-        MPEG1_FORMAT_3S16 = $0002;      //* 32.000kHz,  Stereo, 16-bit*/
-        MPEG1_FORMAT_4M16 = $0003;      //* 44.1/48kHz, Mono  , 16-bit*/
-        MPEG1_FORMAT_4S16 = $0004;      //* 44.1/48kHz, Stereo, 16-bit*/
-
-//*******************
-// * UNKNOWN datatype
-// *******************/
-        DATATYPE_UNKNOWN = $FFFFFFFF;   //* Unknown datatype */
-
-//*         SUBTYPE_NONE            0x0000L      No subtype for this data type*/
-
-
-// ERROR CODES
-
-CONST
-
-NO_ERROR = 0;
-//*****************************************/
-//* MCI Device Manager Error Return codes */
-//*****************************************/
-
-CONST
-MCIERR_BASE                     = 5000;
-MCIERR_SUCCESS                  = 0;
-MCIERR_INVALID_DEVICE_ID        =(MCIERR_BASE + 1);
-MCIERR_NO_MASTER                =(MCIERR_BASE + 2);
-MCIERR_UNRECOGNIZED_KEYWORD     =(MCIERR_BASE + 3);
-MCIERR_MASTER_CONFLICT          =(MCIERR_BASE + 4);
-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_CANNOT_ADD_ALIAS         =(MCIERR_BASE + 27);
-MCIERR_FLAGS_NOT_COMPATIBLE     =(MCIERR_BASE + 28);
-MCIERR_CANNOT_USE_NOUNLOAD      =(MCIERR_BASE + 29);
-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_INSTANCE_INACTIVE        =(MCIERR_BASE + 34);
-
-MCIERR_COMMAND_TABLE            =(MCIERR_BASE + 35);
-MCIERR_INI_FILE_LOCKED          =(MCIERR_BASE + 37);
-
-MCIERR_NO_AUDIO_SUPPORT         =(MCIERR_BASE + 40);
-MCIERR_NOT_IN_PM_SESSION        =(MCIERR_BASE + 41);
-MCIERR_DUPLICATE_KEYWORD        =(MCIERR_BASE + 42);
-MCIERR_COMMAND_STRING_OVERFLOW  =(MCIERR_BASE + 43);
-MCIERR_DRIVER_PROC_NOT_FOUND    =(MCIERR_BASE + 44);
-MCIERR_INVALID_DEVICE_TYPE      =(MCIERR_BASE + 45);
-MCIERR_INVALID_DEVICE_ORDINAL   =(MCIERR_BASE + 46);
-MCIERR_HEADPHONES_NOT_SET       =(MCIERR_BASE + 47);
-MCIERR_SPEAKERS_NOT_SET         =(MCIERR_BASE + 48);
-MCIERR_SOUND_NOT_SET            =(MCIERR_BASE + 49);
-MCIERR_INVALID_BUFFER           =(MCIERR_BASE + 50);
-MCIERR_INVALID_MEDIA_TYPE       =(MCIERR_BASE + 51);
-MCIERR_INVALID_CONNECTOR_INDEX  =(MCIERR_BASE + 52);
-MCIERR_NO_CONNECTION            =(MCIERR_BASE + 53);
-MCIERR_INVALID_FLAG             =(MCIERR_BASE + 54);
-MCIERR_CANNOT_LOAD_DSP_MOD      =(MCIERR_BASE + 55);
-MCIERR_ALREADY_CONNECTED        =(MCIERR_BASE + 56);
-MCIERR_INVALID_CALLBACK_HANDLE  =(MCIERR_BASE + 57);
-MCIERR_DRIVER_NOT_FOUND         =(MCIERR_BASE + 58);
-MCIERR_DUPLICATE_DRIVER         =(MCIERR_BASE + 59);
-MCIERR_INI_FILE                 =(MCIERR_BASE + 60);
-MCIERR_INVALID_GROUP_ID         =(MCIERR_BASE + 61);
-MCIERR_ID_ALREADY_IN_GROUP      =(MCIERR_BASE + 62);
-MCIERR_MEDIA_CHANGED            =(MCIERR_BASE + 63);
-MCIERR_MISSING_FLAG             =(MCIERR_BASE + 64);
-MCIERR_UNSUPPORTED_FLAG         =(MCIERR_BASE + 65);
-MCIERR_DRIVER_NOT_LOADED        =(MCIERR_BASE + 66);
-MCIERR_INVALID_MODE             =(MCIERR_BASE + 67);
-MCIERR_INVALID_ITEM_FLAG        =(MCIERR_BASE + 68);
-MCIERR_INVALID_TIME_FORMAT_FLAG =(MCIERR_BASE + 69);
-MCIERR_SPEED_FORMAT_FLAG        =(MCIERR_BASE + 70);
-MCIERR_INVALID_AUDIO_FLAG       =(MCIERR_BASE + 71);
-MCIERR_NODEFAULT_DEVICE         =(MCIERR_BASE + 72);
-MCIERR_DUPLICATE_EXTENSION      =(MCIERR_BASE + 73);
-MCIERR_FILE_ATTRIBUTE           =(MCIERR_BASE + 74);
-MCIERR_DUPLICATE_CUEPOINT       =(MCIERR_BASE + 75);
-MCIERR_INVALID_CUEPOINT         =(MCIERR_BASE + 76);
-MCIERR_CUEPOINT_LIMIT_REACHED   =(MCIERR_BASE + 77);
-MCIERR_MISSING_ITEM             =(MCIERR_BASE + 78);
-MCIERR_MISSING_TIME_FORMAT      =(MCIERR_BASE + 79);
-MCIERR_MISSING_SPEED_FORMAT     =(MCIERR_BASE + 80);
-MCIERR_INVALID_CONNECTOR_TYPE   =(MCIERR_BASE + 81);
-MCIERR_TARGET_DEVICE_FULL       =(MCIERR_BASE + 82);
-MCIERR_UNSUPPORTED_CONN_TYPE    =(MCIERR_BASE + 83);
-MCIERR_CANNOT_MODIFY_CONNECTOR  =(MCIERR_BASE + 84);
-MCIERR_RECORD_ABORTED           =(MCIERR_BASE + 85);
-MCIERR_GROUP_COMMAND            =(MCIERR_BASE + 86);
-MCIERR_DEVICE_NOT_FOUND         =(MCIERR_BASE + 87);
-MCIERR_RESOURCE_NOT_AVAILABLE   =(MCIERR_BASE + 88);
-MCIERR_INVALID_IO_PROC          =(MCIERR_BASE + 89);
-
-MCIERR_WAVE_OUTPUTSINUSE        =(MCIERR_BASE + 90);
-MCIERR_WAVE_SETOUTPUTINUSE      =(MCIERR_BASE + 91);
-MCIERR_WAVE_INPUTSINUSE         =(MCIERR_BASE + 92);
-MCIERR_WAVE_SETINPUTINUSE       =(MCIERR_BASE + 93);
-MCIERR_WAVE_OUTPUTUNSPECIFIED   =(MCIERR_BASE + 94);
-MCIERR_WAVE_INPUTUNSPECIFIED    =(MCIERR_BASE + 95);
-MCIERR_WAVE_OUTPUTSUNSUITABLE   =(MCIERR_BASE + 96);
-MCIERR_WAVE_SETOUTPUTUNSUITABLE =(MCIERR_BASE + 97);
-MCIERR_WAVE_INPUTSUNSUITABLE    =(MCIERR_BASE + 98);
-MCIERR_WAVE_SETINPUTUNSUITABLE  =(MCIERR_BASE + 99);
-
-MCIERR_SEQ_DIV_INCOMPATIBLE     =(MCIERR_BASE + 100);
-MCIERR_SEQ_PORT_INUSE           =(MCIERR_BASE + 101);
-MCIERR_SEQ_PORT_NONEXISTENT     =(MCIERR_BASE + 102);
-MCIERR_SEQ_PORT_MAPNODEVICE     =(MCIERR_BASE + 103);
-MCIERR_SEQ_PORT_MISCERROR       =(MCIERR_BASE + 104);
-MCIERR_SEQ_TIMER                =(MCIERR_BASE + 105);
-
-MCIERR_VDP_COMMANDCANCELLED     =(MCIERR_BASE + 106);
-MCIERR_VDP_COMMANDFAILURE       =(MCIERR_BASE + 107);
-MCIERR_VDP_NOTSPUNUP            =(MCIERR_BASE + 108);
-MCIERR_VDP_NOCHAPTER            =(MCIERR_BASE + 109);
-MCIERR_VDP_NOSIDE               =(MCIERR_BASE + 110);
-MCIERR_VDP_NOSIZE               =(MCIERR_BASE + 111);
-MCIERR_VDP_INVALID_TIMEFORMAT   =(MCIERR_BASE + 112);
-
-MCIERR_CLIPBOARD_ERROR          =(MCIERR_BASE + 114);
-MCIERR_CANNOT_CONVERT           =(MCIERR_BASE + 115);
-MCIERR_CANNOT_REDO              =(MCIERR_BASE + 116);
-MCIERR_CANNOT_UNDO              =(MCIERR_BASE + 117);
-MCIERR_CLIPBOARD_EMPTY          =(MCIERR_BASE + 118);
-
-MCIERR_INVALID_WORKPATH         =(MCIERR_BASE + 119);
-MCIERR_INDETERMINATE_LENGTH     =(MCIERR_BASE + 120);
-MCIERR_DUPLICATE_EA             =(MCIERR_BASE + 121);
-MCIERR_INVALID_CONNECTION       =(MCIERR_BASE + 122);
-MCIERR_CHANNEL_OFF              =(MCIERR_BASE + 123);
-MCIERR_CANNOT_CHANGE_CHANNEL    =(MCIERR_BASE + 124);
-MCIERR_FILE_IO                  =(MCIERR_BASE + 125);
-MCIERR_SYSTEM_FILE              =(MCIERR_BASE + 126);
-MCIERR_DISPLAY_RESOLUTION       =(MCIERR_BASE + 127);
-MCIERR_NO_ASYNC_PLAY_ACTIVE     =(MCIERR_BASE + 128);
-
-MCIERR_UNSUPP_FORMAT_TAG        =(MCIERR_BASE + 129);
-MCIERR_UNSUPP_SAMPLESPERSEC     =(MCIERR_BASE + 130);
-MCIERR_UNSUPP_BITSPERSAMPLE     =(MCIERR_BASE + 131);
-MCIERR_UNSUPP_CHANNELS          =(MCIERR_BASE + 132);
-MCIERR_UNSUPP_FORMAT_MODE       =(MCIERR_BASE + 133);
-MCIERR_NO_DEVICE_DRIVER         =(MCIERR_BASE + 134);
-MCIERR_CODEC_NOT_SUPPORTED      =(MCIERR_BASE + 135);
-
-MCIERR_TUNER_NO_HW              =(MCIERR_BASE + 136);
-MCIERR_TUNER_NO_AFC             =(MCIERR_BASE + 137);
-MCIERR_TUNER_AFC_ON             =(MCIERR_BASE + 138);
-MCIERR_TUNER_CHANNEL_SKIPPED    =(MCIERR_BASE + 139);
-MCIERR_TUNER_CHANNEL_TOO_LOW    =(MCIERR_BASE + 140);
-MCIERR_TUNER_CHANNEL_TOO_HIGH   =(MCIERR_BASE + 141);
-MCIERR_AUD_CHANNEL_OUTOFRANGE   =(MCIERR_BASE + 142);
-MCIERR_TUNER_INVALID_REGION     =(MCIERR_BASE + 143);
-MCIERR_SIGNAL_INVALID           =(MCIERR_BASE + 144);
-MCIERR_TUNER_MODE               =(MCIERR_BASE + 145);
-MCIERR_TUNER_REGION_NOT_SET     =(MCIERR_BASE + 146);
-MCIERR_TUNER_CHANNEL_NOT_SET    =(MCIERR_BASE + 147);
-MCIERR_UNSUPP_CLASS             =(MCIERR_BASE + 148);
-MCIERR_UNSUPPORTED_ATTRIBUTE    =(MCIERR_BASE + 149);
-
-MCIERR_CUSTOM_DRIVER_BASE       =(MCIERR_BASE + 256);
-
-//******************************************/
-//* Sync/Stream Manager Error Return codes */
-//******************************************/
-
-MEBASE                          =(MCIERR_BASE + 500);
-ERROR_INVALID_STREAM            =(MEBASE + 1);
-ERROR_INVALID_HID               =(MEBASE + 2);
-ERROR_INVALID_NETWORK           =(MEBASE + 3);
-ERROR_INVALID_OBJTYPE           =(MEBASE + 4);
-ERROR_INVALID_FLAG              =(MEBASE + 5);
-ERROR_INVALID_EVCB              =(MEBASE + 6);
-ERROR_INVALID_EVENT             =(MEBASE + 7);
-ERROR_INVALID_MMTIME            =(MEBASE + 8);
-ERROR_INVALID_NUMSLAVES         =(MEBASE + 9);
-ERROR_INVALID_REQUEST           =(MEBASE + 10);
-ERROR_INVALID_SPCBKEY           =(MEBASE + 11);
-ERROR_INVALID_HNDLR_NAME        =(MEBASE + 12);
-ERROR_INVALID_PROTOCOL          =(MEBASE + 13);
-ERROR_INVALID_BUFFER_SIZE       =(MEBASE + 14);
-ERROR_INVALID_BUFFER_RETURNED   =(MEBASE + 15);
-ERROR_INVALID_ACB               =(MEBASE + 16);
-ERROR_INVALID_RECORD_RETURNED   =(MEBASE + 17);
-ERROR_INVALID_MESSAGE           =(MEBASE + 18);
-
-ERROR_STREAM_NOT_OWNER          =(MEBASE + 99);
-ERROR_STREAM_USED               =(MEBASE + 100);
-ERROR_STREAM_CREATION           =(MEBASE + 101);
-ERROR_STREAM_NOTMASTER          =(MEBASE + 102);
-ERROR_STREAM_NOT_STOP           =(MEBASE + 103);
-ERROR_STREAM_OPERATION          =(MEBASE + 104);
-ERROR_STREAM_STOP_PENDING       =(MEBASE + 105);
-ERROR_STREAM_ALREADY_STOP       =(MEBASE + 106);
-ERROR_STREAM_ALREADY_PAUSE      =(MEBASE + 107);
-ERROR_STREAM_NOT_STARTED        =(MEBASE + 108);
-ERROR_STREAM_NOT_ACTIVE         =(MEBASE + 109);
-ERROR_START_STREAM              =(MEBASE + 110);
-ERROR_MASTER_USED               =(MEBASE + 111);
-ERROR_SPCBKEY_MISMATCH          =(MEBASE + 112);
-ERROR_INSUFF_BUFFER             =(MEBASE + 113);
-ERROR_ALLOC_RESOURCES           =(MEBASE + 114);
-ERROR_ACCESS_OBJECT             =(MEBASE + 115);
-ERROR_HNDLR_REGISTERED          =(MEBASE + 116);
-ERROR_DATA_ITEM_NOT_SPECIFIED   =(MEBASE + 117);
-ERROR_INVALID_SEQUENCE          =(MEBASE + 118);
-ERROR_INITIALIZATION            =(MEBASE + 119);
-ERROR_READING_INI               =(MEBASE + 120);
-ERROR_LOADING_HNDLR             =(MEBASE + 121);
-ERROR_HNDLR_NOT_FOUND           =(MEBASE + 122);
-ERROR_SPCB_NOT_FOUND            =(MEBASE + 123);
-ERROR_DEVICE_NOT_FOUND          =(MEBASE + 124);
-ERROR_TOO_MANY_EVENTS           =(MEBASE + 125);
-ERROR_DEVICE_OVERRUN            =(MEBASE + 126);
-ERROR_DEVICE_UNDERRUN           =(MEBASE + 127);
-ERROR_HNDLR_NOT_IN_INI          =(MEBASE + 128);
-ERROR_QUERY_STREAM_TIME         =(MEBASE + 129);
-ERROR_DATA_ITEM_NOT_SEEKABLE    =(MEBASE + 130);
-ERROR_NOT_SEEKABLE_BY_TIME      =(MEBASE + 131);
-ERROR_NOT_SEEKABLE_BY_BYTES     =(MEBASE + 132);
-ERROR_STREAM_NOT_SEEKABLE       =(MEBASE + 133);
-ERROR_PLAYLIST_STACK_OVERFLOW   =(MEBASE + 135);
-ERROR_PLAYLIST_STACK_UNDERFLOW  =(MEBASE + 136);
-ERROR_LOCKING_BUFFER            =(MEBASE + 137);
-ERROR_UNLOCKING_BUFFER          =(MEBASE + 138);
-ERROR_SEEK_PAST_END             =(MEBASE + 139);
-ERROR_SEEK_BACK_NOT_SUPPORTED   =(MEBASE + 140);
-ERROR_INTERNAL_ERROR            =(MEBASE + 141);
-ERROR_INTERNAL_CORRUPT          =(MEBASE + 142);
-ERROR_INSUFF_MEM                =(MEBASE + 143);
-ERROR_LARGE_SEEK_BY_TIME        =(MEBASE + 144);
-ERROR_STREAM_PREROLLING         =(MEBASE + 145);
-ERROR_INI_FILE                  =(MEBASE + 146);
-ERROR_SEEK_BEFORE_BEGINNING     =(MEBASE + 147);
-ERROR_TOO_MANY_HANDLERS         =(MEBASE + 148);
-ERROR_ALLOC_HEAP                =(MEBASE + 149);
-ERROR_END_OF_PLAYLIST           =(MEBASE + 150);
-ERROR_TOO_MANY_STREAMS          =(MEBASE + 151);
-ERROR_FILE_FORMAT_INCORRECT     =(MEBASE + 152);
-ERROR_DESTROY_STREAM            =(MEBASE + 153);
-ERROR_INVALID_NUMMASTERS        =(MEBASE + 154);
-ERROR_MASTER_CONFLICT           =(MEBASE + 155);
-ERROR_NO_MASTER                 =(MEBASE + 156);
-ERROR_NO_SYNC                   =(MEBASE + 157);
-ERROR_STREAM_ALREADY_IN_NETWORK =(MEBASE + 158);
-ERROR_NO_STREAMS_IN_NETWORK     =(MEBASE + 159);
-ERROR_MISSING_EVENT_ROUTINE     =(MEBASE + 160);
-ERROR_CAN_NOT_REMOVE_STREAM     =(MEBASE + 161);
-
-ERROR_BUFFER_NOT_AVAILABLE      =(MEBASE + 400);
-ERROR_TOO_MANY_BUFFERS          =(MEBASE + 401);
-ERROR_TOO_MANY_RECORDS          =(MEBASE + 402);
-
-
-//*----- ERROR_INVALID_PROTOCOL ulErrorStatus defines -----*/
-//*----- Refer to SHC_NEGOTIATE_RESULT api.*/
-PROTOCOL_SPCBLENGTH            =1;
-PROTOCOL_SPCBKEY               =2;
-PROTOCOL_DATAFLAG              =3;
-PROTOCOL_NUMRECORDS            =4;
-PROTOCOL_BLOCKSIZE             =5;
-PROTOCOL_BUFFERSIZE            =6;
-PROTOCOL_MINNUMBUFFERS         =7;
-PROTOCOL_MAXNUMBUFFERS         =8;
-PROTOCOL_SOURCESTART           =9;
-PROTOCOL_TARGETSTART           =10;
-PROTOCOL_BUFFERFLAG            =11;
-PROTOCOL_HANDLERFLAG           =12;
-PROTOCOL_SYNCTOLERANCE         =13;
-PROTOCOL_SYNCINTERVAL          =14;
-PROTOCOL_INTERNALERROR         =-1;
-
-//***********************************/
-//* MMIO Manager Error Return codes */
-//***********************************/
-
-MMIOERR_BASE                   =(MEBASE + 1000);
-MMIOERR_UNBUFFERED             =(MMIOERR_BASE + 1);
-MMIOERR_CANNOTWRITE            =(MMIOERR_BASE + 2);
-MMIOERR_CHUNKNOTFOUND          =(MMIOERR_BASE + 3);
-
-MMIOERR_INVALID_HANDLE         =(MMIOERR_BASE + 4);
-MMIOERR_INVALID_PARAMETER      =(MMIOERR_BASE + 5);
-MMIOERR_INTERNAL_SYSTEM        =(MMIOERR_BASE + 6);
-MMIOERR_NO_CORE                =(MMIOERR_BASE + 7);
-
-MMIOERR_INI_OPEN               =(MMIOERR_BASE + 8);
-MMIOERR_INI_READ               =(MMIOERR_BASE + 9);
-
-MMIOERR_INVALID_BUFFER_LENGTH  =(MMIOERR_BASE + 10);
-MMIOERR_NO_BUFFER_ALLOCATED    =(MMIOERR_BASE + 11);
-MMIOERR_NO_FLUSH_FOR_MEM_FILE  =(MMIOERR_BASE + 12);
-MMIOERR_NO_FLUSH_NEEDED        =(MMIOERR_BASE + 13);
-MMIOERR_READ_ONLY_FILE         =(MMIOERR_BASE + 14);
-MMIOERR_WRITE_ONLY_FILE        =(MMIOERR_BASE + 15);
-MMIOERR_INSTALL_PROC_FAILED    =(MMIOERR_BASE + 16);
-MMIOERR_READ_FAILED            =(MMIOERR_BASE + 17);
-MMIOERR_WRITE_FAILED           =(MMIOERR_BASE + 18);
-MMIOERR_SEEK_FAILED            =(MMIOERR_BASE + 19);
-MMIOERR_CANNOTEXPAND           =(MMIOERR_BASE + 20);
-MMIOERR_FREE_FAILED            =(MMIOERR_BASE + 21);
-MMIOERR_EOF_SEEN               =(MMIOERR_BASE + 22);
-MMIOERR_INVALID_ACCESS_FLAG    =(MMIOERR_BASE + 23);
-MMIOERR_INVALID_STRUCTURE      =(MMIOERR_BASE + 24);
-MMIOERR_INVALID_SIZE           =(MMIOERR_BASE + 25);
-MMIOERR_INVALID_FILENAME       =(MMIOERR_BASE + 26);
-
-MMIOERR_CF_DUPLICATE_SEEN      =(MMIOERR_BASE + 27);
-MMIOERR_CF_ENTRY_NO_CORE       =(MMIOERR_BASE + 28);
-MMIOERR_CF_WO_UNSUPPORTED      =(MMIOERR_BASE + 29);
-MMIOERR_CF_ELEMENTS_OPEN       =(MMIOERR_BASE + 30);
-MMIOERR_CF_NON_BND_FILE        =(MMIOERR_BASE + 31);
-MMIOERR_CF_ENTRY_NOT_FOUND     =(MMIOERR_BASE + 32);
-
-MMIOERR_DELETE_FAILED          =(MMIOERR_BASE + 33);
-MMIOERR_OUTOFMEMORY            =(MMIOERR_BASE + 34);
-
-MMIOERR_INVALID_DLLNAME        =(MMIOERR_BASE + 35);
-MMIOERR_INVALID_PROCEDURENAME  =(MMIOERR_BASE + 36);
-MMIOERR_MATCH_NOT_FOUND        =(MMIOERR_BASE + 37);
-
-MMIOERR_SEEK_BEFORE_BEGINNING  =(MMIOERR_BASE + 38);
-MMIOERR_INVALID_FILE           =(MMIOERR_BASE + 39);
-MMIOERR_QOSUNAVAILABLE         =(MMIOERR_BASE + 40);
-MMIOERR_MEDIA_NOT_FOUND        =(MMIOERR_BASE + 41);
-
-MMIOERR_ERROR_IN_FRAME_DATA    =(MMIOERR_BASE + 42);
-MMIOERR_INVALID_DIM_ALIGN      =(MMIOERR_BASE + 43);
-MMIOERR_CODEC_NOT_SUPPORTED    =(MMIOERR_BASE + 44);
-
-MMIOERR_UNSUPPORTED_FUNCTION   =(MMIOERR_BASE + 45);
-MMIOERR_CLIPBRD_ERROR          =(MMIOERR_BASE + 46);
-MMIOERR_CLIPBRD_ACTIVE         =(MMIOERR_BASE + 47);
-MMIOERR_CLIPBRD_EMPTY          =(MMIOERR_BASE + 48);
-MMIOERR_NEED_NEW_FILENAME      =(MMIOERR_BASE + 49);
-MMIOERR_INVALID_TRACK_OPERATION=(MMIOERR_BASE + 50);
-MMIOERR_INCOMPATIBLE_DATA      =(MMIOERR_BASE + 51);
-MMIOERR_ACCESS_DENIED          =(MMIOERR_BASE + 52);
-MMIOERR_MISSING_FLAG           =(MMIOERR_BASE + 53);
-MMIOERR_INVALID_ITEM_FLAG      =(MMIOERR_BASE + 54);
-
-//*************************************/
-//* Real-Time MIDI Error Return Codes */
-//*************************************/
-
-MIDIERR_BASE                     =(MMIOERR_BASE + 500);
-
-MIDIERR_DUPLICATE_INSTANCE_NAME  =(MIDIERR_BASE + 1);
-MIDIERR_HARDWARE_FAILED          =(MIDIERR_BASE + 2);
-MIDIERR_INTERNAL_SYSTEM          =(MIDIERR_BASE + 3);
-MIDIERR_INVALID_BUFFER_LENGTH    =(MIDIERR_BASE + 4);
-MIDIERR_INVALID_CLASS_NUMBER     =(MIDIERR_BASE + 5);
-MIDIERR_INVALID_CONFIG_DATA      =(MIDIERR_BASE + 6);
-MIDIERR_INVALID_FLAG             =(MIDIERR_BASE + 7);
-MIDIERR_INVALID_INSTANCE_NAME    =(MIDIERR_BASE + 8);
-MIDIERR_INVALID_INSTANCE_NUMBER  =(MIDIERR_BASE + 9);
-MIDIERR_INVALID_PARAMETER        =(MIDIERR_BASE + 10);
-MIDIERR_INVALID_SETUP            =(MIDIERR_BASE + 11);
-MIDIERR_NO_DRIVER                =(MIDIERR_BASE + 12);
-MIDIERR_NO_DEFAULT_HW_NODE       =(MIDIERR_BASE + 13);
-MIDIERR_NOT_ALLOWED              =(MIDIERR_BASE + 14);
-MIDIERR_NOTIFY_MISSED            =(MIDIERR_BASE + 15);
-MIDIERR_RESOURCE_NOT_AVAILABLE   =(MIDIERR_BASE + 16);
-MIDIERR_SENDONLY                 =(MIDIERR_BASE + 17);
-MIDIERR_RECEIVEONLY              =(MIDIERR_BASE + 18);
-
-TIMERERR_BASE                    =(MIDIERR_BASE + 100);
-
-TIMERERR_INVALID_PARAMETER       =(TIMERERR_BASE + 1);
-TIMERERR_INTERNAL_SYSTEM         =(TIMERERR_BASE + 2);
-
-
-//***********************************/
-//* User defined Error Return codes */
-//***********************************/
-
-USERERR_BASE                     =(MMIOERR_BASE + 1000);
-
-Const
-  FOURCC_ULTI:FOURCC=0;
-  FOURCC_RT21:FOURCC=0;
-  FOURCC_DIB :FOURCC=0;
-  FOURCC_R565:FOURCC=0;
-  FOURCC_R555:FOURCC=0;
-  FOURCC_R664:FOURCC=0;
-  FOURCC_RGB3:FOURCC=0;
-  FOURCC_BGR3:FOURCC=0;
-  FOURCC_RGB4:FOURCC=0;
-  FOURCC_BGR4:FOURCC=0;
-  FOURCC_LUT8:FOURCC=0;
-  FOURCC_LT12:FOURCC=0;
-  FOURCC_GREY:FOURCC=0;
-  FOURCC_GY16:FOURCC=0;
-  FOURCC_Y888:FOURCC=0;
-  FOURCC_Y2X2:FOURCC=0;
-  FOURCC_Y4X4:FOURCC=0;
-  FOURCC_YUV9:FOURCC=0;
-  FOURCC_Y644:FOURCC=0;
-  FOURCC_MONO:FOURCC=0;
-  FOURCC_Y422:FOURCC=0;
-  FOURCC_Y42B:FOURCC=0;
-  FOURCC_Y42D:FOURCC=0;
-  FOURCC_Y411:FOURCC=0;
-  FOURCC_VGA :FOURCC=0;
-
-Const
-  // FourCCs will be initialized in Initialization section
-  FourCC_RIFF                   : FourCC = 0;
-  FourCC_LIST                   : FourCC = 0;
-  FourCC_MEM                    : FourCC = 0;
-  FourCC_DOS                    : FourCC = 0;
-  FourCC_BND                    : FourCC = 0;
-  FourCC_FREE                   : FourCC = 0;
-  FourCC_DEL                    : FourCC = 0;
-  FourCC_CTOC                   : FourCC = 0;
-  FourCC_CGRP                   : FourCC = 0;
-  FourCC_CF                     : FourCC = 0;
-
-
-//****************************************************************************/
-//*                                                                          */
-//* Module Name: AUDIO.H                                                     */
-//*                                                                          */
-//* OS/2 2.0 Multimedia Extensions Audio Structures and definitions.         */
-//*                                                                          */
-//* Copyright (c) International Business Machines Corporation 1991, 1992     */
-//*                        All Rights Reserved                               */
-//*                                                                          */
-//* Ported to FPC: CooL/2 Aka Andy Svirgunov.                                */
-//****************************************************************************/
-
-//*-------------------------------------------------------------------------*
-//* AUDIODD version level
-//-------------------------------------------------------------------------*/
-
-CONST
-         CURRENT_VERSION=$01020000;
-
-//*-------------------------------------------------------------------------*
-//* Control definitions
-//*-------------------------------------------------------------------------*/
-
-        AUDIO_IOCTL_CAT   =$80;
-        AUDIO_INIT        =$40;
-        AUDIO_STATUS      =$41;
-        AUDIO_CONTROL     =$42;
-        AUDIO_BUFFER      =$43;
-        AUDIO_LOAD        =$44;
-        AUDIO_WAIT        =$45;
-        AUDIO_HPI         =$46;
-        AUDIO_CAPABILITY  =$48;
-
-        MIX_GETCONNECTIONS=$60;
-        MIX_SETCONNECTIONS=$61;
-        MIX_GETLINEINFO   =$62;
-        MIX_GETCONTROL    =$63;
-        MIX_SETCONTROL    =$64;
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_INIT declarations and defines
-//*-------------------------------------------------------------------------*/
-
-        LOAD_PATH = 260;
-
-//* Values for AUDIO_INIT.sMode  */
-
-        ADPCM     =1;     //* AVC type ADPCM                */
-        PCM       =2;     //* Pulse Coded Modulation        */
-        MU_LAW    =3;     //* mu-law                        */
-        MIDI      =4;     //* MIDI data                     */
-        A_LAW     =5;     //* a-law                         */
-        SOURCE_MIX=6;     //* External audio source         */
-        SPV2      =7;     //* Speech Viewer/2               */
-        ADPCMXA   =8;     //* XA CD ROM                     */
-        SPV2BCPCM =25;    //* Speech Viewer/2               */
-        SPV2PCM   =26;
-        SPV2NONE  =27;
-        IDLE      =999;
-        CLAIM_HDWR=32000; //* Serialize access to hardware  */
-
-//* Values for AUDIO_INIT.ulFlags        */
-
-        FIXED             =$00000001;    // Fixed length data             */
-        LEFT_ALIGNED      =$00000002;    // Left align bits on byte bndry */
-        RIGHT_ALIGNED     =$00000004;    // Right align bits on byte bndry*/
-        TWOS_COMPLEMENT   =$00000008;    // 2's complement data           */
-        SIGNED            =$00000010;    // Signed data                   */
-        BIG_ENDIAN        =$00000020;    // MSB's first (motorola format) */
-        RIFF_DATATYPE     =$00000040;    // sMode contains a RIFF datatype*/
-        PITCH             =$00100000;    // Pitch control is supported    */
-        INPUT             =$00200000;    // Input select is supported     */
-        OUTPUT            =$00400000;    // Output select is supported    */
-        MONITOR           =$00800000;    // Monitor is supported          */
-        VOLUME            =$01000000;    // Volume control is supported   */
-        VOLUME_DELAY      =$02000000;    // Volume delay is supported     */
-        BALANCE           =$04000000;    // Balance control is supported  */
-        BALANCE_DELAY     =$08000000;    // Balance delay is supported    */
-        TREBLE            =$10000000;    // Treble control is supported   */
-        BASS              =$20000000;    // Bass control supported        */
-        BESTFIT_PROVIDED  =$40000000;    // bestfit returned              */
-        LOAD_CODE         =$80000000;    // DSP load needed               */
-
-//* Values for AUDIO_INIT.ulOperation    */
-
-        OPERATION_PLAY    =1;
-        OPERATION_RECORD  =2;
-        PLAY_AND_RECORD   =3;
-        ANALYSIS          =6;             // Speech Viewer/2               */
-        DISTANCE          =7;             // Speech Viewer/2               */
-        MIGRATION         =8;             // Speech Viewer/2               */
-
-//* Values for AUDIO_INIT.sReturnCode    */
-
-        NO_PLAY                      =1;
-        NO_RECORD                    =2;
-        NO_RECORD_AND_PLAY           =3;
-        INVALID_REQUEST              =4;
-        CONFLICT                     =5;
-        OVERLOADED                   =6;
-        DOWNLEVEL_DD                 =7; // DD is down level from appl.   */
-        DSP_LOAD_PENDING_ON_OTHER_TRK=8; // Other trk hasn't loaded dsp   */
-
-        AUDIO_IGNORE                 =-1;
-
-//* Values for AUDIO_INIT.sDeviceID      */
-
-        MINIDD                 =0;
-        ACPA                   =1;
-        MACPA                  =2;
-        MPU401                 =3;
-        SOUND_BLASTER          =4;
-        IMF                    =5;
-        PS1                    =6;
-        PAS16                  =7;
-
-//* AUDIO_INIT structure declaration     */
-
-TYPE MCI_AUDIO_INIT = RECORD
-        lSRate:LongInt;
-        lBitsPerSRate:Longint;
-        lBsize:LongInt;
-        sMode:Integer;
-        sChannels:Integer;
-        lResolution:LongInt;
-        abLoadPath:ARRAY [0..LOAD_PATH] of CHAR;
-        ulFlags:LongInt;
-        ulOperation:LongInt;
-        sReturnCode:Integer;
-        sSlotNumber:Integer;
-        sDeviceID:Integer;
-        pvReserved:Pointer;       //* MMPM2 uses this to pass back sysfilenum */
-        ulVersionLevel:LongInt;
-        end;
-TYPE PMCI_AUDIO_INIT = ^MCI_AUDIO_INIT;
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_DEVID declarations and defines
-//*-------------------------------------------------------------------------*/
-
-TYPE _MCI_AUDIO_DEVID = RECORD
-        ulDevType:LongInt;
-        ulDevNum:LongInt;
-        end;
-
-TYPE PMCI_AUDIO_DEVID = ^_MCI_AUDIO_DEVID;
-
-//* Input devices        */
-
-CONST
-
-        NULL_INPUT              =0;
-        STEREO_LINE_INPUT       =1;
-        LEFT_LINE_INPUT         =2;
-        RIGHT_LINE_INPUT        =3;
-        MIC_INPUT               =4;
-        BOOSTED_MIC_INPUT       =5;
-        PHONE_LINE_INPUT        =6;
-        HANDSET_INPUT           =7;
-        SYNTH_INPUT             =8;
-        DIGITAL_PHONE_LINE_INPUT=9;
-        DIGITAL_HANDSET_INPUT   =10;
-        MIDI_IN_PORT            =11;
-        LOOPBACK                =11;
-        DEFAULT_INPUT           =$FFFFFFFF;
-
-
-//* Output devices       */
-
-        NULL_OUTPUT              = 0;
-        STEREO_LINE_OUTPUT       = 1;
-        LEFT_LINE_OUTPUT         = 2;
-        RIGHT_LINE_OUTPUT        = 3;
-        SPEAKER_OUTPUT           = 4;
-        HEADSET_OUTPUT           = 5;
-        PHONE_LINE_OUTPUT        = 6;
-        HANDSET_OUTPUT           = 7;
-        SYNTH_OUTPUT             = 8;
-        DIGITAL_PHONE_LINE_OUTPUT= 9;
-        DIGITAL_HANDSET_OUTPUT   = 10;
-        MIDI_OUT_PORT            = 11;
-        DEFAULT_OUTPUT           = $FFFFFFFF;
-
-//* Defined values for DevNum    */
-
-        DEFAULT_DEVICE      = 0;
-        DEVICE_1            = 1;
-        DEVICE_2            = 2;
-
-
-//*-------------------------------------------------------------------------*
-//* Valid Return codes for the ulSupport field of MCI_AUDIO_CAPS
-//*-------------------------------------------------------------------------*/
-        SUPPORT_SUCCESS         =$00000000;
-        UNSUPPORTED_RATE        =$00000001;
-        UNSUPPORTED_CHANNELS    =$00000002;
-        UNSUPPORTED_BPS         =$00000004;
-        UNSUPPORTED_DATATYPE    =$00000008;
-        UNSUPPORTED_OPERATION   =$00000010;
-
-
-TYPE _MCI_AUDIO_CAPS = RECORD
-    ulLength:LongInt;                 // in     Structure length                    */
-    ulSamplingRate:LongInt;           // in out Sampling rate to query              */
-    ulChannels:LongInt;               // in out Channels to query                   */
-    ulBitsPerSample:LongInt;          // in out BPS to query                        */
-    ulDataType:LongInt;               // in out RIFF Datatype to query              */
-    ulOperation:LongInt;              // in out OPERATION_PLAY or OPERATION_RECORD  */
-    ulSupport:LongInt;                //    out BOOLEAN-does DD support this mode   */
-    ulDataSubType:LongInt;            //    out Data-subtype to use                 */
-    ulResourceUnits:LongInt;          //    out Resource units this mode            */
-    ulResourceClass:LongInt;          //    out Resource class for this mode        */
-    ulBlockAlign:LongInt;             //    out Block alignment for this mode.      */
-    fCanRecord:LongInt;               //    out Is recording possbile - this mode   */
-    ulFlags:LongInt;                  //    out                                     */
-    ulCapability:LongInt;             //    out Capability of the device.           */
-    end;
-
-TYPE PAUDIO_CAPS=^_MCI_AUDIO_CAPS;
-
-
-//*-------------------------------------------------------------------------*
-//* Valid Return codes for the ul field of MCI_AUDIO_CAPS
-//*-------------------------------------------------------------------------*/
-
-CONST
-
-SUPPORT_MIX                 =$00000001;// supports mixer functions           */
-SUPPORT_RIFF_MODES          =$00000002;// supports RIFF modes for AUDIO_INIT */
-SUPPORT_CAP                 =$80000000;// Capability IOCTL supported         */
-
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_CHANGE declarations and defines
-//*-------------------------------------------------------------------------*/
-
-//* Values for AUDIO_CHANGE.lMonitor     */
-
-MONITOR_OFF                    =0;
-MONITOR_UNCOMPRESSED           =1;
-MONITOR_COMPRESSED             =2;
-
-//* Values for AUDIO_CHANGE.lInput       */
-
-HIGH_GAIN_MIC          = 0;
-LINE_1                 = 1;
-LINE_2                 = 2;
-LINES_1AND2            = 3;
-LOW_GAIN_MIC           = 4;
-ALL_LINES              = $FFFF;
-INPUTS_LISTED          = $5555;
-
-//* Values for AUDIO_CHANGE.lOutput      */
-
-EXTERNAL_SPEAKER        =1;
-INTERNAL_SPEAKER        =2;
-OUTPUT_1                =4;
-OUTPUTS_LISTED          =$5555;
-
-//* AUDIO_CHANGE structure declaration   */
-
-TYPE _MCI_AUDIO_CHANGE = RECORD
-
-        pvDevInfo:Pointer;
-        lInput:LongInt;
-        lOutput:LongInt;
-        lMonitor:LongInt;
-        lVolume:LongInt;
-        lVolumeDelay:LongInt;
-        lBalance:LongInt;
-        lBalanceDelay:LongInt;
-        lTreble:LongInt;
-        lBass:LongInt;
-        lPitch:LongInt;
-        rInputList:ARRAY[0..8] OF _MCI_AUDIO_DEVID;
-        rOutputList:ARRAY[0..8] OF _MCI_AUDIO_DEVID;
-
-        prMoreInputs:PMCI_AUDIO_DEVID;
-        prMoreOutputs:PMCI_AUDIO_DEVID;
-        lGain:LongInt;
-        pvModeInfo:Pointer;
-        end;
-
-TYPE PMCI_AUDIO_CHANGE=^_MCI_AUDIO_CHANGE;
-
-TYPE MIDI_INFO = RECORD
-      sTempo:Integer;
-      sCPQN:Integer;
-      sMidiSwitches:Integer;
-      sReserved:ARRAY[0..5] OF Integer;
-      end;
-
-//*************************************************************************
-//*  MIDI Switches
-//**************************************************************************/
-
-CONST
-
-        MIDI_THRU_THRU =0;
-        MIDI_THRU_OUT  =1;
-
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_STATUS declarations and defines
-//*-------------------------------------------------------------------------*/
-
-//* Values for AUDIO_STATUS.ulOperation  */
-
-        STOPPED                 =0;
-        PLAYING                 =1;
-        RECORDING               =2;
-        PLAYING_AND_RECORDING   =3;
-        UNITIALIZED             =$FFFFFFFF;
-
-//* AUDIO_STATUS structure declaration   */
-
-TYPE MCI_AUDIO_STATUS = RECORD
-        lSRate:LongInt;
-        lBitsPerSRate:LongInt;
-        lBsize:LongInt;
-        sMode:Integer;
-        sChannels:Integer;
-        ulFlags:longInt;
-        ulOperation:LongInt;
-        rAudioChange:_MCI_AUDIO_CHANGE;
-        end;
-
-TYPE PMCI_AUDIO_STATUS = MCI_AUDIO_STATUS;
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_CONTROL declarations and defines
-//*-------------------------------------------------------------------------*/
-
-//* Values for AUDIO_CONTROL.usIOCtlRequest      */
-
-CONST
-
-        AUDIO_CHANGE            =0;
-        AUDIO_START             =1;
-        AUDIO_STOP              =2;
-        AUDIO_PAUSE             =3;
-        AUDIO_RESUME            =4;
-
-//* Values for AUDIO_CONTROL.sReturnCode */
-
-AC_UNINITED         = 1;       // Device must be init'ed or loaded first    */
-FULL_QUEUE          = 2;       // Maximum # requests exceeded        */
-AC_UNPAUSED         = 3;       // Resume issued, but dev not paused  */
-AC_UNSTARTED        = 5;       // Device must be started first       */
-INVALID_INPUT_LIST  = 7;       // invalid change.input_list entry    */
-INVALID_OUTPUT_LIST = 8;       // invalid change.output_list entry   */
-
-//* AUDIO_CONTROL structure declaration  */
-
-TYPE MCI_AUDIO_CONTROL = RECORD
-        usIOCtlRequest:Integer;
-        pbRequestInfo:Pointer;
-        ulPosition:LongInt;
-        sReturnCode:Integer;
-        end;
-
-TYPE PMCI_AUDIO_CONTROL = MCI_AUDIO_CONTROL;
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_BUFFER declarations and defines
-//*-------------------------------------------------------------------------*/
-
-//* Values for AUDIO_BUFFER.ulFlags      */
-
-CONST
-
-        AUDIO_UNDERRUN  =1;
-        AUDIO_OVERRUN   =2;
-
-//* Values for AUDIO_BUFFER.ulPositionType       */
-
-        POS_MSECS       =0;
-        MIDI_CLOCKS     =1;
-        SMPTE_24        =24;
-        SMPTE_25        =25;
-        SMPTE_30DF      =29;
-        SMPTE_30        =30;
-
-TYPE MCI_AUDIO_BUFFER = RECORD
-        ulFlags:LongInt;
-        ulReadBufSize:LongInt;
-        ulWriteBufSize:LongInt;
-        ulReadBufTime:LongInt;
-        ulWriteBufTime:LongInt;
-        ulReadBufMax:LongInt;
-        ulWriteBufMax:LongInt;
-        ulPosition:LongInt;
-        ulPositionType:LongInt;
-        lReadBufCap:LongInt;
-        lWriteBufCap:LongInt;
-        lRequestBufCap:LongInt;
-        end;
-
-TYPE PMCI_AUDIO_BUFFER =^MCI_AUDIO_BUFFER;
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_LOAD declarations and defines
-//*-------------------------------------------------------------------------*/
-
-//* Values for AUDIO_LOAD.ulFlags        */
-
-CONST
-
-        LOAD_START              =$01;
-        LOAD_END                =$02;
-        LOAD_32BIT              =$10;
-
-
-TYPE MCI_AUDIO_LOAD = RECORD
-        pbBuffer:^Char;
-        ulSize:LongInt;
-        ulFlags:LongInt;
-        end;
-
-TYPE PMCI_AUDIO_LOAD = MCI_AUDIO_LOAD;
-
-//*-------------------------------------------------------------------------*
-//* Track info declarations and defines
-//*-------------------------------------------------------------------------*/
-
-//* Track Info structure declaration     */
-
-TYPE MCI_TRACK_INFO = RECORD
-        usMasterVolume:Integer;
-        usDitherPct:Integer; //* Percent of a bit dither during record  */
-        usMasterVolumeDelay:Integer;
-        usMasterBalance:Integer;
-        usMasterBalanceDelay:Integer;
-        end;
-
-TYPE PMCI_TRACK_INFO = ^MCI_TRACK_INFO;
-
-
-//*-------------------------------------------------------------------------*
-//* IOBUFFER declarations and defines
-//*-------------------------------------------------------------------------*/
-
-CONST
-
-        STARTED  =1;
-        PAUSED   =2;
-
-TYPE _MCI_AUDIO_IOBUFFER = RECORD
-        lSize:LongInt;
-        pHead:^Char;
-        pTail:^Char;
-        lCount:LongInt;
-        ulPosition:LongInt;
-        lDelay:LongInt;
-        usRunFlags:Integer;
-        usSelInc:Integer;
-        pBuffer:^Char;
-        end;
-
-TYPE PMCI_AUDIO_IOBUFFER = ^_MCI_AUDIO_IOBUFFER;
-
-//*-------------------------------------------------------------------------*
-//* AUDIO_HPI declarations and defines
-//-------------------------------------------------------------------------*/
-
-CONST
-
-        CBXMIT  =1;
-        CBREC   =2;
-        CRTIMER =4;
-
-        EP_OPEN         =0;
-        EP_CLOSE        =1;
-        EP_READ         =2;
-        EP_WRITE        =3;
-        EP_INIT         =4;
-        EP_STATUS       =5;
-        EP_CONTROL      =6;
-        EP_BUFFER       =7;
-        EP_LOAD         =8;
-        EP_WAIT         =9;
-
-
-
-TYPE MCI_AUDIO_HPI = RECORD
-        pvEntry :procedure;
-        pvCallBack:procedure;
-//        VOID (FAR *pvEntry)();
-//        VOID (FAR *pvCallBack)();
-        prXBuff:PMCI_AUDIO_IOBUFFER;
-        prRBuff:PMCI_AUDIO_IOBUFFER;
-        usFlags:Integer;
-        end;
-
-TYPE PMCI_AUDIO_HPI = ^MCI_AUDIO_HPI;
-
-//**************************/
-//* AUDIO_UPDATE Structure */
-//**************************/
-TYPE AUDIO_UPDATE = RECORD
-
-  iobuf_type:Char;              //* 0 - XMITIO, 1 - RECIO to be updated      */
-  buffer_address:^Char;     //* address to buffer to be added to array   */
-  buffer_length:LongInt;          //* length of buffer to be added             */
-  rc:Integer;                    //* return code                              */
-  reserved:Pointer;           //* future use                               */
-  end;
-
-TYPE UPDATE = ^AUDIO_UPDATE;
-
-//* audio_update.iobuf_type definitions                                      */
-
-CONST
-
-        XMIT_IOBUF =0;
-        REC_IOBUF  =1;
-
-//* audio_update.rc definitions                                              */
-        MAX_NUM_BUFFERS_REACHED =9;
-        UPDATE_GENERAL_FAILURE  =10;
-        INVALID_BUFFER_LENGTH   =11;
-
-
-//****************************************************************************/
-//*                                                                          */
-//* Module Name:  CDAUDIO.H                                                  */
-//*                                                                          */
-//* FUNCTION:  This file contains the macro definition and common record     */
-//*            structures used between the CD Audio MCI Driver, its VSDs     */
-//*            (Vendor Specific Drivers), and the CD look-up table,          */
-//*            MMPMCD.INI.                                                   */
-//*                                                                          */
-//* Copyright (c) International Business Machines Corporation 1991 - 1993    */
-//*                        All Rights Reserved                               */
-//****************************************************************************/
-//*                                                                          */
-//* Ported to FPC: CooL/2 Aka Andy Svirgunov.                                */
-//*                                                                          */
-//****************************************************************************/
-
-//*******************************************************************/
-//* CD MCD and VSD values and inter-modual communications           */
-//*******************************************************************/
-
-
-//**********************************/
-//* Macro Definitions              */
-//**********************************/
-
-Const
-
-UPC_SIZE             = 7;     //* UPC code size, CD serial number */
-CDMCD_CUEPOINT_MAX   = 20;     //* maximum number of cuepoints */
-CDROM_SPEC_START     = 6000;     //* 2 seconds, greatest min start address */
-MCI_INTERNAL_MESSAGES_START = 1000;
-
-//*************************************************************************/
-//* Internal messages between the MCI Driver and the VSD.                 */
-//*************************************************************************/
-
-MCIDRV_REGISTER_DISC    =MCI_INTERNAL_MESSAGES_START + 1;
-MCIDRV_REGISTER_DRIVE   =MCI_INTERNAL_MESSAGES_START + 2;
-MCIDRV_REGISTER_TRACKS  =MCI_INTERNAL_MESSAGES_START + 3;
-MCIDRV_CD_READ_LONG     =MCI_INTERNAL_MESSAGES_START + 4;
-MCIDRV_CD_SET_VERIFY    =MCI_INTERNAL_MESSAGES_START + 5;
-MCIDRV_CD_STATUS_CVOL   =MCI_INTERNAL_MESSAGES_START + 6;
-
-
-//*************************************************************************/
-//* Internal callback routine from the VSD to the MCI Driver.             */
-//*************************************************************************/
-
-//typedef VOID (*PFNCDMCD) (DWORD, DWORD, DWORD);
-
-
-//***********************************/
-//* CDAudRegister record structures */
-//***********************************/
-
-TYPE MCI_CD_ID = Record   //* ID a disc, used to verify a disc change                 */
-                //* must stay at 8 bytes to equal size of UPC               */
-   Mode:byte;                           //* mode, 0=UPC, 1=ID              */
-   wTrack1:word;                        //* address of track one in MMTIME */
-   NumTracks:byte;                      //* number of tracks               */
-   dwLeadOut:word;                      //* address of lead out track      */
-   end;
-
-TYPE MCI_CD_REGDRIVE_PARMS=RECORD //* CD-ROM Drive information, determines capabilities */
-
-   wCaps:WORD;                          //* capabilities                   */
-   dwPrerollType:WORD;                  //* preroll type                   */
-   dwPrerollTime:WORD;                  //* preroll time                   */
-   dwMinStartTime:WORD;                 //* minimum starting time          */
-   dwCDMCDID:WORD;                      //* CD MCD ID for instance         */
-//   pCDMCDReturn:PFNCDMCD;                //* addr of CD MCD Return function */
-   end;
-
-//*************************************************/
-//* These flags are valid for the wCaps Field     */
-//*************************************************/
-CONST
-
-CDVSD_CAP_CAN_RECORD  =$0001;   //* Can record audio               */
-CDVSD_CAP_HAS_AUDIO   =$0002;   //* Can play audio                 */
-CDVSD_CAP_HAS_VIDEO   =$0004;    //* Can play video                 */
-CDVSD_CAP_CAN_CLSDOOR =$0008;    //* Can retract tray/close door    */
-CDVSD_CAP_CAN_EJECT   =$0010;    //* Can eject disc                 */
-CDVSD_CAP_CAN_STREAM  =$0020;    //* Can stream                     */
-CDVSD_CAP_HAS_DAC     =$0040;    //* Can process internal           */
-CDVSD_CAP_CAN_LOCK    =$0080;    //* Can disable manual eject       */
-CDVSD_CAP_CAN_VOLUME  =$0100;    //* Can manipulate volume settings */
-CDVSD_CAP_CAN_REVERSE =$0200;    //* Can play in reverse            */
-CDVSD_CAP_CAN_V_SPEED =$0400;    //* Can vary play speed            */
-CDVSD_CAP_CAN_CUE     =$0800;    //* Can read sequent. after break  */
-                                        //* Used for Cue, Pause, and Seek  */
-
-
-TYPE MCI_CD_REGDISC_PARMS = RECORD //* Information about the disc  */
-
-   LowestTrackNum:BYTE;                 //* lowest track number  */
-   HighestTrackNum:BYTE;                //* highest track number */
-   UPC:ARRAY [0..UPC_SIZE] of BYTE;                  //* upc, 13 BCD + 4bit 0 */
-   DiscID:MCI_CD_ID;                      //* Disc ID              */
-   end;
-
-TYPE MCI_CD_REGTRACK_REC=RECORD //* Information about each track */
-
-   TrackNum:BYTE;                       //* track number               */
-   dwStartAddr:WORD;                    //* starting address in MMTIME */
-   dwEndAddr:WORD;                      //* ending address             */
-   TrackControl:BYTE;                   //* track control information  */
-   end;
-
-TYPE MCI_CD_REGTRACKS_PARMS=RECORD //* Track information, used to verify address */
-   TrackRecArr:^MCI_CD_REGTRACK_REC;     //* ptr to array of track recs  */
-   dwBufSize:WORD;                      //* size of buffer              */
-   end;
-
-//********************************************/
-//* Environment settings to save and restore */
-//********************************************/
-
-TYPE MCIDRV_CD_SAVE_PARMS=RECORD
-   dwPosition:WORD;                      //* current position in MMTIME       */
-   dwEndPlay:WORD;                       //* end play position                */
-   dwMode:WORD;                          //* Play mode: playing, paused, etc. */
-   dwLevel:WORD;                         //* volume levels                    */
-   dwVSDData:WORD;                       //* Extra VSD data storage area      */
-   end;
-
-//********************************************/
-//* Read Long (2352-Byte) Sectors            */
-//********************************************/
-
-//**************************************************************************/
-//* Flag for the MCIDRV_CD_READ_LONG message                               */
-//*   Default addressing mode for the dwFrom field is Hardware Red Book.   */
-//*   Absolute sector addressing for ISO-9660, or High Sierra Group        */
-//*   requires a flag, as does an MMTIME address.                          */
-//**************************************************************************/
-
-CONST
-
-MCI_CD_READLONG_HSG          =$00000100;
-MCI_CD_READLONG_MMTIME       =$00000200;
-
-TYPE MCI_CD_READLONG_PARMS=RECORD
-   dwFrom:WORD;                        //* read from this position   */
-   wCount:WORD;                        //* Number of sectors to read */
-   lpstrReturn:^CHAR;                  //* Pointer to return buffer  */
-   dwRetSize:WORD;                     //* Return buffer size        */
-   end;
-
-
-
-//*******************************************************************/
-//* CD Table INI file, MMPMCD.INI, values                           */
-//*******************************************************************/
-
-//*******************************************************************/
-//* Capability Flags I from the CD drive look-up table, MMPMCD.INI  */
-//*******************************************************************/
-
-CONST
-
-CDHW_CAP_CAN_EJECT    =$00000001; //* Can software eject disc         */
-CDHW_CAP_CAN_LOCK     =$00000002; //* Can lock drive/disable eject    */
-CDHW_CAP_READS_RAW    =$00000004; //* Can read raw sectors            */
-CDHW_CAP_CAN_WRITE    =$00000008; //* Can write to disc               */
-CDHW_CAP_CAN_PLAY     =$00000010; //* Can play CD-DA tracks           */
-CDHW_CAP_CAN_INTERLEV =$00000020; //* Supports ISO-9660 interleaving  */
-CDHW_CAP_CAN_PREFETCH =$00000080; //* Can prefetch internally         */
-CDHW_CAP_MANIP_AUDIO  =$00000100; //* Can manipulte audio channels    */
-CDHW_CAP_USES_REDBOOK =$00000200; //* Can use Red Book mode           */
-CDHW_CAP_READS_XA     =$00000400; //* Can read CD-ROM/XA data         */
-CDHW_CAP_CONT_READS   =$00000800; //* Continues to read DA after stop */
-CDHW_CAP_CAN_REVERSE  =$00001000; //* Can play in reverse             */
-CDHW_CAP_READS_CDDA   =$40000000; //* Can read CD-DA audio tracks     */
-
-
-//*******************************************************************/
-//* Capability Flags II from the CD drive look-up table, MMPMCD.INI */
-//*******************************************************************/
-
-CDHW_VOL_DEP_MASK     =$00000007; //* Volume dependency mask        */
-CDHW_VOL_DEP_NONE     =        0; //* Volume without dependency     */
-CDHW_VOL_DEP_HIGH     =        2; //* Volume is highest value       */
-CDHW_VOL_DEP_LOW      =        3; //* Volume is lowest value        */
-CDHW_VOL_DEP_LEFT     =        4; //* Volume is left volume         */
-CDHW_VOL_DEP_RIGHT    =        5; //* Volume is right volume        */
-CDHW_VOL_INDEP_MUTE   =$00000008; //* Mute has no dependency        */
-CDHW_CAP_LOCK_MOUNT   =$00000010; //* Can only lock when mounted    */
-CDHW_CAP_PLAY_VIDEO   =$00000020; //* Can play video                */
-CDHW_CAP_MODAL_ONLY   =$00000040; //* Stop req to interrupt PLAY    */
-CDHW_CAP_SUP_SEEK     =$00000080; //* Supports SEEK IOCTL           */
-CDHW_CAP_SUP_UPC      =$00000100; //* Supports UPC IOCTL            */
-CDHW_CAP_SUP_SUBCHAN  =$00000200; //* Supports sub-channel IOCTL    */
-CDHW_CAP_CAN_CLS_TRAY =$00000400; //* Can close door/retract caddy  */
-CDHW_CAP_NO_STREAM    =$00001000; //* Cannot stream CD-DA when PDD  */
-                                         //*   says it can                 */
-CDHW_CAP_VAR_PLAY     =$80000000;  //* Supports variable speeds      */
-
-//* INI file record structure */
-CDINI_APPSIZE              =   8;  //* Application name size    */
-CDINI_KEYSIZE              =  16;  //* Key name size            */
-CDINI_VSD_NAME_SIZE        =   8;  //* size of file name        */
-VOLUME_CONTROL             = 101;  //* num of values, 0% - 100% */
-
-
-TYPE MMPMCD_REC=RECORD
- usEntryVer:INTEGER;                     //* Entry version                 */
- ulCaps1:LONGINT;                        //* Capability flag I             */
- ulCaps2:LONGINT;                        //* Capability flag II            */
- VSDName:ARRAY [0..CDINI_VSD_NAME_SIZE] of CHAR;   //* DLL name for VSD              */
- ulMinStart:LONGINT;                     //* Min starting addr, 0x00MMSSFF */
- usVolCnt:INTEGER;                       //* volume level counter          */
- ausVolValues:ARRAY [0..VOLUME_CONTROL] of INTEGER;  //* volume control values         */
- end;
-
-//*************************START OF SPECIFICATIONS **************************/
-//                                                                          */
-// Module NAME:  VIDEO.H                                                    */
-//                                                                          */
-// OS/2 2.0 Multimedia Extensions Video structures and definitions          */
-//                                                                          */
-// Copyright (c) International Business Machines Corporation 1993           */
-//                         All Rights Reserved                              */
-//***************************************************************************/
-// Converted by Andry Svirgunov. Email: [email protected]                        */
-// 14.11.2002                                                               */
-//                                                                          */
-//************************* END OF SPECIFICATIONS ***************************/
-
-TYPE _VIDEO_FRAME_HDR = RECORD          // vfh  */
-        FrameNumber   : LongInt;        // relative frame number       */
-        FramesSkipped : LongInt;        // no. frames skipped between this and last frames */
-        StreamTime    : LongInt;        // stream time in milliseconds */
-        FrameSize     : LongInt;        // size in bytes               */
-        SHparm1       : LongInt;        // used by stream handler      */
-        reserved3     : LongInt;        // unused                      */
-        reserved2     : LongInt;        // unused                      */
-        reserved1     : LongInt;        // unused                      */
-        end;
-
-TYPE PVIDEO_FRAME_HDR = ^_VIDEO_FRAME_HDR;
-
-//*************************START OF SPECIFICATIONS **************************/
-//                                                                          */
-// COPYRIGHT:     IBM - International Business Machines                     */
-//              Copyright (c) IBM Corporation  1991, 1992, 1993             */
-//                        All Rights Reserved                               */
-//                                                                          */
-//                                                                          */
-// SOURCE FILE NAME:  UMFORMAT.H                                            */
-//                                                                          */
-// DESCRIPTIVE NAME: Ultimotion File Format Headers (Beta)                  */
-//                                                                          */
-//   An Ultimotion file consists of interlevaed audio and video and text    */
-//   chunks within the data list chunk.                                     */
-//                                                                          */
-//   A file may contain interleaved audio chunks or the soundtrack may      */
-//   be contained in a seperate file specified in the header chunk, or      */
-//   there may be no associated soundtrack (a silent movie).  Multiple      */
-//   audio tracks are supported by this file format, either interleaved     */
-//   or in seperate files.  Only one video track, track 0, is supported in  */
-//   a single file.  Audio tracks are identified by a track number, with    */
-//   the first audio track being track 1.                                   */
-//                                                                          */
-//   If a file specifies both interleaved audio tracks and external         */
-//   audio tracks (.WAV files), the external audio tracks are numbered      */
-//   consecutively following the interleaved audio tracks.  For             */
-//   example, if a file specifies two interleaved audio tracks and two      */
-//   external audio tracks, the interleaved audio tracks will be tracks     */
-//   0 and 1, and the external audio tracks will be tracks 2 and 3.         */
-//   Note that tracks can carry distinct audio information such as          */
-//   multiple languages, and that stereo audio can be carried in a          */
-//   single track.                                                          */
-//                                                                          */
-//************************* END OF SPECIFICATIONS ***************************/
-
-// The hex fourcc value is also the SPCBKEY.ulDataSubType value for the */
-// Ultimotion file format - OS2MEDEF.H                                  */
-//***************************************************************************/
-// Ultimotion File Format:                                                  */
-//                                                                          */
-//                                                                          */
-//    Conventions used in this format:                                      */
-//                                                                          */
-//    - A file is a collection of chunks                                    */
-//    - The first ULONG in a chunk is the chunk type (chunk ID)             */
-//    - The second ULONG in a chunk is the length of the chunk,             */
-//         including the header and the data, but excluding the chunk       */
-//         ID and chunk length.                                             */
-//    - For each interleaved audio track there is one audio frame that      */
-//         corresponds to each video frame                                  */
-//    - An audio frame has the same duration as its corresponding video     */
-//         frame                                                            */
-//    - Audio frames always follow their corresponding video frame, and     */
-//         as such preceed the next video frame                             */
-//                                                                          */
-// Legend:                                                                  */
-//     [<element name>]      optional                                       */
-//     <element name>        1                                              */
-//     <element name>...     1 or more                                      */
-//     [<element name>]...   0 or more                                      */
-//                                                                          */
-//                                                                          */
-//                                                                          */
-//  SMV form                                                                */
-//  ---------                                                               */
-//                                                                          */
-// <RIFF( 'ummv'                                                            */
-//       <LIST( 'umhl'                             - Header LIST            */
-//             <Videoheader-ck>                    - Video header chunk     */
-//             <videotitle-ck>...                  - Video title chunk(s)   */
-//                                                 -                        */
-//             [<LIST( 'umal'                      - Audio LIST(s)          */
-//                    {<extaudiofilename-ck> |     - Ext. WAV files         */
-//                     <audioheader-ck>}           - Audio header           */
-//                    <audiotitle-ck>...)>]...     - Audio title            */
-//                                                 -                        */
-//             [<LIST( 'umtl'                      - Text LIST              */
-//                     <textheader-ck>...)>])>     - Text header            */
-//                                                 -                        */
-//       <LIST( 'umfd'                             - Frame data LIST        */
-//             <LIST( 'umcd' {                     - Chapter data LIST      */
-//                   <videoframe-ck>               - Video frame            */
-//                   [<audioframe-ck>]             - Audio frame            */
-//                   [<textframe-ck>]}...)>...)    - Text frame             */
-//                                                 -                        */
-//        [<LIST( 'umci'                           - Chap index table LIST  */
-//               <LIST( 'umce'                     - Chap index entry LIST  */
-//                     <chapterheader-ck>          - Chapter index hdr      */
-//                     <chapttitle-ck>...          - Chapter title          */
-//                     <frameindex-ck>)>...)>])>   - frame index            */
-//                                                 -  table                 */
-//                                                                          */
-//***************************************************************************/
-CONST
-
- UMAUDIOFILENAMELENGTH   =60;
- SIZEOF_FORM             =4;
-
-// ULTIMOTION FORMS */
-        UMFORM_MOVIE                  = 'ummv';
-        UMFORM_HEADERLIST             = 'umhl';
-        UMFORM_AUDIOHDRLIST           = 'umal';
-        UMFORM_TEXTHDRLIST            = 'umtl';
-        UMFORM_FRAMEDATALIST          = 'umfd';
-        UMFORM_CHAPTERDATALIST        = 'umcd';
-        UMFORM_CHAPTERTABLELIST       = 'umci';
-        UMFORM_CHAPTERENTRYLIST       = 'umce';
-
-// byte swapped hex defines for ulong assignments... */
-        HEX_UMFORM_MOVIE               =$766d6d75;     // vmmu */
-        HEX_UMFORM_HEADERLIST          =$6c686d75;     // lhmu */
-        HEX_UMFORM_AUDIOHDRLIST        =$6c616d75;     // lamu */
-        HEX_UMFORM_TEXTHDRLIST         =$6c746d75;     // ltmu */
-        HEX_UMFORM_FRAMEDATALIST       =$64666d75;     // dfmu */
-        HEX_UMFORM_CHAPTERDATALIST     =$64636d75;     // dcmu */
-        HEX_UMFORM_CHAPTERTABLELIST    =$69636d75;     // icmu */
-        HEX_UMFORM_CHAPTERENTRYLIST    =$65636d75;     // ecmu */
-
-// ULTIMOTION CHUNK IDS */
-        UMID_VIDEOHEADER               ='umvh';
-        UMID_EXTAUDIONAME              ='umea';
-        UMID_AUDIOHEADER               ='umah';
-        UMID_TEXTHEADER                ='umth';
-        UMID_VIDEOTITLE                ='umvt';
-        UMID_AUDIOTITLE                ='umat';
-        UMID_TEXTFRAME                 ='umtf';
-        UMID_VIDEOFRAME                ='umvf';
-        UMID_AUDIOFRAME                ='umaf';
-        UMID_CHAPTERHEADER             ='umch';
-        UMID_CHAPTERTITLE              ='umct';
-        UMID_FRAMETABLE                ='umfi';
-
-// byte swapped hex defines for ulong assignments... */
-        HEX_UMID_VIDEOHEADER           =$68766d75;      // hvmu */
-        HEX_UMID_EXTAUDIONAME          =$61656d75;      // aemu */
-        HEX_UMID_AUDIOHEADER           =$68616d75;      // hamu */
-        HEX_UMID_TEXTHEADER            =$68746d75;      // htmu */
-        HEX_UMID_VIDEOTITLE            =$74766d75;      // tvmu */
-        HEX_UMID_AUDIOTITLE            =$74616d75;      // tamu */
-        HEX_UMID_TEXTFRAME             =$66746d75;      // ftmu */
-        HEX_UMID_VIDEOFRAME            =$66766d75;      // fvmu */
-        HEX_UMID_AUDIOFRAME            =$66616d75;      // famu */
-        HEX_UMID_CHAPTERHEADER         =$68636d75;      // hcmu */
-        HEX_UMID_CHAPTERTITLE          =$74636d75;      // tcmu */
-        HEX_UMID_FRAMETABLE            =$69666d75;      // ifmu */
-
-
-
-//***************************************************************************/
-// CHUNK HEADER STRUCTURE - APPEARS AT START OF EACH CHUNK                  */
-//***************************************************************************/
-type UMCHUNKHEADER =record  // umch */
-   ulChunkID:LongInt;              // ID for this chunk                   */
-   ulChunkLength:LongInt;          // Length of chunk that follows        */
-   end;
- PUMCHUNKHEADER=^UmChunkHeader;   // pumch */
-
-
-//***************************************************************************/
-// VIDEO HEADER CHUNK -                                                     */
-//                                                                          */
-// The UMVIDEOHEADER structure is followed by a list of                     */
-// usInterleavedTracks null-terminated external audio (.WAV) file           */
-// names.  The audio file name fields are fixed size to better enable       */
-// changing the file names without re-writing the file.                     */
-//***************************************************************************/
-   UMVIDEOHEADER = record   // umvh */
-   ulTotalDuration:LongInt;        // Video duration in MMTIME            */
-   ulMaxFrameSize:LongInt;         // Max video frame size in bytes       */
-   ulMaxAvgDataRate:LongInt;       // Max avergage data rate              */
-   ulMaxBurstInterval:LongInt;     // Max interval for max data rate      */
-   ulCompressionRatioX100:LongInt; // Compression ratio                   */
-   ulPosterFrameOffset:LongInt;    // Poster for video (from beginning)   */
-   usMaxFrameX:Word;            // Max horizontal frame size           */
-   usMaxFrameY:Word;            // Max vertical frame size             */
-   usNomFrameDuration:Word;     // Nominal recorded frame duration     */
-   usNomIFrameInterval:word;    // I-frame every this many frames      */
-   usNumCompressionTypes:Word;  // number of different CODECS used in file */
-   aulCompressionTypes:Array [0..20] of LongInt;// List of CODECs found in this file */
-   Reserved:Array [0..16] of LongInt;           // Reserved space */
-   end;
-   PUMVIDEOHEADER=^UMVIDEOHEADER;  // pumvh */
-
-
-//***************************************************************************/
-// EXTERNAL AUDIO FILE NAME CHUNK                                           */
-//***************************************************************************/
-   EXTAUDIONAME = record    // umea */
-     usTrackNumber:Word;          // Audio track number for this format  */
-     szFileName:Array [0..UMAUDIOFILENAMELENGTH] of Char;
-   end;
-  PEXTAUDIONAME=^EXTAUDIONAME;  // pumea */
-
-
-//***************************************************************************/
-// INTERLEAVED AUDIO TRACK HEADER CHUNK                                     */
-//***************************************************************************/
-   AUDIOHEADER = record   // umah */
-           usTrackNumber:Word;          // Audio track number for this format  */
-           usFormatTag:Word;            // Type of wave format                 */
-           usChannels:Word;             // Number of channels (1=mono 2=stereo)*/
-           ulSamplesPerSec:LongInt;        // Sampling rate                       */
-           ulAvgBytesPerSec:LongInt;       // Avg bytes per sec                   */
-           usBlockAlign:Word;           // Block alignment in bytes            */
-           usBitsPerSample:Word;        // Bits per sample                     */
-           usCountryCode:Word;          // Country code for this title         */
-   end;
-   PAUDIOHEADER=^AUDIOHEADER; // pumah */
-
-
-//***************************************************************************/
-// INTERLEAVED TEXT TRACK HEADER CHUNK                                      */
-//***************************************************************************/
-   TEXTHEADER = record   // umth */
-           usTrackNumber:Word;          // Audio track number for this format  */
-           usCountryCode:Word;          // Country code for this title         */
-   end;
-   PTEXTHEADER=^TEXTHEADER; // pumth */
-
-
-//***************************************************************************/
-// TITLE CHUNK                                                              */
-//***************************************************************************/
-   TITLE =record  // ttl */
-           usCountryCode:Word;         // Country code for this title         */
-           szTitle:Array [0..1] of Char;            // Video title null-terminated         */
-   end;
-   PTITLE=^TITLE; // pttl */
-
-
-//***************************************************************************/
-// AUDIO FRAME CHUNK                                                        */
-//***************************************************************************/
-   AUDIOFRAME =record // umaf */
-          usTrackNumber:Word;         // audio track number                  */
-          bData:Array [0..1] of Byte;
-   end;
-   PAUDIOFRAME=^AUDIOFRAME; // pumaf */
-
-
-//***************************************************************************/
-// TEXT FRAME CHUNK                                                         */
-//***************************************************************************/
-   TEXTFRAME =record  // umtf */
-           usTrackNumber:Word;         // Text track number                   */
-           szText:Array [0..1] of Char;             // Text null-terminated                */
-   end;
-
-
-//***************************************************************************/
-// VIDEO FRAME CHUNK                                                        */
-//***************************************************************************/
-   VIDEOFRAME = record // umvf */
-          usTrackNumber:Word;         // Video track number  (0L only for now) */
-          ulDuration:LongInt;            // Frame duration in MMTIME            */
-          ulFrameFlags:LongInt;          // Frame flags                         */
-          ulCompressionType:LongInt;     // Compression type                    */
-          bData:Array [0..1] of Byte;
-   end;
-  PVIDEOFRAME =^VIDEOFRAME; // pumvf */
-
-// ulCompressionType defines: */
-CONST
-
-UM_VIDEO_COMPRESSION_TYPE_RAWRGB565        =1;
-UM_VIDEO_COMPRESSION_TYPE_RAWUVY556        =2;
-UM_VIDEO_COMPRESSION_TYPE_RAWYUV411        =3;
-UM_VIDEO_COMPRESSION_TYPE_BH146           =10;   // BETA-RGB16 */
-UM_VIDEO_COMPRESSION_TYPE_BH211SCS4       =11;   // 1.1 YUV16 subsampled chroma sub4 */
-UM_VIDEO_COMPRESSION_TYPE_BH211UCS4       =12;   // unique chroma sub4 */
-
-// ulVideoFrameFlags defines: */
-  UM_VIDEO_FRAME_FLAG_DELTAFRAME   =$1;   // 1: delta frame, 0: I frame */
-  UM_VIDEO_FRAME_FLAG_SCENECHANGE  =$2;
-
-
-//***************************************************************************/
-// CHAPTER INDEX HEADER (header for each entry in chapter index LIST        */
-//***************************************************************************/
- TYPE UMCHAPTERINDEX = record  // umch */
-       ulChapterOffset:LongInt;            // Offset from beginning of file       */
-       ulChapterDuration:LongInt;          // Duration of chapter in MMTIME       */
-       ulPosterFrameOffset:LongInt;        // Poster for chapter (offset from chapter)*/
-  end;
-  PUMCHAPTERINDEX =^UMCHAPTERINDEX;  // pumch */
-
-
-//***************************************************************************/
-// FRAME INDEX ENTRY                                                        */
-//***************************************************************************/
-   UMFRAMEINDEX = record  // umfi */
-           ulFrameOffsets:LongInt;         // Offset from beginning of chapter    */
-           ulFrameFlags:LongInt;           // Frame flags (Refer to frame header) */
-   end;
-    PUMFRAMEINDEX =^UMFRAMEINDEX;  // pumfi */
-
-
-//***************************************************************************/
-//                                                                          */
-// Module Name: SPCB.H                                                      */
-//                                                                          */
-// OS/2 2.0 Multimedia Extensions Sync/Stream Manager Stream Protocol       */
-// Control Block Definitions.                                               */
-//                                                                          */
-// Copyright (c) International Business Machines Corporation 1991, 1992     */
-//                        All Rights Reserved                               */
-//--------------------------------------------------------------------------*/
-// Converted by Andry Svirgunov. Email: [email protected]                        */
-// 14.11.2002                                                               */
-//                                                                          */
-//***************************************************************************/
-
-//*********************************************
-// *
-// * SPCBKEY - Stream Protocol Key
-// *
-// **********************************************/
-//TYPE
-//        MMTIME = Cardinal;
-
-  spcbKey = record
-    ulDataType    : LongInt;
-    ulDataSubType : LongInt;
-    ulIntKey      : LongInt;              // Generated internal key
-  end;
-//  pspcbKey = ^spcbKey;
-
-//*********************************************
-// *
-// * SPCB - Stream Protocol Control Block
-// *
-// **********************************************/
-  _spcb = record
-   ulSPCBLen       : LongInt;       // SPCB struture length
-   spcbkey         : SPCBKEY;
-   ulDataFlags     : LongInt;       // Data type flags
-   ulNumRec        : LongInt;       // Max # records/buffer (Only used for Split streams)
-   ulBlockSize     : LongInt;       // Block alignment in bytes.
-   ulBufSize       : LongInt;       // Buffer size (SSM allocated buffers) must be
-                                  //  a multiple of Block size
-   ulMinBuf        : LongInt;       // Minimum number of buffers needed to stream
-   ulMaxBuf        : LongInt;       // Maximum number of buffers needed to stream
-   ulSrcStart      : LongInt;       // # of EMPTY buffers required to start Source
-   ulTgtStart      : LongInt;       // # of FULL buffers required to start Target
-   ulBufFlags      : LongInt;       // Handler Protocol negotiation flags
-   ulHandFlags     : LongInt;       // Handler Protocol flags
-   mmtimeTolerance : mmTime;      // Sync tolerance value...Used as check by SSM
-                                  //  to determine whether to send a sync pulse
-                                  //  to this specific slave Stream Handler.
-                                  //  Algorithm:
-                                  //   diff = abs(master time - slave time)
-                                  //   if  diff >= tolerance
-                                  //     then send sync pulse
-                                  // (Valid only for Slave stream handlers)
-   mmtimeSync      : mmTime;      // Used to save sync pulse generation granularity
-                                  //  if the master uses the Stream Manager Timer.
-                                  //  if SpiSetSync passed NULL value for sync gran
-                                  //   then use this default value. (since hardware
-                                  //   must have it's own interrupt time interval.
-                                  // (Valid only for Master stream handlers)
-   ulBytesPerUnit  : LongInt;       // Bytes/unit of time. This is used to do seeks
-                                  // on linear data that is not compressed or
-                                  // of variable length.
-   mmtimePerUnit   : mmTime;      // The amount of mmtime each unit represents.
-                                  // A unit can be a second, minute or whatever.
-  end;
-  pspcb = ^_spcb;
-
-const
-  spcb_max_buf_Size        = 1024*1024;  // Largest buffer size in bytes
-
-
-//******************
-// * SPCB_ulDataFlags:
-// *******************/
-
-  // SPCB_ulDataFlags:
-  spcbData_CueTime         = $0002; // This data type can support time cue points
-  spcbData_CueData         = $0004; // This data type can support data cue points
-
-  spcbData_Seek            = $0000; // Seeks can be performed on this data type.
-  spcbData_NoSeek          = $0008; // NO seeks can be performed on this data type.
-  spcbData_YieldTime       = $0010; // The ulBytes per unit field is used for a millisecond value
-                                    // It represents the amount of yield time between reads of
-                                    // each buffer. If this bit is set, the value of ulBytesPerUnit
-                                    // is used as input to DosSleep to yield for that period of time
-  ValidDataFlags           = spcbData_CueTime OR spcbData_CueData OR
-                             spcbData_YieldTime OR spcbData_NoSeek;
-
-
-//*******************
-//* SPCB_ulBufFlags:
-//********************/
-
-  // SPCB_ulBufFlags:
-  spcbBuf_USERPROVIDED     = $0001; // User provides buffers for stream
-                                    // SSMgr will not allocate buffers,
-                                    // but must lock down provided buffers,
-                                    // so this will affect performance!!
-                                    // (Source Handler only)
-  spcbBuf_FIXEDBUF         = $0002; // Buffer size is fixed for this data type
-                                    //  in this handler. Can not be used
-                                    //  with the spcbBuf_USERPROVIDED flags.
-  spcbBuf_NONCONTIGUOUS    = $0004; // Buffer do not need to be contiguous
-                                    //  in physical memory.
-  spcbBuf_INTERLEAVED      = $0008; // Stream buffers can be interleaved.
-                                    //  Can not be use with the
-                                    //  spcbBuf_USERPROVIDED flag.
-                                    //  (Source Handler only)
-  spcbBuf_MAXSIZE          = $0010; // ulBufSize is the maximum size that
-                                    //  can be used by this stream handler
-  spcbBuf_16MEG            = $0020; // The Stream buffers may be allocated
-                                    //  above the 16 Meg line. This is used
-                                    //  by stream handlers that can support
-                                    //  greater than 16 Megabyte addresses.
-  spcbBuf_FIXEDBLOCK       = $0040; // Use the ulBlockSize field to represent
-                                    // the size of the IO reads that should
-                                    // be performed (Interleaved streams)
-  ValidBufFlags            = spcbBuf_UserProvided OR spcbBuf_FixedBuf OR
-                             spcbBuf_NonContiguous OR spcbBuf_Interleaved OR
-                             spcbBuf_16Meg OR spcbBuf_FixedBlock OR
-                             spcbBuf_MaxSize;
-
-//******************
-// * SPCB_ulHandFlags:
-// *******************/
-  // SPCB_ulHandFlags:
-  spcbHand_genSync         = $0001; // (INPUT FROM HANDLER ONLY)
-                                    // This handler can generate sync pulses
-                                    // if it is the master.
-  spcbHand_RcvSync         = $0002; // (INPUT FROM HANDLER ONLY)
-                                    // This handler can receive sync pulses
-                                    // if it is a slave
-  spcbHand_Timer           = $0004; // Use Stream Manager Timer for Sync
-  spcbHand_NonStream       = $0008; // Stream Handler is non-streaming
-  spcbHand_GenTime         = $0010; // This handler contains real
-                                    // stream time. The handler that
-                                    // supports the SpiGetTime, data/time
-                                    // cue point calls for this stream.
-  spcbHand_NoPreRoll       = $0020; // This stream can not be prerolled.
-                                    // (i.e. recording streams)
-  spcbHand_NoSync          = $0040; // This stream can be group into a
-                                    // sync group, but does not send or
-                                    // receive sync pulses.
-  spcbHand_Phys_Seek       = $0080; // This handler does a seek to a physical
-                                    // device or memory not just a time adjustment.
-                                    // (ssm will always call this handler first on
-                                    //  an SpiSeekStream call).
-
-  ValidHandFlags           = spcbHand_GenSync OR spcbHand_RcvSync OR
-                             spcbHand_Timer OR spcbHand_NonStream OR
-                             spcbHand_GenTime OR spcbHand_NoPreRoll OR
-                             spcbHand_NoSync OR spcbHand_Phys_Seek;
-
-//**************************************************************************\
-//
-// Module Name: SHDD.H
-//
-// OS/2 2.0 Multimedia Extensions Stream Handler Device Driver Interfaces
-// Block defintions.
-//
-// Copyright (c) International Business Machines Corporation 1990,1991
-//                         All Rights Reserved
-// -------------------------
-// Ported by Andry Svirgunov
-//
-//**************************************************************************/
-
-//***************************************************************************/
-//                         D E F I N E S                                    */
-//***************************************************************************/
-
-// Multimedia Extensions Stream Handler Device Driver Interfaces
-// Block defintions.
-
-type
-  shdfn   = pointer;
-  ddcmdfn = pointer;
-  hstream = Longint;
-  hevent  = LongInt;
-  hID     = LongInt;
-//  MMTIME  = Cardinal;
-type
-  time_evcb = record
-    ulType         : LongInt;            // Event_CUE_TIME
-    ulSubType      : LongInt;            // Not used
-    ulFlags        : LongInt;            // Single/Recurring(input/output)
-    hstream        : HSTREAM;          // handle to stream for this event (input/output)
-    hid            : hID;              // handler Id (input/output)
-    ulStatus       : LongInt;            // Event status/error return code (output)
-    mmtimeStream   : MMTIME;           // Stream time (input/output)
-    unused1        : LongInt;            // 0 (input)
-    unused2        : LongInt;            // 0 (input)
-  end;
-  ptime_evcb = ^time_evcb;
-(*type
-  spcbKey = record
-    ulDataType    : LongInt;
-    ulDataSubType : LongInt;
-    ulIntKey      : LongInt;              // Generated internal key
-  end;*)
-//  pspcbKey = ^spcbKey;
-
-//***************************************************************************/
-//                       S T R U C T U R E S                                */
-//***************************************************************************/
-
-
-//***************************************************************************/
-//***   DDCMD Interface                                                    **/
-//***************************************************************************/
-
-const
-  // DDCMD Defines
-  DDCMD_SETUP                   = 0;
-  DDCMD_READ                    = 1;
-  DDCMD_WRITE                   = 2;
-  DDCMD_STATUS                  = 3;
-  DDCMD_CONTROL                 = 4;
-  DDCMD_REG_STREAM              = 5;
-  DDCMD_DEREG_STREAM            = 6;
-
-type
-  ddCmdCommon = record
-    ulFunction        : LongInt;                 // Function requested by SH
-    Stream            : hStream;               // data stream instance
-  end;
-  pddCmdCommon = ^ddCmdCommon;
-
-  ddCmd_Setup_parm = record
-    ulFunction        : LongInt;                 // Function requested by SH
-    hStream           : HSTREAM;
-    pSetupParm        : Pointer;               // see SETUP_PARM struct
-    ulSetupParmSize   : LongInt;                 // see SETUP_PARM struct
-  end;
-  pddCmdSetup = ^ddCmd_Setup_parm;
-
-
-                //*********************************************/
-                // SETUP_PARM structure                       */
-                //*********************************************/
-  // SETUP_PARM structure
-  Setup_Parm = record                          //  DDCMDSETUP parameter block
-    ulStreamTime      : LongInt;                 // stream time in milliseconds
-    ulFlags           : LongInt;                 // various flags (input/output)
-    // NOTE: new fields will be added here
-  end;
-  pSetup_Parm = ^Setup_Parm;
-
-                //*********************************************/
-                // ulFlag defines                             */
-                //*********************************************/
-const
-  // ulFlag defines
-  SETUP_RECURRING_EVENTS        = $00000001;
-                // the device driver sets this flag on return from the
-                // DDCMD_SETUP command if the device driver assumes events
-                // are recurring events---in this case, the stream handler
-                // will not have to re-enable a recurring event each time
-                // the event occurs by sending a DDCMD_CONTROL command to
-                // the device driver.  this is useful when CUE_TIME or
-                // DATA_CUE events are expected to be used as RECURRING
-
-type
-  ccCmdReadWrite = record
-    ulFunction        : LongInt;                 // Function requested by SH
-    hStream           : HSTREAM;
-    pBuffer           : Pointer;
-    ulBufferSize      : LongInt;
-    pProcessLin       : Pointer;
-    fEOS              : Boolean;
-    ulParm1           : LongInt;
-    ulParm2           : LongInt;
-    ulLength          : LongInt;
-  end;
-  pccCmdReadWrite = ^ccCmdReadWrite;
-  ppccCmdReadWrite = ^pccCmdReadWrite;
-
-  ccCmdStatus = record
-    ulFunction        : LongInt;                 // Function requested by SH
-    hStream           : HSTREAM;
-    pStatus           : Pointer;               // (output)ptr to current position time
-    ulStatusSize      : LongInt;                 // (output)size of position time
-  end;
-  pccCmdStatus = ^ccCmdStatus;
-
-                //*********************************************/
-                // STATUS_PARM structure                      */
-                //*********************************************/
-  // STATUS_PARM structure
-  Status_Parm = record                         // DDCMDSTATUS parameter block
-    ulTime            : LongInt;                 // current position time in milliseconds
-    // NOTE: new fields will be added here
-  end;
-  pStatus_Parm = ^Status_Parm;
-
-  ddCmdControl = record
-    ulFunction        : LongInt;                 // Function requested by SH
-    hStream           : HSTREAM;
-    hEvent            : hEvent;                // used for EVENTS only
-    ulCmd             : LongInt;
-    pParm             : Pointer;               // see CONTROL_PARM structure
-    ulParmSize        : LongInt;                 // see CONTROL_PARM structure
-  end;
-  pddCmdControl = ^ddCmdControl;
-                //*********************************************/
-                // ulCmd defines                              */
-                //*********************************************/
-const
-  // ulCmd defines
-  DDCMD_START                   = 1;           // start device
-  DDCMD_STOP                    = 2;           // stop device and return current position in pParm
-  DDCMD_PAUSE                   = 3;           // pause device and return current position in pParm
-  DDCMD_RESUME                  = 4;           // resume device
-  DDCMD_ENABLE_EVENT            = 5;           // ask PDD to create this event
-  DDCMD_DISABLE_EVENT           = 6;           // ask PDD to purge this event
-  DDCMD_PAUSE_TIME              = 7;           // pause time keeping, but not the stream
-  DDCMD_RESUME_TIME             = 8;           // resume time keeping.
-
-                //*********************************************/
-                // CONTROL_PARM structure                     */
-                //*********************************************/
-type
-  // CONTROL_PARM structure
-  Control_Parm = record                        // DDCMDCONTROL parameter block
-    ulTime            : LongInt;                 // time in milliseconds
-                                               // SH sets cuetime when ulCmd is ENABLE_EVENT
-                                               // PDD returns current time for STOP, PAUSE
-    evcb              : TIME_EVCB;
-  end;
-  pControl_Parm = ^Control_Parm;
-
-                //******************************************************************************/
-                // This structure is filled in by the amp mixer based on the instance          */
-                // data.                                                                       */
-                //******************************************************************************/
-TYPE AUDIOMODE = record    // audio mode fields for DDCMDRegister */
-        lSRate:LongInt;            // sample rate              */
-        lBitsPerSRate:LongInt;     // bits per sample          */
-        sChannels:Integer;        // Channels                 */
-        end;
-TYPE PAUDIOMODE=^AUDIOMODE;
-
-
-TYPE  ddCmdRegister = record
-    ulFunction        : LongInt;                 // Function requested by SH
-    hStream           : HSTREAM;               // Stream handle needed @ interrupt time
-    ulSysFileNum      : LongInt;                 // Device Handle so pdd can map device instance to hstream
-    pSHDEntryPoint    : SHDFN;                 // Stream handler entry point
-    ulStreamOperation : LongInt;                 // SH input Record or play
-    spcbkey           : SPCBKEY;
-    ulBufSize         : LongInt;                 // PDD output (optional) buffer size in bytes for SPCB
-    ulNumBufs         : LongInt;                 // PDD output (optional) # of buffers for SPCB
-    ulAddressType     : LongInt;                 // PDD output (required) addr ptr type to data buffer
-    ulBytesPerUnit    : LongInt;                 // PDD output (required)
-    mmtimePerUnit     : MMTIME;                // PDD output (required)
-    AudioMode         : AUDIOMODE;                 // SH input Device Control Block
-    hid               : HID;                   // SH input stream handler id
-  end;
-  pddCmdRegister = ^ddCmdRegister;
-
-                //****************************/
-                // ulStreamOperation  defines*/
-                //****************************/
-const
-  // ulStreamOperation  defines
-  STREAM_OPERATION_MASK         = $C000;
-  STREAM_OPERATION_CONSUME      = $8000;
-  STREAM_OPERATION_PRODUCE      = $C000;
-
-                //******************************************************************************/
-                // ulAddressType  defines                                                      */
-                // The PDD will tell the SH what type of address ptr it expects the data buffer*/
-                // to be.  The SH will then request this address type to the SSM, so that the  */
-                // SSM will send the correct type of each buffer request.                      */
-                //******************************************************************************/
-  ADDRESS_TYPE_VIRTUAL          = 0;
-  ADDRESS_TYPE_PHYSICAL         = 1;              //default
-  ADDRESS_TYPE_LINEAR           = 2;
-
-type
-  ddCmdDeregister = record
-    ulFunction        : LongInt;                 // Function requested by SH
-    Stream            : hStream;               // Stream handle needed @ interrupt time
-  end;
-  pddCmdDeregister = ^ddCmdDeregister;
-
-
-//***************************************************************************/
-//*** RING 0 Stream Handler SHD Interfaces                                ***/
-//***************************************************************************/
-
-const
-  // RING 0 Stream Handler  SHD's:
-  SHD_REPORT_INT                = 0;           // PDD reports interrupt has arrived
-  SHD_REPORT_EVENT              = 1;           // PDD reports cuetime has arrived
-
-type
-  shd_Common = record
-    ulFunction        : LongInt;                 // Function requested by PDD
-    Stream            : hStream;               // Stream handle needed @ interrupt time
-  end;
-  pshd_Common = ^shd_Common;
-
-type shd_ReportInt = record
-    ulFunction        : LongInt;                 // Function requested by PDD
-    hStream           : HSTREAM;               // so SH knows which stream to process
-    pBuffer           : Pointer;               // return ptr to last used buffer
-    ulFlag            : LongInt;                 // reason for interrupt
-    ulStatus          : LongInt;                 // rc or bytes read/written
-    ulStreamTime      : LongInt;                 // time in milliseconds of stream position
-  end;
-  pshd_ReportInt = ^shd_ReportInt;
-
-                //******************/
-                // ulFlag settings */
-                //******************/
-const
-  // ulFlag settings
-  ERROR                         = $80;
-  STREAM_STOP_NOW               = $40;
-  SHD_READ_COMPLETE             = 1;
-  SHD_WRITE_COMPLETE            = 2;
-
-type
-  shd_ReportEvent = record
-    ulFunction        : LongInt;                 // Function requested by PDD
-    hStream           : HSTREAM;               // so SH knows which stream to process
-    hEvent            : hEvent;                // event handle pass back to stream handler
-    ulStreamTime      : LongInt;                 // time in milliseconds of stream position
-  end;
-  pshd_ReportEvent = ^shd_ReportEvent;
-
-
-
-//***************************************************************************/
-//*** RING 3 Stream Handler SHD Interfaces                                ***/
-//***************************************************************************/
-
-//*** RING 3 Stream Handler SHD Interfaces                                **
-
-const
-  // RING 3 Stream Handler  SHD's: (Uses SpiSendMsg as interface)
-  SHC_REPORT_INT                = $80000000;   // ulMsgType for SHD_REPORT_INT
-  SHC_REPORT_EVENT              = $80000001;   // ulMsgType for SHD_REPORT_EVENT
-
-
-//*********************************************
-// *
-// * MSG_REPORTINT Control Block.
-// *  pMsg field of SpiSendMsg api
-// *
-// **********************************************/
-type
-  // MSG_REPORTINT Control Block.
-  // pMsg field of SpiSendMsg api
-  msg_ReportInt = record
-    ulMsgLen          : LongInt;                 // Length of structure
-    pBuffer           : Pointer;               // return ptr to last used buffer
-    ulFlag            : LongInt;                 // reason for interrupt
-    ulStatus          : LongInt;                 // rc or bytes read/written
-    ulStreamTime      : LongInt;                 // time in milliseconds of stream position
-  end;
-  pmsg_ReportInt = ^msg_ReportInt;
-
-   // For ulFlag defines, refer to the _shd_reportint_parm structure */
-
-
-
-//*********************************************
-// *
-// * MSG_REPORTEVENT Control Block.
-// *  pMsg field of SpiSendMsg api
-// *
-// **********************************************/
-type
-  // MSG_REPORTEVENT Control Block.
-  //  pMsg field of SpiSendMsg api
-  msg_ReportEvent = record
-    ulMsgLen          : LongInt;                 // Length of structure
-    hevent            : hEvent;                // event handle pass back to stream handler
-    ulStreamTime      : LongInt;                 // time in milliseconds of stream position
-  end;
-type   pmsg_ReportEvent = ^msg_ReportEvent;
-
-//***************************************************************************/
-//              F U N C T I O N   P R O T O T Y P E S                       */
-//***************************************************************************/
-
-//RC  FAR         SHDEntryPoint(PSHD_COMMON pCommon);
-//RC  FAR         DDCMDEntryPoint(PDDCMDCOMMON pCommon);
-
-//***************************************************************************\
-//*                                                                           *
-//*    Multimedia Mixer Software Development Kit Include File                 *
-//*                                                                           *
-//*                                                                           *
-//***************************************************************************/
-// Converted by Andry Svirgunov. Email: [email protected]                        */
-// 14.11.2002                                                               */
-//                                                                          */
-//***************************************************************************/
-
-        TYPE HMIXER = longint;
-        TYPE PHMIXER = ^HMIXER;
-
-
-TYPE _MIXERLINEINFO = RECORD
-        ulLength : LongInt;             //length of the struct */
-        ulNumChannels : LongInt;        // number of channels on input */
-        ulSupport : LongInt;            // supported functionality (MIXLINEINFO) */
-        ulConnectionsPossible : LongInt;// lines connectable to */
-        ulLine : LongInt;               // which line to operate on */
-        end;
-
-TYPE PMIXERLINEINFO = ^_MIXERLINEINFO;
-
-TYPE _LINECONNECTIONS = RECORD
-        ulLength : Longint;             // length of the struct */
-        ulConnection : LongInt;
-        ulLine : Longint;
-        ulFlags : LongInt;
-        end;
-
-TYPE PLINECONNECTIONS = ^_LINECONNECTIONS;
-
-// flags for MIXERCONTROL ulFlags field */
-CONST
-        MIX_MASTER = $000000001;        // indicates that this is master effect for the control */
-
-TYPE _MIXERCONTROL = RECORD
-        ulLength : LongInt;             // length of the struct */
-        ulLine : LongInt;
-        ulControl : LongInt;
-        ulSettings : LongInt;
-        ulFlags : LongInt;
-        end;
-
-TYPE PMIXERCONTROL = ^_MIXERCONTROL;
-// -- need masteraudio command for the following. */
-
-
-// flags for MIXERLINEINFO ulSupport field */
-CONST
-        MIX_BALANCE       = $00100000;  // separate balance volume control */
-        MIX_ALC           = $00000004;  // supports Auto Level Control */
-        MIX_MONITOR       = $00000002;  // supports Monitor Control */
-        MIX_CROSSOVER     = $00000010;  // supports crossover change */
-        MIX_LOUDNESS      = $00000020;  // supports loudness equalization */
-        MIX_MUTE          = $00000040;  // supports channel mute */
-        MIX_REVERB        = $00000080;  // supports reverb */
-        MIX_STEREOENHANCE = $00000100;  // supports stereo enhance */
-        MIX_CUSTOM1       = $00000200;  // supports custom effect #1 */
-        MIX_CUSTOM2       = $00000400;  // supports custom effect #2 */
-        MIX_CUSTOM3       = $00000800;  // supports custom effect #3 */
-        MIX_LRVOLUME      = $00001000;  // separate left-right volume control */
-        MIX_BASS          = $00800000;  // supports Bass */
-        MIX_MID           = $00020000;  // supports Mid */
-        MIX_TREBLE        = $00400000;  // supports Treble */
-        MIX_PITCH         = $00200000;  // supports pitch modifications */
-        MIX_GAIN          = $01000000;  // supports gain modifications */
-        MIX_CHORUS        = $00004000;  // supports Bass */
-        MIX_VOLUME        = 000800000;  // supports volume controls */
-
-
-        MIX_STEREO_OFF    = $00000000;
-        MIX_STEREO_STUDIO = $40004000;
-        MIX_STEREO_HALL   = $80008000;
-        MIX_STEREO_STADIUM= $C000C000;
-
-        MCI_STEREO_OFF    = $00000000;
-        MCI_STEREO_STUDIO = $00000001;
-        MCI_STEREO_HALL   = $00000002;
-        MCI_STEREO_STADIUM= $00000004;
-
-        MIX_LOUDNESS_OFF  = $00000000;
-        MIX_LOUDNESS_ON   = $FFFFFFFF;
-
-        MCI_LOUDNESS_OFF  = $00000000;
-        MCI_LOUDNESS_ON   = $FFFFFFFF;
-
-
-// ERROR MESSAGES */
-CONST
-        MIXERR_BASE = 512;
-        MIXERR_NOERR = 0;
-        MIXERR_INVALIDHANDLE = MIXERR_BASE+0;
-        MIXERR_INVALIDINPUT  = MIXERR_BASE+1;
-        MIXERR_INVALIDOUTPUT = MIXERR_BASE+2;
-        MIXERR_NOTSUPPORTED  = MIXERR_BASE+7;
-
-
-// INPUT LINES */
-// SOURCES */
-        IN_SYNTHESIZER = 0;
-        IN_MIXER = 1;
-        IN_EXTERNAL = 2;
-        IN_INTERNAL = 3;
-        IN_MICROPHONE = 4;
-        IN_PCM = 5;
-        IN_PC_SPEAKER = 6;
-
-// SINKS */
-        OUT_AMPLIFIER = 0;
-        OUT_PCM = 1;
-
-
-// SOURCES */
-        SOURCE_SYNTHESIZER    = $000000001;
-        SOURCE_LINE           = $000000002;
-        SOURCE_INTERNAL_AUDIO = $000000004;
-        SOURCE_MICROPHONE     = $000000008;
-        SOURCE_WAVE           = $000000010;
-        SOURCE_PC_SPEAKER     = $000000020;
-        SOURCE_NULL           = $000000040;
-        SOURCE_MIDI           = $000000080;
-
-// SINKS */
-// lad--these defines are invalid. */
-        SINK_LINE_OUT   = $000100000;
-        SINK_SPEAKER    = $000200000;
-        SINK_HEADPHONES = $000400000;
-        SINK_NULL       = $000800000;
-        SINK_ALL        = $001000000;
-
-// lad--wpos addition */
-        SINK_WAVE       = $002000000;
-        SINK_MIDI       = $004000000;
-
-//*************************START OF SPECIFICATIONS **************************/
-//                                                                          */
-// Module NAME:  MCD.H                                                      */
-//                                                                          */
-//                                                                          */
-// OS/2 2.0 Multimedia Extensions MCD structures and definitions            */
-//                                                                          */
-// Copyright (c) International Business Machines Corporation 1990,1991      */
-//                         All Rights Reserved                              */
-//*--------------------------------------------------------------------------*/
-//* Converted by Andry Svirgunov. Email: [email protected]                        */
-//* 14.11.2002                                                               */
-//*                                                                          */
-//************************//END OF SPECIFICATIONS ***************************/
-
-CONST
-
-        LIST_LEN=8;
-
-        LINE_IN_ON  =$00000001;
-        MIC_ON      =$00000002;
-        LINE_OUT_ON =$00000004;
-
-TYPE
-        PSZ = PChar;
-        SHandle = Word;
-        HFile = SHandle;
-//        HMTX = Longint;
-
-//-------------------------------------------------------------------------*
-//RIFF to ACPA Mode conversion Table
-//------------------------------------------------------------------------*/
-
-TYPE RIFFTABLE = Record
-        ulDataType:LongInt;
-        ulAUDIODDMode:LongInt;
-        end;
-
-TYPE _MCI_PORT_LIST = Record   // devid */
-      ulDevType:LongInt;
-      ulDevNum:LongInt;
-        end;
-//-------------------------------------------------------------------------*
-//Amp/Mixer instance structure declaration
-//------------------------------------------------------------------------*/
-
-TYPE _MCI_AMP_INSTANCE = Record
-        szDeviceName:Array [0..128] of char;
-        szDriverName:Array [0..15] of char;
-        hFile:HFile;
-        usDeviceID:Integer;
-        ulGlobalFile:LongInt;
-
-        usMasterVolume:Integer;
-        lLeftVolume:LongInt;
-        lRightVolume:LongInt;
-        lVolumeDelay:LongInt;
-        lBalance:LongInt;
-
-        lBalanceDelay:LongInt;
-        lBass:LongInt;
-
-        lTreble:LongInt;
-
-        lPitch:LongInt;
-        lGain:LongInt;
-
-        lSRate:LongInt;
-        lBitsPerSRate:LongInt;
-        lBsize:LongInt;
-        sMode:Integer;
-        sChannels:Integer;
-        ulFlags:LongInt;
-        lMonitor:LongInt;
-        lInput:LongInt;
-        lOutput:LongInt;
-        ulOperation:LongInt;
-        ulGainLevel:LongInt;
-
-        ulStoreRVolume:LongInt;
-        ulStoreLVolume:LongInt;
-
-
-        ulDosOpened:LongInt;
-        ulInitOpen:LongInt;
-        ulMasterVolume:LongInt;
-        ulActive:LongInt;
-        lStoreSRate:LongInt;
-        lStoreBitsPerSRate:LongInt;
-        ulStoreOperation:LongInt;
-        sStoreMode:Integer;
-        sStoreChannels:Integer;
-        ulSetAmpDefaults:LongInt;
-        ulDefaultsSet:LongInt;
-
-        ulOutputDev:LongInt;
-        ulInputDev:LongInt;
-        ulResourcesUsed:LongInt;
-        ulRestoreNotify:LongInt;
-        ulCallback:LongInt;
-        sUserParm:Integer;
-        lNotifyFlag:LongInt;
-//        LONG  ( //APIENTRY pfnAUDIOIF) ( PVOID, LONG, LONG, LONG, LONG);
-        hmtxInstanceSem:HMTX;
-        ulClass:LongInt;
-        ulBlockAlignment:LongInt;
-        ulHardwareMode:LongInt;
-        rInputList:Array [0.. LIST_LEN ] of _MCI_PORT_LIST;
-        rOutputList:Array [0.. LIST_LEN ] of _MCI_PORT_LIST;
-        ulNumInputs:LongInt;
-        ulNumOutputs:LongInt;
-
-        ulDataType:LongInt;
-        ulSubType:LongInt;
-        ulBytesPerBlock:LongInt;
-        ulMMTimePerBlock:LongInt;
-
-//-------------------------------------------------------------------------*
-//New resource management stuff
-//------------------------------------------------------------------------*/
-
-
-
-        pAudioModeData:Pointer;      // ptr to dev. specific resource data */
-        pResourceDLL:Array [0.. 128 ] of Char;
-
-        pProdInfo:PSZ;         // pointer to the product name        */
-        ulDeviceID:LongInt;        // pointer to the device id.          */
-        ulNumMappingRows:LongInt;  // num of RIFF->AUDIODD mapping modes */
-        ulMatch:LongInt;
-        pMapTable:^RIFFTABLE;        // additional RIFF->AUDIODD mappings  */
-
-        ulNumDataTypes:LongInt;    // number of datatypes to check       */
-        pDataTypeTable:Pointer;
-        fMute:Boolean;
-        ulResourceID:LongInt;      // offset in the resource dll to use  */
-        ulConnDefaults:LongInt;    // Default values for connectors      */
-
-        end;
-TYPE PMCI_AMP_INSTANCE = ^_MCI_AMP_INSTANCE;
-
-
-const
-  MIDINAMESIZE                  = 40;
-  MIDIPATCHNUM                  = 128;
-  MIDITYPEAPPNAME               = 'MidiTypes';    // Appname in MIDITYPE.INI
-
-//*******************************************************************/
-// These structures describe the format of the MIDI maps that are   */
-// located in the MIDITYPE.INI file.                                */
-//*******************************************************************/
-
-type
-  // These structures describe the format of the MIDI maps that are
-  // located in the MIDITYPE.INI file.
-  MidiTypeEntry = record
-    uGenMidiPatchNumber  : Integer;             // Device To General Midi Conversion
-    uDevMidiPatchNumber  : Integer;             // General Midi to Device Conversion
-    uVolumePercent       : Integer;             // Channel Patch Volume Scaler
-    uGenMidiKeyNumber    : Integer;             // Device To General Midi Perc. Key Conversion
-    uDevMidiKeyNumber    : Integer;             // General Midi to Device Perc. Key Conversion
-  end;
-  pMidiTypeEntry = ^MidiTypeEntry;
-
-  _MidiType = record
-    uStyle            : Integer;                // Midi Style
-    uDrums10          : Integer;                // Patch 10 Drums if Perckey not supported
-    uDrums16          : Integer;                // Patch 16 Drums if Perckey not supported
-    ulReserved        : LongInt;                 // Reserved
-    MidiTypeEntry     : array[0..midiPatchNum-1] of MIDITYPEENTRY;
-                                               // Array of MIDITYPEENTRYs
-    szPatchAndPercKeyName: array[0..2*MIDIPATCHNUM*MIDINAMESIZE-1] of char;
-                                               // List of 128 Patch Names
-                                               // that are null terminated, then a
-                                               // list of 128 Percussion key names that
-                                               // are double null terminated
-                                               // Each item is null terminated
-  end;
-  MidiTpye=_MidiType;
-  pMidiType = ^_MidiType;
-
-const
-  // Style Flags
-  MT_PERCUSSIONKEYS             = $1;          // Percussion Keys are supported
-  MT_MAPPERCKEYPATCHES          = $2;          // Map Percussion Key Patches
-
-
-CONST
-        STATUS_BIT = $80;
-
-        TRACK_OFF = 0;
-        TRACK_ON = 1;
-
-        NORMAL_SYSEX = $F0;
-        ESCAPE_SYSEX = $F7;
-
-        // User defined messages for IO PROC
-        MMIOM_START = $0E00;
-        MMIOM_USER = $0F00;
-        MMIOM_GETHEADER = MMIOM_START + 9;
-        META = $FF;
-// Meta stuff */
-// user defined messages for IO PROC */
-        MMIO_SEQ = MMIOM_USER + 1;
-        MMIO_MERGE = MMIOM_USER + 2;
-        MMIO_FROM_SEQ = MMIOM_USER + 3;
-        MMIO_TIMED_READ = MMIOM_USER + 4;
-        MMIO_SET_TRACKS = MMIOM_USER + 5;
-        MMIO_FORMAT_O = MMIOM_USER + 6;
-        MMIO_GETHEADER = MMIOM_GETHEADER;
-        MMIO_GETFILELENTH = MMIOM_USER +10;
-        MMIO_GETTRACKLENGTH = MMIOM_USER + 11;
-
-
-type
-  MidiHeader = record // midi header //
-    chHeaderChunk               : array[0..3] of Char;
-    case Boolean of
-    true: (
-        dwHeaderLength : Dword;
-        wFormat : Word;
-        wNumTracks : Word;
-        wDivision : Word;
-        vpAdditionalInformation_ : ^LongInt;
-        );
-        false: (
-    ulHeaderLength              : LongInt;
-    usFormat                    : Integer;
-    usNumTracks                 : Integer;
-    usDivision                  : Integer;
-    vpAdditionalInformation     : Pointer;
-    )
-  end;
-  pMidiHeader = ^MidiHeader;
-
-  mmMidiHeader = record
-    case boolean of
-    true: (
-    ulHeaderLength    : LongInt;                 // Length in Bytes
-    ulContentType     : LongInt;                 // Image content
-    ulMediaType       : LongInt;                 // type of media
-    midiheader        : MidiHeader;            // header
-    );
-    false: (
-        dwHeaderLength : DWORD;         // Length in Bytes */
-        dwContentType : DWORD;          // Image content */
-        dwMediaType : DWORD;            // type of media */
-        midiheader_ : MIDIHEADER;       // header */
-        )
-  end;
-  pmmMidiHeader = ^mmMidiHeader;
-
-//***************************************************************************/
-//                                                                          */
-// Module Name: EVCB.H                                                      */
-//                                                                          */
-// OS/2 2.0 Multimedia Extensions Sync/Stream Manager Event Control         */
-// Block defintitions.                                                      */
-//                                                                          */
-// Copyright (c) International Business Machines Corporation 1991, 1992     */
-//                        All Rights Reserved                               */
-//***************************************************************************/
-// Converted by Andry Svirgunov. Email: [email protected]                        */
-// 14.11.2002                                                               */
-//                                                                          */
-//***************************************************************************/
-
-//*********************************************
-// * List of Implicit events:
-// *    EVENT_EOS                 - Use IMPL_EVCB
-// *    EVENT_ERROR               - Use IMPL_EVCB
-// *    EVENT_STREAM_STOPPED      - Use IMPL_EVCB
-// *    EVENT_SYNC_PREROLLED      - Use IMPL_EVCB
-// *    EVENT_PLAYLISTMESSAGE     - Use PLAYL_EVCB
-// *    EVENT_PLAYLISTCUEPOINT    - Use PLAYL_EVCB
-// *    EVENT_QUEUE_OVERFLOW      - Use IMPL_EVCB
-// **********************************************/
-
-//*********************************************
-// * List of Explicit events:
-// *    EVENT_SYNCOVERRUN         - Use OVRU_EVCB
-// *    EVENT_CUE_TIME            - Use TIME_EVCB
-// *    EVENT_CUE_DATA            - Use DATA_EVCB
-// *    EVENT_DATAUNDERRUN        - Use EVCB
-// *    EVENT_DATAOVERRUN         - Use EVCB
-// *    EVENT_CUE_TIME_PAUSE      - Use TIME_EVCB
-// **********************************************/
-CONST
-
-        EVENT_SYNCOVERRUN       =$4;
-        EVENT_CUE_TIME          =$5;       // Cue point in terms of stream time*/
-        EVENT_CUE_DATA          =$6;       // Cue point in terms of data items */
-        EVENT_DATAUNDERRUN      =$7;       // data underrun event from SH    */
-        EVENT_DATAOVERRUN       =$8;       // data underrun event from SH    */
-        EVENT_CUE_TIME_PAUSE    =$9;       // Pause when cue-point reached.  */
-        EVENT_STATUS_LEVEL      =$10;      // Report status level            */
-
-
-
-//*********************************************
-// * SYNC_EVCB - Sync Pulse Event Control Block
-// *             (This event is only seen by
-// *              stream handlers)
-// **********************************************/
-        EVENT_SYNC              =$1;     // Synchronization point in stream  */
-
-TYPE _SYNC_EVCB = RECORD         // syevcb                                     */
-   ulType:LongInt;                     // EVENT_SYNC                       */
-   ulSubType:LongInt;                  // Not used                         */
-   ulSyncFlags:LongInt;                // 0 (input),status (output)        */
-   hstream:LongInt;                    // handle to stream for this event  */
-   hid:LongInt;                        // Handler id                       */
-   ulStatus:LongInt;                   // Event status (output)            */
-   mmtimeStart:MMTIME;                 // Filled in by Sync/Stream manager */
-                                       //  at SpiEnableSync time. (input)  */
-   mmtimeMaster:MMTIME;                // Filled in by Master SH (input)   */
-   mmtimeSlave:MMTIME;                 // Filled in by slave SH. (output)  */
-   end;
-
-TYPE PSYNC_EVCB = ^_SYNC_EVCB;         // Ptr to a  EVCB       */
-
-// ulSyncFlags:
-CONST
-
-        SYNCOVERRUN        =$0001;    // Set by SSM if sync pulse comes in before    */
-                                      //  a has processed the current sync pulse.    */
-        SYNCPOLLING        =$0002;    // SSM set this after filling the handler EVCB.*/
-                                      //  Handler resets it after it processes the   */
-                                      //  contents of EVCB. The SSM must check this  */
-                                      //  bit before modifying EVCB. If bit already  */
-                                      //  set, set the SYNC overrun bit.             */
-
-
-        EVENT_RESERVED     =$2;       // RESERVED                         */
-
-
-//*********************************************
-// * IMPL_EVCB - Implicit Event Control Block
-// *             (This is a parameter on the
-// *              SpiCreatStrem API)
-// **********************************************/
-        EVENT_IMPLICIT_TYPE=$3;     // These events are always supported*/
-
-
-TYPE _IMPL_EVCB = RECORD         // imevcb                                     */
-   ulType:LongInt;                     // EVENT_IMPLICIT_TYPE              */
-   ulSubType:LongInt;                  // One of the implicit events (input) */
-   ulFlags:LongInt;                    // 0 (Input), status (Output)         */
-   hstream:LongInt;                    // handle to stream for this event (input/output) */
-   hid:LongInt;                        // 0 (input), handler Id (output)     */
-   ulStatus:LongInt;                   // Event status/error return code (output) */
-   unused1:LongInt;                    // 0 (input)                        */
-   unused2:LongInt;                    // 0 (input)                        */
-   unused3:LongInt;                    // 0 (input)                        */
-   end;
-TYPE PIMPL_EVCB = ^_IMPL_EVCB;
-
-// ulSubtype:                                                              */
-
-CONST
-
-        EVENT_EOS               =$1;     // End of Stream                    */
-        EVENT_ERROR             =$2;     // Error in Stream handler or device driver        */
-        EVENT_STREAM_STOPPED    =$3;     // Stream is in a stopped state (Discard or Flush) */
-        EVENT_SYNC_PREROLLED    =$4;     // All streams are prerolled (buffers   */
-                                         //  have been filled by the Source SH's.*/
-        EVENT_PLAYLISTMESSAGE   =$5;     // Memory SH playlist message event     */
-        EVENT_PLAYLISTCUEPOINT  =$6;     // Memory SH playlist cue point         */
-        EVENT_QUEUE_OVERFLOW    =$7;     // Event Queue overflow. Indicates lost */
-                                         //  events. Application must use this   */
-                                         //  to clear any waiting conditions.    */
-        EVENT_START             =$8;     // Start stream                         */
-
-
-//*********************************************
-// * PLAYL_EVCB - Playlist Message Event Control Block
-// **********************************************/
-// (IMPLICIT EVENT)                                                        */
-TYPE _PLAYL_EVCB=RECORD       // plevcb                                    */
-   ulType:LongInt;                     // EVENT_IMPLICIT_TYPE              */
-   ulSubType:LongInt;                  // EVENT_PLAYLISTMESSAGE or EVENT_PLAYLISTCUEPOINT */
-   ulFlags:LongInt;                    // 0 (input), status (output)                      */
-   hstream:LongInt;                    // handle to stream for this event (input/output)  */
-   hid:LongInt;                        // 0 (input), handler Id (output)                  */
-   ulStatus:LongInt;                   // Playlist Instruction number (output)            */
-   ulMessageParm:LongInt;              // 0 (input), Message from playlist (output)       */
-   unused1:LongInt;                    // 0 (input)                        */
-   unused2:LongInt;                    // 0 (input)                        */
-   end;
-TYPE PPLAYL_EVCB = ^_PLAYL_EVCB;             // Ptr to a  EVCB       */
-
-
-//*********************************************
-// * OVRU_EVCB - Sync Overrun Event Control Block
-// *             (Applications can request to be
-// *              notified whenever a Sync overrun
-// *              occurs.
-// **********************************************/
-TYPE _OVRU_EVCB = RECORD     // ovevcb */
-   ulType:LongInt;                     // EVENT_SYNCOVERRUN                */
-   ulSubType:LongInt;                  // Not used                         */
-   ulFlags:LongInt;                    // 0 (input), status (output)       */
-   hstream:LongInt;                    // handle to stream for this event (input/output) */
-   hid:LongInt;                        // handler Id (input/output)        */
-   ulStatus:LongInt;                   // Event status/error return code (output) */
-   mmtimeSlave:MMTIME;                // 0 (input), Slave stream time (output)   */
-   mmtimeStart:MMTIME;                // 0 (input), Slave start offset (offset)  */
-   mmtimeMaster:MMTIME;               // 0 (input), Master stream time (output)  */
-   end;
-
-TYPE POVRU_EVCB = ^_OVRU_EVCB;             // Ptr to a  EVCB       */
-
-
-//*********************************************
-// * TIME_EVCB - Cue Time Event Control Block
-// *             (Applications can request to be
-// *              notified for a time cue point)
-// **********************************************/
-
-TYPE _TIME_EVCB = RECORD     // tievcb                                     */
-   ulType:LongInt;                     // EVENT_CUE_TIME                   */
-   ulSubType:LongInt;                  // Not used                         */
-   ulFlags:LongInt;                    // Single/Recurring(input/output)   */
-   hstream:LongInt;                    // handle to stream for this event (input/output)*/
-   hid:LongInt;                        // handler Id (input/output)                     */
-   ulStatus:LongInt;                   // Event status/error return code (output)       */
-   mmtimeStream:MMTIME;               // Stream time (input/output)       */
-   unused1:LongInt;                    // 0 (input)                        */
-   unused2:LongInt;                    // 0 (input)                        */
-   end;
-
-//TYPE PTIME_EVCB = ^_TIME_EVCB;             // Ptr to a  EVCB       */
-
-//                                                                         */
-// ulFlags:                                                                */
-CONST
-
-        EVENT_SINGLE            =$0;     // This is single one time event    */
-        EVENT_RECURRING         =$1;     // This is recurring event          */
-
-
-//*********************************************
-// * DATA_EVCB - Cue Data Event Control Block
-// *             (Applications can request to be
-// *              notified for a data cue point)
-// **********************************************/
-
-TYPE _DATA_EVCB = RECORD     // daevcb                                     */
-   ulType:LongInt;                     // EVENT_CUE_DATA                   */
-   ulSubType:LongInt;                  // Event SubType                    */
-   ulFlags:LongInt;                    // Single/Recurring(input/output)   */
-   hstream:LongInt;                    // handle to stream for this event (input/output) */
-   hid:LongInt;                        // handler Id (input/output)                      */
-   ulStatus:LongInt;                   // Event status/error return code (output)        */
-   mmtimeStream:MMTIME;                // Stream time (input/output)                     */
-   ulEventParm1:LongInt;               // Data to Cue on (input/output)                  */
-                                       //  This is interpreted by the stream handler     */
-   ulEventParm2:LongInt;               // Length of data cue buffer (input/output)       */
-   end;
-TYPE PDATA_EVCB = ^_DATA_EVCB;         // Ptr to a  EVCB       */
-
-// ulFlags:                                                                */
-//#define EVENT_SINGLE          0L        This is single one time event    */
-//#define EVENT_RECURRING       1L        This is recurring event          */
-
-CONST
-
-        EVENT_DATAPTR           =$2;   // ulEventParm1 if ptr to buffer and*/
-                                       //  ulEventParm2 is a length of buffer, */
-                                       //  else ulEventParm1 is data.          */
-
-
-//*****************
-// * EVCB_ulType:  (Stream Handler defined types)
-// ******************/
-        SH_TYPE           =$80000000;  // Stream Handler defined types must */
-                                       // have the high order bit set in the*/
-                                       // ulType field.                     */
-                                       // events: 0H - 7FFFFFFFH are reserved!*/
-
-//*********************************************
-// * EVCB - Generic Event Control Block (Use the
-// *        specific one in the SSM.H if possible)
-// **********************************************/
-TYPE _EVCB = RECORD     // evcb */
-   ulType:LongInt;                     // Event type (input)               */
-   ulSubType:LongInt;                  // Event SubType (input)            */
-   ulFlags:LongInt;                    // 0 (Input), status (Output)       */
-   hstream:LongInt;                    // handle to stream for this event  */
-   hid:LongInt;                        // handler Id (input/output)        */
-   ulStatus:LongInt;                   // Event status (output)            */
-   ulEventParm1:LongInt;               // Event parameters (input), HID if implicit event */
-   ulEventParm2:LongInt;               // Event parameters (input)         */
-   ulEventParm3:LongInt;               // Event parameters (input)         */
-   end;
-TYPE PEVCB = ^_EVCB;             // Ptr to a  EVCB       */
-
-//*********************************************
-// * STATUS_LEVEL_EVCB - Status Level Event Control Block
-// **********************************************/
-TYPE _STATUS_LEVEL_EVCB = RECORD   // stevcb */
-   // standard part */
-   ulType:LongInt;                     // Event type (input)               */
-   ulSubType:LongInt;                  // Event SubType (input)            */
-   pMCDInstance:LongInt;               // for MCD use */
-   hstream:LongInt;                    // handle to stream for this event  */
-   hid:LongInt;                        // handler Id (input/output)        */
-   // custom part */
-   ulSample:ARRAY [0..4] OF LongInt;                // Samples */
-   end;
-TYPE PSTATUS_EVCB = ^_STATUS_LEVEL_EVCB;     // Ptr to a  EVCB       */
-
-//***************************************************************************/
-//                                                                          */
-// Module Name: DCB.H                                                       */
-//                                                                          */
-// OS/2 2.0 Multimedia Extensions Sync/Stream Manager Device Control        */
-// Block defintitions.                                                      */
-//                                                                          */
-// Copyright (c) International Business Machines Corporation 1991, 1992     */
-//                        All Rights Reserved                               */
-//***************************************************************************/
-// Converted by Andry Svirgunov. Email: [email protected]                        */
-// 14.11.2002                                                               */
-//                                                                          */
-//***************************************************************************/
-
-CONST MAX_SPI_NAME = 9;
-
-//**************************************************************************
-// *
-// * DCB - Common Device Control Block
-// *               (*** PACKED STRUCTURE ***)
-// ***************************************************************************/
-TYPE _DCB = RECORD              // dcb  -  Device Control Block                      */
-        ulDCBLen : LongInt;     // length of structure                 */
-        szDevName: Array [0..MAX_SPI_NAME] of char;// device driver name                  */
-        end;
-TYPE PDCB = ^_DCB;
-
-
-//**************************************************************************
-// *
-// * E_DCB - Extended Device Control Block
-// *
-// *         This structure will grow over time as new fields are added
-// *         to the end of the structure.  If you manipulate the structure,
-// *         be sure to check the length field.
-// *
-// *               (*** PACKED STRUCTURE ***)
-// ***************************************************************************/
-
-TYPE E_DCB = RECORD             // e_dcb  -  Extended Device Control Block          */
-        ulDCBLen : LongInt;     // length of structure                 */
-        szDevName: Array [0..MAX_SPI_NAME] of char;// device driver name                  */
-        ulSysFileNum: LongInt;  // file handle number                  */
-        end;
-TYPE PE_DCB = ^E_DCB;
-TYPE PDCB_AUDIOSH = ^E_DCB;
-
-
-//**************************************************************************
-// *
-// * VSD_DCB - VSD Device Control Block
-// *
-// *         This structure will allow stream handlers to use the VSD DLL
-// *         by using by the additional fields in the structure.
-// *
-// *               (*** PACKED STRUCTURE ***)
-// ***************************************************************************/
-TYPE _VSD_DCB = RECORD          // vsd_dcb - VSD Device Control Block            */
-        ulDCBLen : Longint;     // length of structure                 */
-        szDevName: Array [0..MAX_SPI_NAME] of char;// device driver name                  */
-        ulSysFileNum: LongInt;  // file handle number                  */
-        hvsd : LongInt;         // Handle to VSD instance              */
-        pfnEntryPoint : ^PFN;   // Address of VSD entry point          */
-        ulReserved1 : LongInt;  // Reserved for system                 */
-        ulReserved2 : LongInt;  // Reserved for system                 */
-        end;
-TYPE PVSD_DCB = ^_VSD_DCB;
-
-//****************************************************************************/
-//*                                                                          */
-//* Module Name: ACB.H                                                       */
-//*                                                                          */
-//* OS/2 2.0 Multimedia Extensions Sync/Stream Manager Associate             */
-//* Control Block Definitions.                                               */
-//*                                                                          */
-//* Copyright (c) International Business Machines Corporation 1991, 1992     */
-//*                        All Rights Reserved                               */
-//*--------------------------------------------------------------------------*/
-//* Converted by Andry Svirgunov. Email: [email protected]                        */
-//* 14.11.2002                                                               */
-//*                                                                          */
-//****************************************************************************/
-CONST
-
-        MAX_PORT_NAME=40;           // Max port name length         */
-        MAX_PORTS    =16;           // Max number ports             */
-
-
-//**********************************************
-// *
-// * ACB - Associate Control Block
-// *
-// *       Each stream handler must define the
-// *       ACB for each data object type that
-// *       expect ACB's from the application.
-// *
-// **********************************************/
-TYPE _ACB = RECORD              //* acb  -  Assoc. Control Block  */
-        ulACBLen : LongInt;     //* length of structure */
-        ulObjType : LongInt;
-        ulParm1 : LongInt;
-        ulParm2 : LongInt;
-        end;
-TYPE PACB = ^_ACB;              //* Ptr to an ACB        */
-
-
-//******************************************************
-// * FSSH - File system stream handler MMIO Object ACB
-// ******************************************************/
-CONST
-
-        ACBTYPE_MMIO=$0001;  //* MMIO object                      */
-
-TYPE _ACB_MMIO = RECORD         //* acbmmio  - MMIO Assoc. Control Block       */
-        ulACBLen : LongInt;     //* length of structure                   */
-        ulObjType : LongInt;    //* ACBTYPE_MMIO                          */
-        hmmio : HMMIO ;         //* Handle of media element mgr obj       */
-        end;
-TYPE PACB_MMIO = ^_ACB_MMIO;    //* Ptr to an ACB  */
-
-
-//******************************************************
-// * MSH - Memory stream handler Playlist Object ACB
-// ******************************************************/
-CONST
-        ACBTYPE_MEM_PLAYL=$0003;  //* Memory playlist object           */
-
-TYPE _ACB_MEM_PLAYL = RECORD    //* acbplyl - File system Assoc. Control Block */
-        ulACBLen : LongInt;     //* length of structure                   */
-        ulObjType : LongInt;    //* ACBTYPE_MEM_PLAYL                     */
-        pMemoryAddr : Pointer;  //* Starting address of memory obj        */
-        end;
-TYPE PACB_MEM_PLAYL = ^_ACB_MEM_PLAYL;  //* Ptr to an ACB  */
-
-
-//******************************************************
-// * CDDASH - CD DA stream handler Object ACB
-// ******************************************************/
-CONST
-        ACBTYPE_CDDA=$0004;  //*  Compact disk - digital audio obj*/
-
-
-TYPE _ACB_CDDA = RECORD         //* acbcdda - CD Assoc. Control Block          */
-        ulACBLen : LongInt;     //* length of structure                   */
-        ulObjType : LongInt;    //* ACBTYPE_CDDA                          */
-        bCDDrive : Char;        //* CD drive letter                       */
-        end;
-TYPE PACB_CDDA = ^_ACB_CDDA;    //* Ptr to an ACB  */
-
-//******************************************************
-// * MISH - MIDI stream handler port-stream table ACB
-// ******************************************************/
-CONST
-        ACBTYPE_MISH=$0005;      //* MIDI port-stream table       */
-
-TYPE _ACB_MISH = RECORD         //* acbmish - MIDI Assoc. Control Block          */
-        ulACBLen : LongInt;     //* length of structure          */
-        ulObjType: LongInt;     //* ACBTYPE_MISH                 */
-        hStreamDefault : Longint;//* Default hstream to use when mapper */
-                                 //* is turned off.               */
-        ulDeviceTypeID : LongInt;//* device type id               */
-        ulpMapperPorts : LongInt;//* pointer to mapper port table */
-        ulNumInStreams : LongInt;
-        hStreamIn : Array [0..MAX_PORTS] of Longint;//* Array of Input streams       */
-        ulNumOutStreams : LongInt;
-        hStreamsOut : Array [0..MAX_PORTS] of Longint;//* Array of Output streams      */
-                                                      //* The index into the array is  */
-                                                      //* the source channel for that  */
-                                                      //* stream.                      */
-
-        end;
-TYPE PACB_MISH = ^_ACB_MISH;    //* Ptr to MIDI associate control block */
-
-//******************************************************
-// * MISH - MIDI stream handler SET ACB
-// ******************************************************/
-CONST
-        ACBTYPE_SET=$0006;      //* MIDI set function            */
-
-TYPE _ACB_SET = RECORD          //* acbset - Set Assoc. Control Block             */
-        ulACBLen :LongInt;      //* length of structure          */
-        ulObjType : LongInt;    //* ACBTYPE_SET                  */
-        ulFlags : LongInt;      //* Set flags                    */
-        ulReserved : Longint;   //* Reserved                     */
-        end;
-TYPE PACB_SET = ^_ACB_SET;      //* Ptr to set associate control block */
-
-//* ulFlags defines:                                                        */
-CONST
-
-        MIDI_MAP_ON =$0000;      //* turn mapping function on in MISH   */
-        MIDI_MAP_OFF=$0001;      //* turn mapping function off in MISH  */
-
-
-//******************************************************
-// * NULLSH - Null stream handler user ACB
-// ******************************************************/
-        ACBTYPE_NULLSH=$0007;  //* User od Null stream handler      */
-
-TYPE _ACB_NULISH = RECORD       //* acbnullsh - NULLSH Assoc. Control Block    */
-        ulACBLen : LongInt;     //* length of structure                   */
-        ulObjType : LongInt;    //* ACBTYPE_NULLSH                        */
-        pfnEntry : PFN ;        //* user callback entry point             */
-        ulReserved : LongInt;   //* Reserved                              */
-        end;
-TYPE PACB_NULISH = ^_ACB_NULISH;//* Ptr to an ACB  */
-
-//******************************************************
-// * MTSH - MultiTrack Stream Handler Object ACB
-// ******************************************************/
-CONST
-
-        ACBTYPE_MTSH=$0008;  //* MTSH object                      */
-
-TYPE _ACB_MTSH = RECORD                 //* acbmtsh  - MTSH Assoc. Control Block       */
-        ulACBLen : LongInt;             //* length of structure                   */
-        ulObjType : Longint;            //* ACBTYPE_MTSH                          */
-        hmmio : HMMIO;                  //* Handle of media element mgr obj       */
-        mmtrackinfo : _MMTRACKINFO;     //* track for this stream                 */
-        ulFlags : LongInt;              //* flags                                 */
-        ulMaxBytesPerSec : LongInt;     //* Max bytes per second                  */
-        ulAvgBytesPerSec : Longint;     //* Avg bytes per second                  */
-        mmtimePerFrame : MMTIME;        //* frame display time or 0L              */
-        ulTotalFrames : LongInt;        //* total number of video frames          */
-        end;
-TYPE PACB_MTSH = ^_ACB_MTSH;            //* Ptr to an ACB  */
-
-//* ulFlags defines:                                                        */
-CONST
-        TRACK_ACTIVATE   =$0000;    //* Activate track in stream handler  */
-        TRACK_DEACTIVATE =$0001;    //* Deactivate track in stream handler  */
-
-
-//******************************************************
-// * CSH - CODEC stream handler Object ACB
-// ******************************************************/
-        ACBTYPE_CODECSH=$0009;      //* CODEC object                 */
-TYPE _ACB_CODECSH = RECORD      //* acbcodecsh - CODEC SH acb                 */
-        ulACBLen : Longint;     //* length of structure          */
-        ulObjType : Longint;    //* ACBTYPE_CODECSH              */
-        hstreamToPair : LongInt;//* 2nd stream of pair           */
-        pMmioInfo : Longint;    //* info for IO Proc             */
-        ulInfoLength : Longint; //* length of MmioInfo           */
-        pCodecControl : Longint;//* CODEC control info           */
-        ulControlLength : Longint;//* length of CodecControl       */
-        end;
-TYPE PACB_CODECSH = ^_ACB_CODECSH;//* Ptr to associate control block */
-
-
-Implementation
-
-Function mmioFOURCC(ch0,ch1,ch2,ch3:Char): Cardinal;
-begin
-  mmioFOURCC:=Cardinal(ord(ch0)) or (Cardinal(ord(ch1)) shl 8) or
-              (Cardinal(ord(ch2)) shl 16) or (Cardinal(ord(ch3)) shl 24);
-end;
-
-Begin
-  FOURCC_R565:=mmioFOURCC( 'R', '5', '6', '5' );
-  FOURCC_R555:=mmioFOURCC( 'R', '5', '5', '5' );
-  FOURCC_R664:=mmioFOURCC( 'R', '6', '6', '4' );
-  FOURCC_RGB3:=mmioFOURCC( 'R', 'G', 'B', '3' );
-  FOURCC_BGR3:=mmioFOURCC( 'B', 'G', 'R', '3' );
-  FOURCC_RGB4:=mmioFOURCC( 'R', 'G', 'B', '4' );
-  FOURCC_BGR4:=mmioFOURCC( 'B', 'G', 'R', '4' );
-  FOURCC_LUT8:=mmioFOURCC( 'L', 'U', 'T', '8' );
-  FOURCC_LT12:=mmioFOURCC( 'L', 'T', '1', '2' );
-  FOURCC_GREY:=mmioFOURCC( 'G', 'R', 'E', 'Y' );
-  FOURCC_GY16:=mmioFOURCC( 'G', 'Y', '1', '6' );
-  FOURCC_Y888:=mmioFOURCC( 'Y', '8', '8', '8' );
-  FOURCC_Y2X2:=mmioFOURCC( 'Y', '2', 'X', '2' );
-  FOURCC_Y4X4:=mmioFOURCC( 'Y', '4', 'X', '4' );
-  FOURCC_YUV9:=mmioFOURCC( 'Y', 'U', 'V', '9' );
-  FOURCC_Y644:=mmioFOURCC( 'Y', '6', '4', '4' );
-  FOURCC_MONO:=mmioFOURCC( 'M', 'O', 'N', 'O' );
-  FOURCC_Y422:=mmioFOURCC( 'Y', '4', '2', '2' );
-  FOURCC_Y42B:=mmioFOURCC( 'Y', '4', '2', 'B' );
-  FOURCC_Y42D:=mmioFOURCC( 'Y', '4', '2', 'D' );
-  FOURCC_Y411:=mmioFOURCC( 'Y', '4', '1', '1' );
-  FOURCC_VGA :=mmioFOURCC( 'V', 'G', 'A', ' ' );
-
-  FOURCC_ULTI:=mmioFOURCC('U', 'L', 'T', 'I');
-  FOURCC_RT21:=mmioFOURCC('R', 'T', '2', '1');
-  FOURCC_DIB :=mmioFOURCC('D', 'I', 'B', ' ');
-
-  FOURCC_RIFF:=mmioFOURCC( 'R', 'I', 'F', 'F' );
-  FOURCC_LIST:=mmioFOURCC( 'L', 'I', 'S', 'T' );
-  FOURCC_MEM :=mmioFOURCC( 'M', 'E', 'M', ' ' );
-  FOURCC_DOS :=mmioFOURCC( 'D', 'O', 'S', ' ' );
-  FOURCC_BND :=mmioFOURCC( 'B', 'N', 'D', ' ' );
-  FOURCC_FREE:=mmioFOURCC( 'F', 'R', 'E', 'E' );
-  FOURCC_DEL :=mmioFOURCC( 'D', 'E', 'L', ' ' );
-  FOURCC_CTOC:=mmioFOURCC( 'C', 'T', 'O', 'C' );
-  FOURCC_CGRP:=mmioFOURCC( 'C', 'G', 'R', 'P' );
-  FOURCC_CF  :=mmioFOURCC( 'C', 'F', ' ', ' ' );
-End.

+ 0 - 1649
packages/extra/os2units/mmtk/mmio.pas

@@ -1,1649 +0,0 @@
-{
-    $Id$
-    Copyright (c) 1990-1993 International Business Machines Corporation
-    Copyright (c) 2002 by Andry Svirgunov ([email protected])
-    Copyright (c) 2002-2003 by Yuri Prokushev ([email protected])
-
-    OS/2 2.0 Multimedia Extensions Input/Output Manager
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Library General Public License (LGPL) as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version. This program is
-    distributed in the hope that it will be useful, but WITHOUT ANY
-    WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.
-
-    See the GNU Library General Public License for more details. You should
-    have received a copy of the GNU Library General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- **********************************************************************}
-
-{
-@abstract(OS/2 2.0 Multimedia Extensions Input/Output Manager)
-@author(Andry Svirgunov ([email protected]))
-@author(Yuri Prokushev ([email protected]))
-@created(17 Dec 2002)
-@lastmod(19 Jan 2003)
-OS/2 2.0 Multimedia Extensions Input/Output Manager
-Warning: This code is alfa. Future versions of this unit will propably
-not be compatible.
-}
-Unit MMIO;
-
-Interface
-
-Uses
-  MMBase;
-
-Const
-  LibName='MMPM'; // !!TODO!! Subject to replace by MMIO
-
-// MS compat defines.
-Type
-  HPSTR = PChar;
-  Hwnd = LongInt;
-  PFourCC = ^FourCC;
-  HMMCF = hmmIO;
-  HMODULE = LongInt;
-  PHModule = ^Hmodule;
-  pLong = ^LongInt;
-
-// Define MMIO public data structures.
-  mmCkInfo = record
-    ckid              : FourCC;                // Chunk id (FourCC)
-    ckSize            : LongInt;                 // Chunk Size (bytes)
-    fccType           : FourCC;                // FourCC Type (if ckid RIFF or LIST)
-    ulDataOffset      : LongInt;                 // File Offset of data portion of chunk
-    ulFlags           : LongInt;                 // MMIO_DIRTY (if new chunk)
-  end;
-  pmmCkInfo = ^mmCkInfo;
-  lpmmckinfo = pmmckinfo; // MS compat define */
-
-  mmIOProc = function( pmmIOInfo: Pointer; usMsg: Word; lp1, lp2: LongInt): LongInt;
-  pmmIOProc = mmIOProc;
-  pCodecProc = mmIOProc;
-  ppmmioproc = mmIOProc;
-  LPMMIOProc = pmmIOProc;
-
-  mmIOInfo = record
-    ulFlags           : LongInt;                 // Open flags
-    fccIOProc         : FourCC;                // FourCC of the IOProc to use
-    pIOProc           : mmIOProc;              // Function Pointer to IOProc to use
-    ulErrorRet        : LongInt;                 // Extended Error return code
-    cchBuffer         : LongInt;                  // I/O buff size (if used), Fsize if MEM
-    pchBuffer         : pChar;                 // Start of I/O buff
-    pchNext           : pChar;                 // Next char to read or write in buff
-    pchEndRead        : pChar;                 // Last char in buff can be read + 1
-    pchEndWrite       : pChar;                 // Last char in buff can be written + 1
-    lBufOffset        : LongInt;                  // Offset in buff to pchNext
-    lDiskOffset       : LongInt;                  // Disk offset in file
-    aulInfo           : Array[0..3] of LongInt;  // IOProc specific fields
-    lLogicalFilePos   : LongInt;                  // Actual file position, buffered or not
-    ulTranslate       : LongInt;                 // Translation field
-    fccChildIOProc    : FourCC;                // FourCC of Child IOProc
-    pExtraInfoStruct  : Pointer;               // Pointer to a structure of related data
-    mmio              : hmmIO;                 // Handle to media element
-  end;
-  pmmIOInfo = ^mmIOInfo;
-  lpmmIOInfo = pmmIOInfo;
-
-
-  mmCfInfo = record
-    ulHeaderSize      : LongInt;                 // CTOC header size
-    ulEntriesTotal    : LongInt;                 // Num of CTOC table entries
-    ulEntriesDeleted  : LongInt;                 // Num of CTOC table entries deleted
-    ulEntriesUnused   : LongInt;                 // Num of unused CTOC entries
-    ulBytesTotal      : LongInt;                 // Combined byte size of all CGRP elements
-    ulBytesDeleted    : LongInt;                 // Byte size of all deleted CGRP elements
-    ulHeaderFlags     : LongInt;                 // Info about entire compound file (CF)
-    usEntrySize       : Word;                // Size of each CTOC table entry
-    usNameSize        : Word;                // Size of name field in entry, default 13
-    usExHdrFields     : Word;                // Num CTOC header extra fields
-    usExEntFields     : Word;                // Num CTOC entry extra fields
-  end;
-
-// Note:  The are variable length DWORD arrays that may be present
-//        at the end of the MMCFINFO structure.
-
-//   DWORD    (*adwExHdrFldUsage)[];  */   // Array of header extra usage fields */
-//   DWORD    (*adwExtEntFldUsage)[]; */   // Array of entry extra usage fields  */
-//   DWORD    (*adwExHdrField)[];     */   // Array of header extra fields       */
-  pmmCfInfo = ^mmCfInfo;
-  lpmmCfInfo = pmmcfInfo;
-
-  mmCtocEntry = record
-    ulOffset          : LongInt;                 // Offset of element within CGRP
-    ulSize            : LongInt;                 // Size of element
-    ulMedType         : LongInt;                 // Fourcc of element
-    ulMedUsage        : LongInt;                 // Possible sub type
-    ulCompressTech    : LongInt;                 // Compression technique used
-    ulUncompressBytes : LongInt;                 // Actual size of uncompressed element
-  end;
-
-
-// Note:  A variable length name field and possibly a DWORD array may
-//        be present at the end of the MMCTOCENTRY structure.
-
-//   DWORD    (*adwExEntField)[]; */   // Array of entry extra fields */
-//   PSZ      pszElementName[];   */   // Name of element, variable length */
-
-  pmmCtocEntry = ^mmCtocEntry;
-  lpmmCtocEntry = pmmCtocEntry;
-
-// Conversion Flags/Data Structures:
-
-const
-  // Conversion Flags/Data Structures:
-  MMIO_MEDIATYPE_IMAGE          = $00000001;  // Image media
-  MMIO_MEDIATYPE_AUDIO          = $00000002;  // Audio media
-  MMIO_MEDIATYPE_MIDI           = $00000004;  // MIDI media
-  MMIO_MEDIATYPE_COMPOUND       = $00000008;  // Cmpd media
-  MMIO_MEDIATYPE_OTHER          = $00000010;  // Other media
-  MMIO_MEDIATYPE_UNKNOWN        = $00000020;  // Unknown media
-  MMIO_MEDIATYPE_DIGITALVIDEO   = $00000040;  // Digital Video
-  MMIO_MEDIATYPE_ANIMATION      = $00000080;  // Future: Not Supported
-  MMIO_MEDIATYPE_MOVIE          = $00000100;  // Movie File
-
-  MMIO_CANREADTRANSLATED        = $00000001;  //IOProc Cpbilty Flgs
-  MMIO_CANWRITETRANSLATED       = $00000002;  // "       "       "
-  MMIO_CANREADWRITETRANSLATED   = $00000004;  // "       "       "
-  MMIO_CANREADUNTRANSLATED      = $00000008;  // "       "       "
-  MMIO_CANWRITEUNTRANSLATED     = $00000010;  // "       "       "
-  MMIO_CANREADWRITEUNTRANSLATED = $00000020;  // "       "       "
-  MMIO_CANSEEKTRANSLATED        = $00000040;  // "       "       "
-  MMIO_CANSEEKUNTRANSLATED      = $00000080;  // "       "       "
-  MMIO_CANINSERTUNTRANSLATED    = $00000100;  // "       "       "
-  MMIO_CANSAVEUNTRANSLATED      = $00000200;  // "       "       "
-  MMIO_CANINSERTTRANSLATED      = $00000400;  // "       "       "
-  MMIO_CANSAVETRANSLATED        = $00000800;  // "       "       "
-  MMIO_CANMULTITRACKREADTRANSLATED = $00001000; // "       "       "
-  MMIO_CANMULTITRACKREADUNTRANSLATED = $00002000; // "       "       "
-  MMIO_CANMULTITRACKWRITETRANSLATED = $00004000; // "       "       "
-  MMIO_CANMULTITRACKWRITEUNTRANSLATED = $00008000; // "       "       "
-  MMIO_CANTRACKSEEKTRANSLATED   = $00010000;  // "       "       "
-  MMIO_CANTRACKSEEKUNTRANSLATED = $00020000;  // "       "       "
-  MMIO_CANTRACKREADTRANSLATED   = $00040000;  // "       "       "
-  MMIO_CANTRACKREADUNTRANSLATED = $00080000;  // "       "       "
-  MMIO_CANTRACKWRITETRANSLATED  = $00100000;  // "       "       "
-  MMIO_CANTRACKWRITEUNTRANSLATED = $00200000; // "       "       "
-
-  MMIO_IOPROC_STORAGESYSTEM     = $00000001;  // IOProc Types
-  MMIO_IOPROC_FILEFORMAT        = $00000002;
-  MMIO_IOPROC_DATAFORMAT        = $00000004;
-
-Type
-  mmFormatInfo = record
-    ulStructLen       : LongInt;                 // Length of this structure
-    fccIOProc         : FourCC;                // IOProc identifier
-    ulIOProcType      : LongInt;                 // Type of IOProc
-    ulMediaType       : LongInt;                 // Media Type
-    ulFlags           : LongInt;                 // IOProc capability flags
-    szDefaultFormatExt : Array[0..Sizeof(FourCC)] of Char;
-                                               // Default extension 4 + null
-    ulCodePage        : LongInt;                 // Code Page
-    ulLanguage        : LongInt;                 // Language
-    lNameLength       : LongInt;                  // length of identifier string
-  end;
-  pmmFormatInfo = ^mmFormatInfo;
-
-Const
-  MMIO_IMAGE_UNKNOWN            = $00000000;   // Unknown image content
-  MMIO_IMAGE_DRAWING            = $00000001;   // Simple drawing
-  MMIO_IMAGE_GRAPH              = $00000002;   // Graphs & Cartoons
-  MMIO_IMAGE_PHOTO              = $00000004;   // Varying Color & Shades
-
-  MAX_PALETTE                   = 256;
-
-//*********************************************
-// *
-// * GENPAL - Generic Header Palette
-// *
-// **********************************************/
-
-Type
-  RGB2 = record
-    bBlue:     Byte;            { Blue component of the color definition }
-    bGreen:    Byte;            { Green component of the color definition}
-    bRed:      Byte;            { Red component of the color definition  }
-    fcOptions: Byte;            { Reserved, must be zero                 }
-   end;
-  PRGB2 = ^RGB2;
-
-Type
-  GENPAL = RECORD          // genpal */
-    ulStartIndex:LongInt;       // starting RGB index */
-    ulNumColors:LongInt;        // number of following entries */
-    prgb2Entries:PRGB2;         // 256 RGB entries */
-  end;
-  PGENPAL = ^GENPAL;          // Ptr to a generic palette */
-
-Type
-  BitMapInfoHeader2 = record
-    cbFix:           LongInt;     { Length of structure                    }
-    cx:              LongInt;     { Bit-map width in pels                  }
-    cy:              LongInt;     { Bit-map height in pels                 }
-    cPlanes:         Word; { Number of bit planes                   }
-    cBitCount:       Word; { Number of bits per pel within a plane  }
-    ulCompression:   Longint;     { Compression scheme used to store the bitmap }
-    cbImage:         Longint;     { Length of bit-map storage data in bytes}
-    cxResolution:    Longint;     { x resolution of target device          }
-    cyResolution:    Longint;     { y resolution of target device          }
-    cclrUsed:        Longint;     { Number of color indices used           }
-    cclrImportant:   Longint;     { Number of important color indices      }
-    usUnits:         Word; { Units of measure                       }
-    usReserved:      Word; { Reserved                               }
-    usRecording:     Word; { Recording algorithm                    }
-    usRendering:     Word; { Halftoning algorithm                   }
-    cSize1:          Longint;     { Size value 1                           }
-    cSize2:          Longint;     { Size value 2                           }
-    ulColorEncoding: Longint;     { Color encoding                         }
-    ulIdentifier:    Longint;     { Reserved for application use           }
-  end;
-  pbitmapinfoheader2=^bitmapinfoheader2;
-
-  xdibHdr_Prefix = record
-    ulMemSize         : LongInt;                 // Length of bitmap
-    ulPelFormat       : LongInt;
-    usTransType       : Word;
-    ulTransVal        : LongInt;
-  end;
-
-  mmxdibHeader = record                        // XDIB Header
-    XDIBHeaderPrefix  : XDIBHDR_PREFIX;
-    BMPInfoHeader2    : BITMAPINFOHEADER2;
-  end;
-  pmmxdibHeader = ^mmxdibHeader;
-
-  mmImageHeader = record
-    ulHeaderLength    : LongInt;                 // Length in Bytes
-    ulContentType     : LongInt;                 // Image content
-    ulMediaType       : LongInt;                 // Media Type
-    mmXDIBHeader      : mmXDIBHeader;          // OS/2 2.0 PM compat header
-    bmiColors         : Array[0..MAX_PALETTE-1] of RGB2; // PM compatible palette
-  end;
-  pmmImageHeader = ^mmImageHeader;
-
-
-Const
-  MMIO_AUDIO_UNKNOWN            = $00000000;   // Unknown image content
-  MMIO_AUDIO_VOICE              = $00000001;   // Limited Range
-  MMIO_AUDIO_MUSIC              = $00000002;   // FM Radio or equivalent
-  MMIO_AUDIO_HIFI               = $00000004;   // High quality recording
-
-Type
-  Wave_Header = record
-    usFormatTag       : Word;                // Type of wave format
-    usChannels        : Word;                // Number of channels
-    ulSamplesPerSec   : LongInt;                 // Sampling rate
-    ulAvgBytesPerSec  : LongInt;                 // Avg bytes per sec
-    usBlockAlign      : Word;                // Block Alignment in bytes
-    usBitsPerSample   : Word;                // Bits per sample
-  end;
-
-  xWav_HeaderInfo = record
-    ulAudioLengthInMS      : LongInt;            // Audio data in millisecs
-    ulAudioLengthInBytes   : LongInt;            // Audio data in bytes
-    pAdditionalInformation : Pointer;
-  end;
-
-  mmxWav_Header = record
-    WAVEHeader        : WAVE_HEADER;           // Per RIFF WAVE Definition
-    XWAVHeaderInfo    : XWAV_HEADERINFO;       // Extended wave definition
-  end;
-
-  mmAudioHeader = record
-    ulHeaderLength    : LongInt;                 // Length in Bytes
-    ulContentType     : LongInt;                 // Image content
-    ulMediaType       : LongInt;                 // Media Type
-    mmXWAVHeader      : MMXWAV_HEADER;         // header
-  end;
-  pmmAudioHeader = ^mmAudioHeader;
-
-Const
-  MMIO_MIDI_UNKNOWN             = $00000000;  // Unknown midi content
-  MMIO_MIDI_VOICE               = $00000001;  // Limited Range
-  MMIO_MIDI_MUSIC               = $00000002;  // FM Radio or equivalent
-  MMIO_MIDI_HIFI                = $00000004;  // High quality recording
-
-// MMPMMMIO.INI file structure and definitions.
-  CCHMAXPATH                    = 260;
-  DLLNAME_SIZE                  = CCHMAXPATH;
-  PROCNAME_SIZE                 = 32;
-  MAX_EXTENSION_NAME            = 4;
-
-Type
-  mmIniFileInfo = record
-    fccIOProc         : FourCC;                // IOProc identifier
-    szDLLName         : Array[0..DLLName_Size-1] of Char;  // DLL name string
-    szProcName        : Array[0..ProcName_Size-1] of Char; // Procedure name string
-    ulFlags           : LongInt;                 // Flags for Preload
-    ulExtendLen       : LongInt;                 // Length of ext fields
-    ulMediaType       : LongInt;                 // Media type
-    ulIOProcType      : LongInt;                 // Type of IOProc
-    szDefExt          : Array[0..Max_Extension_Name] of Char;
-  end;
-  pmmIniFileInfo = ^mmIniFileInfo;
-
-// CODEC Structures and type definitions for Rel. 1.1
-Const
-  CODEC_INFO_SIZE               = 8;
-  CODEC_HW_NAME_SIZE            = 32;
-
-Type
-  CodecIniFileInfo = record
-    ulStructLen       : LongInt;                 // length of this structure
-    fcc               : FourCC;                // File Format ID
-    szDLLName         : Array[0..DLLName_Size-1] of Char;       // DLL name string
-    szProcName        : Array[0..ProcName_Size-1] of Char;      // Procedure name string
-    ulCompressType    : LongInt;                 // Compression Type
-    ulCompressSubType : LongInt;                 // Compression SubType
-    ulMediaType       : LongInt;                 // Media type
-    ulCapsFlags       : LongInt;                 // capabilities flags
-    ulFlags           : LongInt;                 // flags
-    szHWID            : Array[0..Codec_HW_Name_Size-1] of Char; // specific information
-    ulMaxSrcBufLen    : LongInt;                 // max source buffer length
-    ulSyncMethod      : LongInt;                 // Synchronization method
-    fccPreferredFormat: LongInt;                 // Preferred output format
-    ulXalignment      : LongInt;                 // x alignment - video only
-    ulYalignment      : LongInt;                 // y alignment - video only
-    ulSpecInfo        : Array[0..Codec_Info_Size-1] of LongInt;   // specific information
-  end;
-  pCodecIniFileInfo = ^CodecIniFileInfo;
-
-Const
-  // CODECINIFILEINFO synchronization method (ulSyncMethod) values.
-  CODEC_SYNC_METHOD_NO_DROP_FRAMES = 0;
-  CODEC_SYNC_METHOD_DROP_FRAMES_IMMEDIATELY = 1;
-  CODEC_SYNC_METHOD_DROP_FRAMES_PRECEDING_KEY = 2;
-  CODEC_SYNC_METHOD_HARDWARE    = 3;
-
-  // CODECINIFILEINFO capabilities (ulCapsFlags) values.
-  CODEC_COMPRESS                = $00000001;
-  CODEC_DECOMPRESS              = $00000002;
-  CODEC_WINDOW_CLIPPING         = $00000004;
-  CODEC_PALETTE_TRANS           = $00000008;
-  CODEC_SELFHEAL                = $00000010;
-  CODEC_SCALE_PEL_DOUBLE        = $00000020;
-  CODEC_SCALE_PEL_HALVED        = $00000040;
-  CODEC_SCALE_CONTINUOUS        = $00000080;
-  CODEC_MULAPERTURE             = $00000100;
-  CODEC_4_BIT_COLOR             = $00000200;
-  CODEC_8_BIT_COLOR             = $00000400;
-  CODEC_16_BIT_COLOR            = $00000800;
-  CODEC_24_BIT_COLOR            = $00001000;
-  CODEC_HARDWARE                = $00002000;
-  CODEC_SYMMETRIC               = $00004000;
-  CODEC_ASYMMETRIC              = $00008000;
-  CODEC_DIRECT_DISPLAY          = $00010000;
-  CODEC_DEFAULT                 = $00020000;
-  CODEC_ORIGIN_LOWERLEFT        = $00040000;
-  CODEC_ORIGIN_UPPERLEFT        = $00080000;
-  CODEC_SET_QUALITY             = $00100000;  // quality level is settable
-  CODEC_DATA_CONSTRAINT         = $00200000;  // data constraint supported
-  CODEC_HW_OVERLAY              = $00400000;
-  CODEC_MULTI_BUFFER            = $00800000;
-  CODEC_DITHER_OUTPUT           = $01000000;
-
-  // Audio related flags
-  CODEC_COMP_REALTIME           = $00020000;
-  CODEC_DECOMP_REALTIME         = $00040000;
-
-// CODECINIFILEINFO Flag Values (ulFlags) values.
-
-  // Bit definitions for mmioSet()
-  MMIO_SET_EXTENDEDINFO         = $0001;
-  MMIO_QUERY_EXTENDEDINFO_BASE  = $0002;
-  MMIO_QUERY_EXTENDEDINFO_ALL   = $0004;
-
-Type
-  // CODECASSOC structure
-  CodecAssoc = record
-   pCodecOpen         : Pointer;               // codec specific open header
-   pCODECIniInfo      : PCodecIniFileInfo;     // codecinifileinfo
-  end;
-  pCodecAssoc = ^CodecAssoc;
-
-  // MMEXTENDINFO structure
-  mmExtendInfo = record
-    ulStructLen       : LongInt;             // length of this structure
-    ulBufSize         : LongInt;             // total buffer size
-    ulFlags           : LongInt;             // flags
-    ulTrackID         : LongInt;             // track ID
-    ulNumCODECs       : LongInt;             // number of codec entries
-    pCODECAssoc       : PCodecAssoc;       // pointer to codec info array
-  end;
-  pmmExtendInfo = ^mmExtendInfo;
-
-const
-  // MMEXTENDINFO operation (ulFlags) values.
-  MMIO_TRACK                    = $00000001;
-  MMIO_NORMAL_READ              = $00000002;
-  MMIO_SCAN_READ                = $00000004;
-  MMIO_REVERSE_READ             = $00000008;
-  MMIO_CODEC_ASSOC              = $00000100;
-
-  // Audio Related defines
-  MMIO_REALTIME_CODEC           = $00000200;
-
-  MMIO_RESETTRACKS              = -1;       //  Turns off the active track number.
-
-  CODEC_START                   = $0EC0;
-  CODEC_END                     = $0EFF;
-
-  MMIOM_CODEC_CLOSE             = CODEC_START + 1;
-  MMIOM_CODEC_OPEN              = CODEC_START + 2;
-  MMIOM_CODEC_QUERYNAME         = CODEC_START + 3;
-  MMIOM_CODEC_QUERYNAMELENGTH   = CODEC_START + 4;
-  MMIOM_CODEC_COMPRESS          = CODEC_START + 5;
-  MMIOM_CODEC_DECOMPRESS        = CODEC_START + 6;
-
-  MMIOMP_CODEC_HW_CONTROL_STOP_DISCARD   =0;
-  MMIOMP_CODEC_HW_CONTROL_STOP_FLUSH     =1;
-  MMIOMP_CODEC_HW_CONTROL_STOP_PAUSE     =2;
-  MMIOMP_CODEC_HW_CONTROL_DATATYPE       =3;
-
-  // Flags:
-  MMIO_CREATE                   = $00000001;       // Open
-  MMIO_CTOCFIRST                = $00000002;       // Open
-  MMIO_READ                     = $00000004;       // Open
-  MMIO_WRITE                    = $00000008;       // Open
-  MMIO_READWRITE                = $00000010;       // Open
-  MMIO_COMPAT                   = $00000020;       // Open
-  MMIO_EXCLUSIVE                = $00000040;       // Open
-  MMIO_DENYWRITE                = $00000080;       // Open
-  MMIO_DENYREAD                 = $00000100;       // Open
-  MMIO_DENYNONE                 = $00000200;       // Open
-  MMIO_ALLOCBUF                 = $00000400;       // Open
-  MMIO_DELETE                   = $00000800;       // Open
-
-  MMIO_USE_TEMP                 = $00001000;       // Open/Close/Save
-
-  MMIO_INSERTON                 = $00000001;       // Insert
-  MMIO_INSERTOFF                = $00000002;       // Insert
-
-  MMIO_RWMODE                   = $00001000;       // Open
-  MMIO_SHAREMODE                = $00002000;       // Open
-
-  MMIO_DIRTY                    = $00004000;       // Write
-
-  MMIO_VERTBAR                  = $00008000;       // Open
-  MMIO_BUFSHARED                = $00010000;       // Open
-  MMIO_APPEND                   = $00020000;       // Open
-  MMIO_NOIDENTIFY               = $00040000;       // Open
-
-  MMIO_FINDFIRST                = $00000001;       // CF Find Entry
-  MMIO_FINDNEXT                 = $00000002;       // CF Find Entry
-  MMIO_FINDUNUSED               = $00000004;       // CF Find Entry
-  MMIO_FINDDELETED              = $00000008;       // CF Find Entry
-
-  MMIO_CHANGEDELETED            = $0001;         // CF Change Entry
-
-  MMIO_CF_FQNAME                = $0001;         // CF Compact
-
-  MMIO_FHOPEN                   = $0001;           // Close
-
-  MMIO_EMPTYBUF                 = $0001;           // Flush
-
-  MMIO_CREATERIFF               = $0001;           // CreateChunk
-  MMIO_CREATELIST               = $0002;           // CreateChunk
-  MMIO_FINDCHUNK                = $0004;           // Descend
-  MMIO_FINDRIFF                 = $0008;           // Descend
-  MMIO_FINDLIST                 = $0010;           // Descend
-
-  CTOC_HF_SEQUENTIAL            = $00000001;    // CTOC ulHeaderFlags
-  CTOC_HF_MEDSUBTYPE            = $00000002;    // CTOC ulHeaderFlags
-
-  CTOC_EFU_UNUSED               = $00000000; // CTOC extra usage code
-  CTOC_EFU_LASTMODTIME          = $00000001; // CTOC extra usage code
-  CTOC_EFU_CODEPAGE             = $00000002; // CTOC extra usage code
-  CTOC_EFU_LANGUAGE             = $00000003; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM0       = $00000005; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM1       = $00000006; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM2       = $00000007; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM3       = $00000008; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM4       = $00000009; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM5       = $0000000A; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM6       = $0000000B; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM7       = $0000000C; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM8       = $0000000D; // CTOC extra usage code
-  CTOC_EFU_COMPRESSPARAM9       = $0000000E; // CTOC extra usage code
-  CTOC_CharSET_STANDARD         = $00000000; // CTOC charset value
-
-  MMIO_INSTALLPROC              = $00000001; // Install IO Proc
-  MMIO_REMOVEPROC               = $00000002; // Install IO Proc
-  MMIO_FINDPROC                 = $00000004; // Install IO Proc
-
-  MMIO_MATCHFIRST               = $00000010; // Ini File Handler
-  MMIO_MATCHNEXT                = $00000020; // Ini File Handler
-  MMIO_MATCHFourCC              = $00000040; // Ini File Handler
-  MMIO_MATCHDLL                 = $00000080; // Ini File Handler
-  MMIO_MATCHPROCEDURENAME       = $00000100; // Ini File Handler
-  MMIO_FULLPATH                 = $00000200; // Ini File Handler
-  MMIO_NOVERIFY                 = $00000400; // Ini File Handler
-  MMIO_MATCHCOMPRESSTYPE        = $00000800; // Ini File Handler
-  MMIO_EXTENDED_STRUCT          = $00001000; // Ini File ulFlags
-  MMIO_MATCHCOMPRESSSUBTYPE     = $00002000; // Ini File Handler
-  MMIO_MATCHHWID                = $00004000; // Ini File Handler
-  MMIO_MATCHCAPSFLAGS           = $00008000; // Ini File Handler
-  MMIO_SKIPMATCH                = $00010000; // Ini/Load Handler
-
-  MMIO_TOUPPER                  = $0001;      // StringToFourcc
-
-  MMIO_CF_ENTRY_EXISTS          = $00000001; // Add CGRP element
-
-  MMIO_FORCE_IDENTIFY_SS        = $00000001; // Identify
-  MMIO_FORCE_IDENTIFY_FF        = $00000002; // Identify
-
-  MMIO_NOTRANSLATE              = $00000000; // Translation
-  MMIO_TRANSLATEDATA            = $00000001; // Translation
-  MMIO_TRANSLATEHEADER          = $00000002; // Translation
-  MMIO_DECOMPRESS               = $00000004; // CODEC Decompress
-
-  MMIO_DEFAULTBUFFER            = 8192;    // two pages under OS/2 2.0
-
-  MMIO_SEEK_IFRAME              = $00010000;  // Seek to nearest previous IFRAME
-
-
-
-  // Messages :
-  MMIOM_START                   = $0E00;
-  MMIOM_END                     = $0EFF;
-
-  MMIOM_GETCF                   = MMIOM_START + 1;
-  MMIOM_GETCFENTRY              = MMIOM_START + 2;
-
-  MMIOM_CLOSE                   = MMIOM_START + 3;
-  MMIOM_OPEN                    = MMIOM_START + 4;
-  MMIOM_READ                    = MMIOM_START + 5;
-  MMIOM_SEEK                    = MMIOM_START + 6;
-  MMIOM_WRITE                   = MMIOM_START + 7;
-
-  MMIOM_IDENTIFYFILE            = MMIOM_START + 8;
-  MMIOM_GETHEADER               = MMIOM_START + 9;
-  MMIOM_SETHEADER               = MMIOM_START + 10;
-  MMIOM_QUERYHEADERLENGTH       = MMIOM_START + 11;
-  MMIOM_GETFORMATNAME           = MMIOM_START + 12;
-  MMIOM_GETFORMATINFO           = MMIOM_START + 13;
-  MMIOM_SEEKBYTIME              = MMIOM_START + 14;
-  MMIOM_TEMPCHANGE              = MMIOM_START + 15;
-  MMIOM_BEGININSERT             = MMIOM_START + 16;
-  MMIOM_ENDINSERT               = MMIOM_START + 17;
-  MMIOM_SAVE                    = MMIOM_START + 18;
-  MMIOM_SET                     = MMIOM_START + 19;
-  MMIOM_COMPRESS                = MMIOM_START + 20;
-  MMIOM_DECOMPRESS              = MMIOM_START + 21;
-  MMIOM_MULTITRACKREAD          = MMIOM_START + 22;
-  MMIOM_MULTITRACKWRITE         = MMIOM_START + 23;
-  MMIOM_DELETE                  = MMIOM_START + 24;
-  MMIOM_BEGINGROUP              = MMIOM_START + 25;
-  MMIOM_ENDGROUP                = MMIOM_START + 26;
-  MMIOM_UNDO                    = MMIOM_START + 27;
-  MMIOM_REDO                    = MMIOM_START + 28;
-  MMIOM_BEGINSTREAM             = MMIOM_START + 29;
-  MMIOM_ENDSTREAM               = MMIOM_START + 30;
-
-
-  MMIOM_CUT                     = MMIOM_START + 31;
-  MMIOM_COPY                    = MMIOM_START + 32;
-  MMIOM_PASTE                   = MMIOM_START + 33;
-  MMIOM_CLEAR                   = MMIOM_START + 34;
-  MMIOM_STATUS                  = MMIOM_START + 35;
-  MMIOM_WINMSG                  = MMIOM_START + 36;
-  MMIOM_BEGINRECORD             = MMIOM_START + 37;
-  MMIOM_ENDRECORD               = MMIOM_START + 38;
-
-  // These 3 new messages were added with feature 11710
-  MMIOM_QUERYIMAGE              = MMIOM_START + 39;
-  MMIOM_QUERYIMAGECOUNT         = MMIOM_START + 40;
-  MMIOM_SETIMAGE                = MMIOM_START + 41;
-
-
-  MMIO_REALTIME                 = $00000001;
-  MMIO_NONREALTIME              = $00000002;
-
-  MMIOM_USER                    = $0F00;
-  MMIOM_USER_END                = $0FFF;
-
-Type
-  // Parameter structure for MMIOM_STATUS
-  mmIO_Status_Parms = record
-    hwndWindow        : hwnd;                  // Some items require a window handle
-    ulReturn          : LongInt;                 // Return field
-    ulItem            : LongInt;                 // Use MCI_STATUS_... flags here
-    ulValue           : LongInt;                 // Status value field
-    ulType            : LongInt;                 // MCI_FORMAT_... of ulReturn
-  end;
-  pmmIO_Status_Parms = ^mmIO_Status_Parms;
-
-  // Parameter structure for MMIOM_COPY, MMIOM_CUT, MMIOM_CLEAR and MMIOM_PASTE
-  uSec = LongInt;                                 // microsecond time format
-
-  mmIO_mEdit_Parms = record
-    ulStrucLen        : LongInt;                 // length of this structure
-    hwndWindow        : hwnd;                  // window handle
-    ulStartTime       : uSec;                  // starting time in usec
-    ulDuration        : uSec;                  // duration in usec
-    ulCurrentFilePosition : LongInt;             // current file position in usec
-    ulNewFilePosition : LongInt;                 // returned by IO proc in usec, MCD will issue a seek
-    ulNewFileLength   : LongInt;                 // return by IO proc in usec, MCD updates its headers
-    pBuffer           : Pointer;               // optional buffer
-    ulBufferLength    : LongInt;                 // optional buffer's length
-    pHeader           : Pointer;               // optional pointer to header for buffer
-  end;
-  pmmIO_mEdit_Parms = ^mmIO_mEdit_Parms;
-
-  // Parameter structure for MMIOM_WINMSG
-  mmIO_WinMsg = record
-    hwndWindow        : hwnd;                  // these are the parameters
-    usMessage         : Word;                //  ... passed to the
-    pParam1           : Pointer;               //  ... window procedure
-    pParam2           : Pointer;               //  ... by PM
-  end;
-  pmmIO_WinMsg = ^mmIO_WinMsg;
-
-// JPEG IOproc specific structure
-Const
-  YUV_YVU            =$0080;  //v013 Compressed data is YUV///
-  DST_Y              =20;
-  DST_YY             =25;
-
-Type
-  jpegoptions = record            // this comment needed by h2inc        ///
-    ulStructLen:Longint;                    // size of this sturcture                  ///
-    usQuantization:Array [0..4] of word;              // Each number may be 1 - 65535      ///
-    usScale:Word;                        // 1 (1/8 Size) - 8 (Full Size; default)  ///
-    ulColorOrder:LongInt;                   // YUV_YVU (Default) or ~YUV_YVU     ///
-    usColorSpaceOut:Word;               // DST_YY (Default) or DST_Y           ///
-  end;
-  pJpegOptions = ^JpegOptions;
-
-// Include error codes for MMIO only.
-Const
-  MMIO_SUCCESS                  = 0;
-  MMIO_WARNING                  = 2;
-  MMIO_ERROR                    = -1;
-  MMIOERR_UNSUPPORTED_MESSAGE   = -2;
-
-  MMIO_CF_SUCCESS               = 0;
-  MMIO_CF_FAILURE               = 1;
-
-
-  MMIO_NLS_CharSET_INFO         = 8000;   // RCDATA Name ID for NLS
-  MMIO_IOPROC_NAME_TABLE        = 8500;   // RCDATA Name ID for string table
-  MMIO_CODEC_NAME_TABLE         = 9000;   // RCDATA Name ID for Codec  table
-
-// Numeric equivalents of fourcc's.  These are needed for the resource
-// compiler.
-
-  HEX_FourCC_DOS                = $20534f44;
-  HEX_FourCC_MEM                = $204d454d;
-  HEX_FourCC_BND                = $20444e42;
-  HEX_FourCC_CF                 = $20204643;
-
-// Country codes (CC), languages (LC), and dialects (DC).
-
-  MMIO_DEFAULT_CODE_PAGE        = 437;
-
-  MMIO_CC_NONE                  = 000;
-  MMIO_CC_USA                   = 001;
-  MMIO_CC_CANADA                = 002;
-  MMIO_CC_LATIN_AMERICA         = 003;
-  MMIO_CC_GREECE                = 030;
-  MMIO_CC_NETHERLANDS           = 031;
-  MMIO_CC_BELGIUM               = 032;
-  MMIO_CC_FRANCE                = 033;
-  MMIO_CC_SPAIN                 = 034;
-  MMIO_CC_ITALY                 = 039;
-  MMIO_CC_SWITZERLAND           = 041;
-  MMIO_CC_AUSTRIA               = 043;
-  MMIO_CC_UNITED_KINGDOM        = 044;
-  MMIO_CC_DENMARK               = 045;
-  MMIO_CC_SWEDEN                = 046;
-  MMIO_CC_NORWAY                = 047;
-  MMIO_CC_WEST_GERMANY          = 049;
-  MMIO_CC_MEXICO                = 052;
-  MMIO_CC_BRAZIL                = 055;
-  MMIO_CC_AUSTRALIA             = 061;
-  MMIO_CC_NEW_ZEALAND           = 064;
-  MMIO_CC_JAPAN                 = 081;
-  MMIO_CC_KOREA                 = 082;
-  MMIO_CC_CHINA                 = 086;
-  MMIO_CC_TAIWAN                = 088;
-  MMIO_CC_TURKEY                = 090;
-  MMIO_CC_PORTUGAL              = 351;
-  MMIO_CC_LUXEMBOURG            = 352;
-  MMIO_CC_ICELAND               = 354;
-  MMIO_CC_FINLAND               = 358;
-
-  MMIO_LC_NONE                  = 0;
-  MMIO_DC_NONE                  = 0;
-  MMIO_LC_ARABIC                = 1;
-  MMIO_DC_ARABIC                = 1;
-  MMIO_LC_BULGARIAN             = 2;
-  MMIO_DC_BULGARIAN             = 1;
-  MMIO_LC_CATALAN               = 3;
-  MMIO_DC_CATALAN               = 1;
-  MMIO_LC_TRADITIONAL_CHINESE   = 4;
-  MMIO_DC_TRADITIONAL_CHINESE   = 1;
-  MMIO_LC_SIMPLE_CHINESE        = 4;
-  MMIO_DC_SIMPLE_CHINESE        = 2;
-  MMIO_LC_CZECH                 = 5;
-  MMIO_DC_CZECH                 = 1;
-  MMIO_LC_DANISH                = 6;
-  MMIO_DC_DANISH                = 1;
-  MMIO_LC_GERMAN                = 7;
-  MMIO_DC_GERMAN                = 1;
-  MMIO_LC_SWISS_GERMAN          = 7;
-  MMIO_DC_SWISS_GERMAN          = 2;
-  MMIO_LC_GREEK                 = 8;
-  MMIO_DC_GREEK                 = 1;
-  MMIO_LC_US_ENGLISH            = 9;
-  MMIO_DC_US_ENGLISH            = 1;
-  MMIO_LC_UK_ENGLISH            = 9;
-  MMIO_DC_UK_ENGLISH            = 2;
-  MMIO_LC_SPANISH               = 10;
-  MMIO_DC_SPANISH               = 1;
-  MMIO_LC_SPANISH_MEXICAN       = 10;
-  MMIO_DC_SPANISH_MEXICAN       = 2;
-  MMIO_LC_FINNISH               = 11;
-  MMIO_DC_FINNISH               = 1;
-  MMIO_LC_FRENCH                = 12;
-  MMIO_DC_FRENCH                = 1;
-  MMIO_LC_BELGIAN_FRENCH        = 12;
-  MMIO_DC_BELGIAN_FRENCH        = 2;
-  MMIO_LC_CANADIAN_FRENCH       = 12;
-  MMIO_DC_CANADIAN_FRENCH       = 3;
-  MMIO_LC_SWISS_FRENCH          = 12;
-  MMIO_DC_SWISS_FRENCH          = 4;
-  MMIO_LC_HEBREW                = 13;
-  MMIO_DC_HEBREW                = 1;
-  MMIO_LC_HUNGARIAN             = 14;
-  MMIO_DC_HUNGARIAN             = 1;
-  MMIO_LC_ICELANDIC             = 15;
-  MMIO_DC_ICELANDIC             = 1;
-  MMIO_LC_ITALIAN               = 16;
-  MMIO_DC_ITALIAN               = 1;
-  MMIO_LC_SWISS_ITALIAN         = 16;
-  MMIO_DC_SWISS_ITALIAN         = 2;
-  MMIO_LC_JAPANESE              = 17;
-  MMIO_DC_JAPANESE              = 1;
-  MMIO_LC_KOREAN                = 18;
-  MMIO_DC_KOREAN                = 1;
-  MMIO_LC_DUTCH                 = 19;
-  MMIO_DC_DUTCH                 = 1;
-  MMIO_LC_BELGIAN_DUTCH         = 19;
-  MMIO_DC_BELGIAN_DUTCH         = 2;
-  MMIO_LC_NORWEGIAN_BOKMAL      = 20;
-  MMIO_DC_NORWEGIAN_BOKMAL      = 1;
-  MMIO_LC_NORWEGIAN_NYNORSK     = 20;
-  MMIO_DC_NORWEGIAN_NYNORSK     = 2;
-  MMIO_LC_POLISH                = 21;
-  MMIO_DC_POLISH                = 1;
-  MMIO_LC_BRAZILIAN_PORTUGUESE  = 22;
-  MMIO_DC_BRAZILIAN_PORTUGUESE  = 1;
-  MMIO_LC_PORTUGUESE            = 22;
-  MMIO_DC_PORTUGUESE            = 2;
-  MMIO_LC_RHAETO_ROMANIC        = 23;
-  MMIO_DC_RHAETO_ROMANIC        = 1;
-  MMIO_LC_ROMANIAN              = 24;
-  MMIO_DC_ROMANIAN              = 1;
-  MMIO_LC_RUSSIAN               = 25;
-  MMIO_DC_RUSSIAN               = 1;
-  MMIO_LC_SERBO_CROATIAN_LATIN  = 26;
-  MMIO_DC_SERBO_CROATIAN_LATIN  = 1;
-  MMIO_LC_SERBO_CROATIAN_CYRILLIC = 26;
-  MMIO_DC_SERBO_CROATIAN_CYRILLIC = 2;
-  MMIO_LC_SLOVAK                = 27;
-  MMIO_DC_SLOVAK                = 1;
-  MMIO_LC_ALBANIAN              = 28;
-  MMIO_DC_ALBANIAN              = 1;
-  MMIO_LC_SWEDISH               = 29;
-  MMIO_DC_SWEDISH               = 1;
-  MMIO_LC_THAI                  = 30;
-  MMIO_DC_THAI                  = 1;
-  MMIO_LC_TURKISH               = 31;
-  MMIO_DC_TURKISH               = 1;
-  MMIO_LC_URDU                  = 32;
-  MMIO_DC_URDU                  = 1;
-  MMIO_LC_BAHASA                = 33;
-  MMIO_DC_BAHASA                = 1;
-
-
-// Ultimotion CODEC type for CODECINIFILEINFO ulCompressType */
-//#define  FOURCC_ULTI       mmioFOURCC('U', 'L', 'T', 'I')
-Const
-//  FOURCC_ULTI:FOURCC=0;
-  HEX_FOURCC_ULTI=$49544C55;     // ITLU */
-
-// Indeo CODEC type for CODECINIFILEINFO ulCompressType */
-//#define  FOURCC_RT21       mmioFOURCC('R', 'T', '2', '1')
-//  FOURCC_RT21:FOURCC=0;
-  HEX_FOURCC_RT21=$31325452;     // 12TR */
-
-// Mondo CODEC type for CODECINIFILEINFO ulCompressType */
-//#define  FOURCC_DIB        mmioFOURCC('D', 'I', 'B', ' ')
-//   FOURCC_DIB:FOURCC=0;
-   HEX_FOURCC_DIB=$20424944;     //  BID */
-
-
-
-// CODECVIDEOHEADER - CODEC video Header
-Type
-  TCODECVIDEOHEADER=record  // codecvidhdr */
-    ulStructLen:LongInt;
-    cx:LongInt;
-    cy:LongInt;
-    cPlanes:Integer;
-    cBitCount:Integer;
-    ulColorEncoding:LongInt;
-    genpal:GENPAL;
-  end;
-  PCodecVideoHeader=^TCODECVIDEOHEADER;
-
-// ulColorEncoding defines: */
-Const
-  MMIO_RGB_5_6_5    =$0001;  // Each pixel is a RGB_5_6_5 datatype */
-  MMIO_RGB_24       =$0002;  // Each pixel is a RGB_24 datatype */
-  MMIO_YUV_4_1_1    =$0004;  // Each pixel is a YUV_4_1_1 datatype */
-  MMIO_COMPRESSED   =$0008;  // The data is compressed */
-  MMIO_YUV_24       =$0010;  // Each pixel is a YUV_24 datatype */
-  MMIO_PALETTIZED   =$0020;  // The data is palettized */
-  MMIO_OS2_BITMAP24 =$0020;  // The data is palettized */
-
-
-//*********************************************
-// *
-// * MMVIDEOOPEN - Video Open Structure
-// *
-// * This structure is passed on the CODEC open
-// * message when video compression is being done
-// * to indicate information such as quality,
-// * frame rate, data rate, and key frame rate.
-// *
-// * Quality:
-// *
-// * The ulQuality field specifies a scalar value
-// * in the range 0 - 10000, where 0 is the lowest
-// * quality and 10000 is the highest quality.  A
-// * value of -1 specifies the default quality level,
-// * and the default quality level (e.g. 5000) is
-// * returned in the ulQuality field.
-// *
-// *
-// * Key Frame rate:
-//*
-// * The ulKeyFrameRate structure specifies the key
-// * frame (aka I-frame, reference frame) frequency.
-// * Every Nth frame is a key frame as specified.
-// * A value of zero specifies that no periodic key
-// * are to be compressed.  Additional key frames may
-// * be inserted at any point by specifying
-// * MMIO_IS_KEY_FRAME in the MMCOMPRESS structure.
-// *
-// * example:  ulKeyFrameRate = 5  results in:
-//*
-//*    key delta delta delta delta key delta delta delta delta key delta...
-// *
-//*
-// * Frame rate:
-// *
-// * Rate = number of time units per second
-// * Scale = number of time units per frame
-// *
-// * examples:  Rate = 30  Scale = 1     =>    30 FPS
-// *            Rate = 15  Scale = 1     =>    15 FPS
-// *            Rate = 25  Scale = 2     =>    12.5 FPS
-// *
-// *
-// * Data Constraint:
-// *
-// * Compressors which are capable of constraining the
-// * resultant compressed video data rate use the
-// * information in the ulDataConstraint and
-// * ulConstraintInterval fields.  A non-zero value
-//* in ulDataConstraint specifies the number of bytes
-// * which is not to be exceeded over an interval of
-// * frames in the output data stream, regardless of
-// * the requested quality level.  This value only
-// * considers video data, i.e. audio data and file format
-// * overhead must be considered seperately when determining
-// * the final output file data rate.  The interval of
-// * frames over which the data is constrained is specified
-//* in ulConstraintInterval.  A value of zero for
-// * ulDataContraint specifies that the data rate is not
-// * to be constrained and is compressed according to
-// * the requested quality level.
-// *
-// * example 1:  ulDataConstraint = 150000   ulConstraintInterval = 15
-// *
-// *             This results in an output stream wherein the sizes of any 15
-// *             consecutive frames does not exceed 150000 bytes.  If the
-// *             frame rate is 15 FPS, the resultant data rate will not
-// *             exceed 150000 bytes per second.
-// *
-// * example 2:  ulDataConstraint = 10000    ulConstraintInterval = 1
-// *
-// *             This results in an output stream wherein any single frame
-// *             does not exceed 10000 bytes.  If the frame rate is 15 FPS,
-// *             the resultant data rate will not exceed 150000 bytes per
-// *             second.  Note the difference between this case and example 1
-// *             where individual frames may exceed 10000 bytes (the average)
-// *             so long other frames in any 15 frame sequence are sufficiently
-// *             smaller to satisfy the constraint within the constraint interval.
-// *
-// **********************************************/
-TYPE _MMVIDEOOPEN = RECORD      // mmvidopen */
-       ulStructLen:LongInt;
-       ulQuality:LongInt;
-       ulKeyFrameRate:LongInt;
-       ulScale:LongInt;
-       ulRate:LongInt;
-       ulDataConstraint:LongInt;
-       ulConstraintInterval:LongInt;
-       end;
-TYPE PMMVIDEOOPEN = ^_MMVIDEOOPEN;
-
-
-TYPE _MMAUDIOOPEN = RECORD
-  ulStructLen:LongInt;         // Length of struct */
-  ulSamplesPerBlock:LongInt;   // Samples in each block of compressed data */
-  ulBytesPerBlock:LongInt;     // uncompressed bytes in each block */
-  ulFlags:LongInt;             // Compression flags */
-  ulBestGuess:LongInt;         // Guess at avg. compression ratio */
-  ulBlockAlignment:LongInt;    // Block alignment of codec */
-  ulLength:LongInt;            // Length of the file */
-  hCodec:LongInt;              // Codec handle */
-  pfnCodec:PCodecProc;
-  end;
-
-TYPE PMMAUDIOOPEN = ^_MMAUDIOOPEN;
-
-// defines for the ulFlags field of the BUFER_INFORMATION */
-
-CONST
-
-        BLOCK_ORIENTED        =$00000001;
-        NON_LINEAR            =$00000002;
-        INIT_CODEC            =$00000004;
-
-//*********************************************
-// *
-// * CODECOPEN - CODEC open structure
-// *
-// **********************************************/
-TYPE _CODECOPEN = RECORD       // codecopen */
-   ulFlags:LongInt;             // flags & events - Refer to ulCapsFlags in CODECINIFILEINFO */
-   pControlHdr:Pointer;         // control header - (codec specific) */
-   pSrcHdr:Pointer;             // source header - Ptr CODECVIDEOHEADER */
-   pDstHdr:Pointer;             // destination header - Ptr CODECVIDEOHEADER */
-   pOtherInfo:Pointer;          // other information - Ptr MMVIDEOOPEN/MMAUDIOOPEN */
-   end;
-TYPE PCODECOPEN = ^_CODECOPEN;
-
-const
-  // CODECINIFILEINFO capabilities (ulCapsFlags) values.
-
-  Valid_CodecOpen_InputFlags = CODEC_DECOMPRESS or
-                               CODEC_WINDOW_CLIPPING or
-                               CODEC_PALETTE_TRANS or
-                               CODEC_SELFHEAL or
-                               CODEC_SCALE_PEL_DOUBLE or
-                               CODEC_SCALE_PEL_HALVED or
-                               CODEC_SCALE_CONTINUOUS or
-                               CODEC_MULAPERTURE or
-                               CODEC_HARDWARE or
-                               CODEC_DIRECT_DISPLAY;
-// Stream handler communication */
-
-TYPE _AUDIO_CODEC_INFO = RECORD
-  ulStructLen:LongInt;         // Length of struct */
-  ulBytesPerBlock:LongInt;     // uncompressed bytes in each block */
-  ulBlockAlignment:LongInt;    // Block alignment of codec */
-  hCodec:LongInt;              // Codec handle */
-  pfnCodec:PCODECPROC;
-//  LONG (* APIENTRY pfnCodec) (PVOID, SHORT, LONG, LONG); */
-  end;
-
-CONST
-        AUDIO_CODEC_INF    =1000;
-
-
-//*********************************************
-// *
-// * MMCOMPRESS - Compress structure
-// *
-// **********************************************/
-TYPE _MMCOMPRESS = RECORD    // mmcomp */
-   ulStructLen:LongInt;       // length of this structure */
-   ulFlags:LongInt;           // command and status flags */
-   ulSrcBufLen:LongInt;       // source buffer size */
-   pSrcBuf:Pointer;           // source buffer */
-   ulDstBufLen:LongInt;       // destination buffer length */
-   pDstBuf:Pointer;           // destination buffer */
-   pRunTimeInfo:Pointer;      // control information */
-   end;
-TYPE PMMCOMPRESS = ^_MMCOMPRESS;
-
-// ulFlags Input values for MMCOMPRESS structure:                */
-// Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
-// below, but are listed here for information purposes only.     */
-// MMIO_IS_KEY_FRAME         This bit is set by the application  */
-//                           to instruct the IOProc to compress  */
-//                           the pSrcBuf into a key or reference */
-//                           frame.  If the bit is not set, a    */
-//                           delta frame is compressed.          */
-// MMIO_IS_PALETTE           A video palette is provided.  This  */
-//                           is set by the application.          */
-
-
-//*********************************************
-// *
-// * MMVIDEOCOMPRESS - Video Compress structure
-// *
-// **********************************************/
-
-TYPE _MMVIDEOCOMPRESS = RECORD // mmvidcomp */
-   ulStructLen:LongInt;       // Structure length */
-   genpalVideo:GENPAL;       // Video stream palette */
-   pControlHdr:Pointer;       // control header (codec specific) */
-   end;
-TYPE PMMVIDEOCOMPRESS = ^_MMVIDEOCOMPRESS;
-
-CONST
-
-START_DECOMPRESSION     =$00000001;
-CONTINUE_DECOMPRESSION  =$00000002;
-START_SEEK              =$00000004;
-CONTINUE_SEEK           =$00000008;
-
-//*********************************************
-// *
-// * MMDECOMPRESS - Decompress Structure
-// *
-// **********************************************/
-TYPE _MMDECOMPRESS = Record   // mmdec */
-   ulStructLen:LongInt;       // length of this structure */
-   ulFlags:LongInt;           // command and status flags */
-   ulSrcBufLen:LongInt;       // source buffer size */
-   pSrcBuf:Pointer;           // source buffer */
-   ulDstBufLen:LongInt;       // destination buffer length */
-   pDstBuf:pointer;           // destination buffer */
-   pRunTimeInfo:Pointer;      // control information Ptr to MMVIDEODECOMPRESS */
-   end;
-TYPE PMMDECOMPRESS = ^_MMDECOMPRESS;
-
-// ulFlags defines: */
-CONST
-
-        MMIO_DROP_DELTA_FRAME =$0001; // Input/Output - Tells the IOProc to drop the delta */
-                                      // frame if the pSrcBuf contains a delta */
-                                      // frame.  On return, the bit is reset */
-                                      // if the delta frame is dropped. */
-        MMIO_IS_KEY_FRAME     =$0002; // Output - This bit is set by the IOProc when */
-                                      // the data contained in the pSrcBuf is */
-                                      // a key or reference frame. */
-        MMIO_IS_PALETTE       =$0004; // Output - A video palette has been found. */
-                                      // This is set by the IOProc. */
-        MMIO_PALETTE_CHANGE   =$0008; // Input - The physical palette has been changed */
-                                      // in...  This is set by the application. */
-        MMIO_ORIGIN_LOWERLEFT =$0010; // Input - The video frame origin */
-        MMIO_RECTL_CHANGE     =$0020; // Input - The valid rectl list has changed. */
-        MMIO_ORIGIN_UPPERLEFT =$0040; // Input - The video frame origin */
-        MMIO_DROP_FRAME_DECODE=$0080; // Input - Tells the IOProc to drop decoding  */
-        MMIO_HIGH_QUALITY     =$0100; // Input - Tells Codec to render best */
-                                      // quality image - not time critical */
-        MMIO_IGNORE_CLIPPING  =$0200; // Ignore clipping rectangles used for bitmap capture */
-                                      // high performance */
-        MMIO_OUTPUT_FULL_IMAGE=$0400; // Output a complete image on decompress, even if this*/
-                                      // is a delta frame */
-                                      // of the frame.                         */
-
-        VALID_DECOMPRESS_INPUTFLAGS   = MMIO_DROP_DELTA_FRAME or
-                                        MMIO_PALETTE_CHANGE or
-                                        MMIO_ORIGIN_LOWERLEFT or
-                                        MMIO_RECTL_CHANGE or
-                                        MMIO_DROP_FRAME_DECODE or
-                                        MMIO_ORIGIN_UPPERLEFT or
-                                        MMIO_HIGH_QUALITY or
-                                        MMIO_IGNORE_CLIPPING or
-                                        MMIO_OUTPUT_FULL_IMAGE;
-
-
-        START_COMPRESSION     =$00000001;
-        CONTINUE_COMPRESSION  =$00000002;
-        SOURCE_UNUSED         =$00000004;
-        TARGET_UNUSED         =$00000008;
-
-//*********************************************
-// *
-// * MMVIDEODECOMPRESS - Video Decompress structure
-// *
-// **********************************************/
-TYPE  RectL   = record
-    xLeft:   Longint;
-    yBottom: Longint;
-    xRight:  Longint;
-    yTop:    Longint;
-  end;
-TYPE PRECTL = ^RECTL;
-
-TYPE _MMVIDEODECOMPRESS = Record    // mmviddec */
-   ulStructLen:LongInt;            // Structure length */
-   ulRectlCount:LongInt;           // Valid rectangle count - for clipping */
-   prectl:PRECTL;                  // Valid rectangle array - for clipping */
-   ulSkipLength:LongInt;           // Skipped line length */
-   ulDecodeLines:LongInt;          // Num of lines to decompress */
-   genpalPhysical:GENPAL;          // Physical palette */
-   genpalVideo:GENPAL;             // Video stream palette */
-   rectlSrc:RECTL;                 // Source window rectangle */
-   rectlDst:RECTL;                 // Destination window rectangle */
-   ulDeltaCount:LongInt;           // Number of remaining delta frames before the next I-Frame */
-   ulParm1:LongInt;                // Codec specific parm */
-   ulParm2:Longint;                // Codec specific parm */
-   ulParm3:LongInt;                // Codec specific parm */
-   ulParm4:LongInt;                // Codec specific parm */
-   end;
-TYPE PMMVIDEODECOMPRESS = ^_MMVIDEODECOMPRESS;
-
-//************************************************
-// *
-// * RECORDTAB - Record table
-// *
-// * NOTE: This structure maps to ESRCBUFTAB in ssm.h
-// *************************************************/
-TYPE _RECORDTAB = record       // recordtab */
-   ulReserved1:LongInt;       // reserved for system */
-   pRecord:Pointer;           // ptr to record in buffer */
-   ulLength:LongInt;          // length of record */
-   ulReserved2:LongInt;       // reserved for system */
-   ulReserved3:LongInt;       // reserved for system */
-   ulParm1:LongInt;           // Record specific data */
-   ulParm2:LongInt;           // Record specific data */
-   end;
-TYPE PRECORDTAB=^_RECORDTAB;  // Ptr to a buffer entry  */
-
-
-//**************************************************
-// *
-// * RECORDTABWRITE - Record table for video write
-// *
-// * NOTE: This structure maps to ETGTBUFTAB in ssm.h
-// ***************************************************/
-TYPE _RECORDTABWRITE=RECORD       // recordtab */
-   pRecord:Pointer;           // ptr to record in buffer */
-   ulReserved1:Longint;       // reserved for system */
-   ulLength:Longint;          // length of record */
-   ulReserved2:longint;       // reserved for system */
-   ulReserved3:longint;       // reserved for system */
-   ulParm1:longint;           // Record specific data */
-   ulParm2:longint;           // Record specific data */
-   end;
-type precordtabwrite=^_recordtabwrite;// Ptr to a buffer entry  */
-
-
-// ulParm1 Return values for MULTITRACK_READ only:               */
-// Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
-// above, but are listed here for information purposes only      */
-// as they are valid ulParm1 Return values for MULTITRACK_READ.  */
-// MMIO_IS_KEY_FRAME         Frame is a Key frame                */
-// MMIO_IS_PALETTE           Buffer contains a video palette     */
-
-CONST
-
-        MMIO_INVISIBLE_FRAME   =$1000;    // Indicates a invisible video frame */
-        MMIO_NULL_FRAME        =$2000;    // Indicates a null video frame (zero length) */
-
-// ulParm2 Return values for MULTITRACK_READ only:               */
-//    This field contains the frame number for this video frame  */
-//    if this track is a video track.                            */
-
-
-
-// ulParm1 Input values for MULTITRACK_WRITE only:               */
-// Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
-// above, but are listed here for information purposes only      */
-// as they are valid ulParm1 Input values for MULTITRACK_WRITE.  */
-// MMIO_IS_KEY_FRAME         Frame is a Key frame                */
-// MMIO_IS_PALETTE           Buffer contains a video palette     */
-
-// ulParm2 Input values for MULTITRACK_WRITE only:               */
-//    This field contains the number of null frames              */
-//    that should be inserted before this frame                  */
-//    (this recordtab entry).                                    */
-
-
-//***********************************************
-// *
-// *  TRACKMAP - This structure maps a track to
-// *             a record table.
-// *
-// ************************************************/
-TYPE _TRACKMAP = RECORD        // trackmap */
-   ulTrackID:LongInt;         // Input - track ID */
-   ulNumEntries:LongInt;      // Input - number of record entries */
-   pRecordTabList:PRecordTab; // Input/Output - Ptr to a record table */
-   end;
-TYPE PTRACKMAP=^_TRACKMAP;    // Ptr to a track map table entry */
-
-//*********************************************
-// *
-// * MMMULTITRACKREAD - Multiple Track Read
-// *
-// **********************************************/
-TYPE _MMMULTITRACKREAD=RECORD   // mtread */
-   ulLength:LongInt;          // Input - Size of buffer to read.  The IO should be performed on this size of  */
-                              //          buffer.  The actual buffer size may be bigger and is given in the   */
-                              //          ulBufferLength field below.  Video frames can span pBuffer+ulLength */
-                              //          as long as the frame is less than the ulBufferLength in size.       */
-                              //          The purpose of this is to break the IO reads into smaller sizes     */
-                              //          while still allowing large frame sizes.                             */
-   pBuffer:Pointer;           // Input - ptr to read buffer           */
-   ulFlags:LongInt;           // Input/Output - read flags            */
-   ulNumTracks:LongInt;       // Input - number of track entries      */
-   pTrackMapList:PTRACKMAP;   // Input - ptr to track-to-record list  */
-// End of old MMMULTITRACKREAD structure */
-   ulBufferLength:LongInt;    // Input - Actual length of read buffer */
-   ulReserved:longInt;        // Input - Reserved (must be 0)         */
-   end;
-TYPE PMMMULTITRACKREAD=^_MMMULTITRACKREAD;
-
-// ulFlags Input Values: */
-
-CONST
-
-        MULTITRACKREAD_EXTENDED       =$0004; // Indicates that the new extended multitrack   */
-                                              // read structure is passed from caller instead */
-                                              // of the previous multitrack read structure.   */
-
-// ulFlags Return Values: */
-        MULTITRACKREAD_NOTDONE        =$0001; // Read is not done.  Another read of the same        */
-                                              // buffer is necessary.  There were not enough record */
-                                              // entries in the record table passed to this api.    */
-        MULTITRACKREAD_EOF            =$0002; // End of File.  Used because # bytes read may not    */
-                                              // match the length of the buffer in cases of a       */
-                                              // record that spans in the next buffer.              */
-
-
-//*********************************************
-// *
-// * MMMULTITRACKWRITE - Multiple Track Write
-// *
-// **********************************************/
-TYPE _MMMULTITRACKWRITE=RECORD   // mtwrite */
-   ulNumTracks:LongInt;       // Input - number of track entries     */
-   pTrackMapList:PTRACKMAP;     // Input - ptr to track-to-record list */
-   ulFlags:LongInt;           // Input - write flags (Default = 0)   */
-   ulReserved:LongInt;        // Input - Reserved (must be 0)        */
-   end;
-TYPE PMMMULTITRACKWRITE=^_MMMULTITRACKWRITE;
-
-// ulFlags Input Values: */
-
-CONST
-
-        MULTITRACKWRITE_MERGE        =$0001; // Attempt to interleave the data on the write. */
-                                             // The default (without this flag set) is to    */
-                                             // write all records for each track then write  */
-                                             // all records of the next track and so on.     */
-
-
-//*********************************************
-// *
-// * MMMOVIEHEADER - standard movie header data
-// *
-// **********************************************/
-TYPE  MMTrackInfo = record
-    ulTrackID     : Longint;              // track identifier
-    ulMediaType   : Longint;              // media type
-    ulCountry     : Longint;              // country code for the track
-    ulCodePage    : Longint;              // country code page for the track
-    ulReserved1   : Longint;              // reserved must be 0
-    ulReserved2   : Longint;              // reserved must be 0
-  end;
-//TYPE  pMMTrackInfo = ^MMTrackInfo;
-
-//TYPE
-//        PSZ = PChar;
-
-TYPE _MMMOVIEHEADER=RECORD   // mmhdr */
-   ulStructLen:LongInt;       // length of this structure */
-   ulContentType:LongInt;     // movie content type */
-   ulMediaType:LongInt;       // video media type */
-   ulMovieCapsFlags:LongInt;  // capabilities */
-   ulMaxBytesPerSec:LongInt;  // maximum transfer rate */
-   ulPaddingGranularity:LongInt;// pad to a multiple of this size */
-   ulSuggestedBufferSize:LongInt;
-   ulStart:LongInt;           // delay time marking beginning or start of movie */
-   ulLength:LongInt;
-   ulNextTrackID:LongInt;     // next available track id */
-   ulNumEntries:LongInt;      // number of track entries */
-   pmmTrackInfoList:PMMTRACKINFO;  // track information */
-   pszMovieTitle:PSZ;     // movie title */
-   ulCountry:LongInt;         // country code for the title string */
-   ulCodePage:LongInt;        // country code page the title string */
-   ulAvgBytesPerSec:LongInt;  // average transfer rate */
-   end;
-TYPE PMMMOVIEHEADER=^_MMMOVIEHEADER;
-
-// ulMovieCapsFlags Defines: */
-CONST
-
-        MOVIE_HAS_VIDEO         =$0001;  // The movie contains video. */
-        MOVIE_HAS_AUDIO         =$0002;  // The movie contains audio. */
-        MOVIE_CAN_SEEK          =$0004;  // The movie can seek. */
-        MOVIE_CAN_SCAN          =$0008;  // The movie can fast scan. */
-        MOVIE_HAS_COPYRIGHT     =$0010;  // The movie contains copyrighted data. */
-        MOVIE_WAS_CAPTUREFILE   =$0020;  // The movie is a specially allocated  */
-                                          // file used for capturing real-time */
-                                          // video.  Applications should warn  */
-                                          // the user before writing over a file */
-                                          // with this flag set because the user  */
-                                          // probably defragmented this file. */
-                                          // If this flag is set, then there is a chance */
-                                          // that not all of the records will be written */
-                                          // on the call. Caller must check for this whether */
-                                          // this flag is set or not. */
-
-//*********************************************
-// *
-// * MMVIDEOHEADER - Movie Video Track Header
-// *
-// **********************************************/
-
-TYPE _MMVIDEOHEADER=RECORD   // mmvhdr */
-   ulStructLen:LongInt;       // length of this structure */
-   ulContentType:LongInt;     // video content type */
-   ulMediaType:LongInt;       // video media type */
-   ulVideoCapsFlags:LongInt;  // capabilities */
-   ulWidth:LongInt;           // video width in pels */
-   ulHeight:LongInt;          // video height in pels */
-   ulScale:LongInt;
-   ulRate:LongInt;            // Rate / Scale == frames/second */
-   ulStart:LongInt;           // delay time marking beginning or start of stream */
-   ulLength:LongInt;
-   ulTotalFrames:LongInt;     // total number of video frames */
-   ulInitialFrames:LongInt;
-   mmtimePerFrame:MMTIME;    // frame display time or 0L */
-   ulSuggestedBufferSize:LongInt;
-   genpalVideo:GENPAL;       // palette */
-   pmmXDIBHeader:PMMXDIBHEADER;     // windows DIB compatible header */
-   ulHHRWidth:LongInt;        // Actual width of HHR video     */
-   fHHR:Boolean;              // HHR flag                      */
-   end;
-TYPE PMMVIDEOHEADER=_MMVIDEOHEADER;
-
-// ulContentType Defines: */
-CONST
-
-        MMIO_VIDEO_UNKNOWN          =$00000000;  // Unknown video content */
-        MMIO_VIDEO_DATA             =$00000001;  // Video                 */
-
-
-//
-// Base function prototypes:
-///
-
-function mmioAdvance( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
-function mmioAscend( mmIO: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
-function mmioClose( mmIO: hmmio; usFlags: Word ): Word; cdecl;
-function mmioCreateChunk( mmio: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
-function mmioDescend( mmIO: hmmio; pckinfo, pckinfoParent: pMMCkInfo; usFlags: Word ): Word; cdecl;
-function mmioFlush( mmIO: hmmio; usFlags: Word ): Word; cdecl;
-function mmioGetInfo( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
-function mmioGetLastError( mmIO: hmmio ): Longint; cdecl;
-function mmioInstallIOProc( fccIOProc: FourCC; pIOProc: pMMIOProc; ulFlags: Longint ): pmmIOProc; cdecl;
-function mmioOpen( pszFileName: pChar; mmIOInfo: pmmioinfo; ulOpenFlags: Longint ): hMMIO; cdecl;
-function mmioRead( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
-function mmioSeek( mmIO: hmmio; lOffset, lOrigin: Longint ): Longint; cdecl;
-function mmioSendMessage( mmIO: hmmio; usMsg: Word; lParam1, lParam2: Longint ): Longint; cdecl;
-function mmioSetBuffer( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint; usFlags: Word ): Word; cdecl;
-function mmioSetInfo( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
-function mmioStringToFourCC( pszString: pChar; usFlags: Word ): FourCC; cdecl;
-function mmioWrite( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
-
-//
-// Compound File function prototypes:
-///
-
-function mmioCFOpen( pszFileName: pChar; CfInfo, IOInfo: pmmcfinfo; ulFlags: Longint ): hMMCF; cdecl;
-function mmioCFClose( mmCf: hmmcf; ulFlags: Longint ): Longint; cdecl;
-function mmioCFGetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
-function mmioCFSetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
-function mmioCFFindEntry( mmCf: hmmcf; ctocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
-function mmioCFAddEntry( mmCf: hmmcf; cTocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
-function mmioCFChangeEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
-function mmioCFDeleteEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
-function mmioCFAddElement( mmCf: hmmcf; pszElementName: pChar; fccType: FourCC;
-  pchBuffer: pChar; cchBytes: LongInt; ulFlags: Longint ): Longint; cdecl;
-
-function mmioCFCopy( mmCfSource: hmmcf; pszDestFileName: pChar; ulFlags: Longint ): Longint; cdecl;
-//
-// Conversion Utility function prototypes:
-///
-
-function mmioQueryFormatCount( FormatInfo: pmmformatinfo;
-  plNumFormats: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-
-function mmioGetFormats( FormatInfo: pmmformatinfo;
-  lNumFormats: LongInt; pFormatInfoList: Pointer; plFormatsRead: pLong;
-  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-
-function mmioGetFormatName( FormatInfo: pmmformatinfo; pszFormatName: pChar;
-  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-
-function mmioIdentifyFile( pszFileName: pChar; MMIoInfo: pmmioinfo;
-  FormatInfo: pmmformatinfo; pfccStorageSystem: pFourCC; ulReserved: Longint;
-  ulFlags: Longint ): Longint; cdecl;
-
-function mmioQueryHeaderLength( mmIO: hmmio; plHeaderLength: pLong;
-  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-
-function mmioGetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
-  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-
-function mmioSetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
-  plBytesWritten: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-
-function mmioIniFileHandler( IniFileInfo: pmminifileinfo; ulFlags: Longint ): Longint; cdecl;
-
-function mmioIdentifyStorageSystem( pszFileName: pChar;
-  MMIoInfo: pmmioinfo; pfccStorageSystem: pFourCC ): Longint; cdecl;
-
-function mmioDetermineSSIOProc( pszFileName: pChar; MMIoInfo: pmmioinfo;
-  pfccStorageSystem: pFourCC; pszParsedRemainder: pChar ): Longint; cdecl;
-
-function mmioQueryIOProcModuleHandle( IOProc: pMMIOProc;
-  IOProcModule: phModule ): Longint; cdecl;
-
-function mmioCFCompact( pszFileName: pChar; ulFlags: Longint ): Longint; cdecl;
-
-//
-// MMPMMMIO.INI file migration utility
-///
-
-function mmioMigrateIniFile( ulFlags: Longint ): Longint; cdecl;
-
-//
-// MMIO CODEC APIs
-///
-
-function mmioIniFileCODEC( IniFile: pCODECIniFileInfo; ulFlags: Longint ): Longint; cdecl;
-function mmioSet( mmIO: hmmio; ExtendInfo: pmmExtendInfo; ulFlags: Longint): Longint; cdecl;
-function mmioQueryCODECName( IniInfo: pCODECIniFileinfo;
-  pszCODECName: pChar; pulBytesRead: pLongint ): Longint; cdecl;
-
-function mmioQueryCODECNameLength( IniInfo: pCODECIniFileinfo;
-  pulNameLength: pLongint ): Longint; cdecl;
-
-function mmioLoadCODECProc( IniInfo: pCODECIniFileInfo;
-  Module: phModule; ulFlags: Longint ): pCodecProc; cdecl;
-
-function mmioGetData( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
-
-Implementation
-
-//-------
-function mmioAdvance( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
-    external LibName index 55;
-
-function mmioAscend( mmIO: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
-    external LibName index 49;
-
-function mmioClose( mmIO: hmmio; usFlags: Word ): Word; cdecl;
-    external LibName index 45;
-
-function mmioCreateChunk( mmio: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
-    external LibName index 51;
-
-function mmioDescend( mmIO: hmmio; pckinfo, pckinfoParent: pMMCkInfo; usFlags: Word ): Word; cdecl;
-    external LibName index 50;
-
-function mmioFlush( mmIO: hmmio; usFlags: Word ): Word; cdecl;
-    external LibName index 44;
-
-function mmioGetInfo( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
-    external LibName index 52;
-
-function mmioGetLastError( mmIO: hmmio ): Longint; cdecl;
-    external LibName index 38;
-
-function mmioInstallIOProc( fccIOProc: FourCC; pIOProc: pMMIOProc; ulFlags: Longint ): pmmIOProc; cdecl;
-    external LibName index 39;
-
-function mmioOpen( pszFileName: pChar; mmIOInfo: pmmioinfo; ulOpenFlags: Longint ): hMMIO; cdecl;
-    external LibName index 40;
-
-function mmioRead( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
-    external LibName index 41;
-
-function mmioSeek( mmIO: hmmio; lOffset, lOrigin: Longint ): Longint; cdecl;
-    external LibName index 43;
-
-function mmioSendMessage( mmIO: hmmio; usMsg: Word; lParam1, lParam2: Longint ): Longint; cdecl;
-    external LibName index 54;
-
-function mmioSetBuffer( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint; usFlags: Word ): Word; cdecl;
-    external LibName index 56;
-
-function mmioSetInfo( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
-    external LibName index 53;
-
-function mmioStringToFourCC( pszString: pChar; usFlags: Word ): FourCC; cdecl;
-    external LibName index 37;
-
-function mmioWrite( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
-    external LibName index 42;
-
-function mmioCFOpen( pszFileName: pChar; CfInfo, IOInfo: pmmcfinfo; ulFlags: Longint ): hMMCF; cdecl;
-    external LibName index 57;
-
-function mmioCFClose( mmCf: hmmcf; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 58;
-
-function mmioCFGetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
-    external LibName index 64;
-
-function mmioCFSetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
-    external LibName index 65;
-
-function mmioCFFindEntry( mmCf: hmmcf; ctocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 62;
-
-function mmioCFAddEntry( mmCf: hmmcf; cTocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 59;
-
-function mmioCFChangeEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 61;
-
-function mmioCFDeleteEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 60;
-
-function mmioCFAddElement( mmCf: hmmcf; pszElementName: pChar; fccType: FourCC;
-  pchBuffer: pChar; cchBytes: LongInt; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 63;
-
-function mmioCFCopy( mmCfSource: hmmcf; pszDestFileName: pChar; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 66;
-
-function mmioQueryFormatCount( FormatInfo: pmmformatinfo;
-  plNumFormats: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 87;
-
-function mmioGetFormats( FormatInfo: pmmformatinfo;
-  lNumFormats: LongInt; pFormatInfoList: Pointer; plFormatsRead: pLong;
-  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 88;
-
-function mmioGetFormatName( FormatInfo: pmmformatinfo; pszFormatName: pChar;
-  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 93;
-
-function mmioIdentifyFile( pszFileName: pChar; MMIoInfo: pmmioinfo;
-  FormatInfo: pmmformatinfo; pfccStorageSystem: pFourCC; ulReserved: Longint;
-  ulFlags: Longint ): Longint; cdecl;
-    external LibName index 92;
-
-function mmioQueryHeaderLength( mmIO: hmmio; plHeaderLength: pLong;
-  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 89;
-
-function mmioGetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
-  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 90;
-
-function mmioSetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
-  plBytesWritten: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 91;
-
-function mmioIniFileHandler( IniFileInfo: pmminifileinfo; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 98;
-
-function mmioIdentifyStorageSystem( pszFileName: pChar;
-  MMIoInfo: pmmioinfo; pfccStorageSystem: pFourCC ): Longint; cdecl;
-    external LibName index 100;
-
-function mmioDetermineSSIOProc( pszFileName: pChar; MMIoInfo: pmmioinfo;
-  pfccStorageSystem: pFourCC; pszParsedRemainder: pChar ): Longint; cdecl;
-    external LibName index 101;
-
-function mmioQueryIOProcModuleHandle( IOProc: pMMIOProc;
-  IOProcModule: phModule ): Longint; cdecl;
-    external LibName index 106;
-
-function mmioCFCompact( pszFileName: pChar; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 113;
-
-//--------
-function mmioMigrateIniFile( ulFlags: Longint ): Longint; cdecl;
-    external LibName index 111;
-
-//
-// MMIO CODEC APIs
-///
-
-function mmioIniFileCODEC( IniFile: pCODECIniFileInfo; ulFlags: Longint ): Longint; cdecl;
-    external LibName index 112;
-
-function mmioSet( mmIO: hmmio; ExtendInfo: pmmExtendInfo; ulFlags: Longint): Longint; cdecl;
-    external LibName index 114;
-
-function mmioQueryCODECName( IniInfo: pCODECIniFileinfo;
-  pszCODECName: pChar; pulBytesRead: pLongint ): Longint; cdecl;
-    external LibName index 115;
-
-function mmioQueryCODECNameLength( IniInfo: pCODECIniFileinfo;
-  pulNameLength: pLongint ): Longint; cdecl;
-    external LibName index 118;
-
-function mmioLoadCODECProc( IniInfo: pCODECIniFileInfo;
-  Module: phModule; ulFlags: Longint ): pCodecProc; cdecl;
-    external LibName index 117;
-
-function mmioGetData( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
-    external LibName index 119;
-
-
-end.

+ 0 - 91
packages/extra/os2units/mmtk/readme.txt

@@ -1,91 +0,0 @@
-OS/2 Multimedia Toolkit
-=======================
-
-OS/2 Multimedia toolkit is set of units to manage various parts of multimedia
-subsystem of OS/2. Not a part of standard OS/2 Multimedia:
-
-a) WarpOverlay! library interface (hwvideo.pas)
-
-MMPM/2 Documentation
---------------------
-
-OS/2 Multimedia Subsystem Programming Guide
-Provides guidelines for developing multimedia subsystems. Each subsystem
-component is described in detail in individual chapters. Models are used
-to complement the information provided by component sample program templates.
-
-OS/2 Multimedia Application Programming Guide
-Provides advisory information on application interfaces to help you select
-and implement functions for your OS/2 multimedia applications. Code examples
-from fully documented sample programs accompany the descriptions of the
-functions.
-
-OS/2 Multimedia Programming Reference
-Provides detailed information on multimedia functions, messages, and data
-structures to enable you to write code for your multimedia application
-programs and subsystems.
-
-The MMPM/2 Device Driver Reference for OS/2
-It is for subsystem developers who want to write their own physical
-device drivers (and associated virtual device drivers) to support audio
-and video adapters in the Multimedia Presentation Manager/2 system.
-
-Multimedia REXX
-Describes REXX functions that enable media control interface string commands
-to be sent from an OS/2 command file to control multimedia devices.  This
-online book is provided with OS/2 multimedia.
-
-Guide to Multimedia User Interface Design - (41G2922)
-Describes design concepts to be considered when designing a CUA multimedia
-interface that is consistent within a particular multimedia product and
-across other products.
-
-WarpOverlay!
-------------
-
-WarpOverlay! is video acceleration driver. This is original readme.txt
-(BEWARE! Most probably, Valery don't know about this port):
-
--Begin-
-Short overview:
-hwvideo.h is a main header for use WarpOverlay! video acceleration driver.
-There are no more or less suitable SDK yet, I am to lazy :(
-
-
-DEMO - small stupid example of using WarpOverlay!, currently it does not sup-
-port many features of WarpOverlay!, only basic functionality.
-it just tried to load file demo.mpg and cyclically play it.
-Used mpeg1 decoder pretty unstable and very unoptimal. This is just example.
-Many of MPEG files can crush decoder. I am not very fimilar with different
-MPEG aspects and do not want to mess with it, sorry.
-I just included one small MPEG1 file, which work well.
-
-RGB - example of using RGB (FOURCC_R565) overlay. Attention! RGB overlay
-not supported for NVidia chips and for Matrox G200.
-Known worked RGB overlay: Rage128, Radeon, i740, Savages.
-
-
-Please contact me, if you have questions/troubles with this example or with
-WarpOverlay! usage.
-
-Valery Gaynullin
-
-MPEG  decoding engine based on the Berkeley MPEG (mpegplay).
--End-
-
-Longterm plans
---------------
-
-a) Fix lot of bugs ;)
-b) Add support for IBM Multimedia Classes and CWMM Classes for WPS (as fast as
-   SOM and WPS toolkits will be presented)
-c) SEAL library interface (seal.pas) www.netlabs.org/hobbes.nmsu.edu
-   SEAL is module player library. At the present time SEAL not developing
-   anymore (for all platforms), but still very usefull for mudule music fans.
-d) DualMode Library (dual.pas) www.netlabs.org
-   DualMode library allows to use common access method as for fullscreen (MGL)
-   as for windowed (DIVE) video modes.
-e) Examples, examples, examples (tests as well)
-
-CU!
-Yuri & Andry

+ 0 - 542
packages/extra/os2units/mmtk/sw.pas

@@ -1,542 +0,0 @@
-{
-    $Id$
-    Copyright (c) 1990-1991 International Business Machines Corporation
-    Copyright (c) 2003 by Yuri Prokushev ([email protected])
-
-    This is the multimedia unit file that has the typedefs, defines and
-    function prototypes for Multimedia Applets.
-
-    This program is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Library General Public License (LGPL) as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version. This program is
-    distributed in the hope that it will be useful, but WITHOUT ANY
-    WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.
-
-    See the GNU Library General Public License for more details. You should
-    have received a copy of the GNU Library General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- **********************************************************************}
-
-{
-@abstract(OS/2 Multimedia Applets)
-@author(Yuri Prokushev ([email protected]))
-@created(19 Jan 2003)
-@lastmod(23 Jan 2003)
-This is the multimedia unit file that has the typedefs, defines and
-function prototypes for Multimedia Applets.
-Warning: This code is alfa. Future versions of this unit will propably
-not be compatible.
-}
-Unit SW;
-
-Interface
-
-Uses
-  Os2Def,
-  PmWin;
-
-Const
-  MAX_SMBDTEXT=35;
-
-  MB_ICONCUSTOM=$0001;
-
-  SC_DEFAULTSIZE=$c000;          // WM_COMMAND from SysMenu
-
-  WM_INITSECONDARYWINDOW=$0519;  // MP1: NULL, MP2: CreateParams
-
-  QS_FRAME=$1;             // Flag set to query frame
-  QS_DIALOG=$2;            // Flag set to query dialog
-
-//      #pragma pack(4)
-
-Type
-  TSMBD=record
-    achText: Array[0..MAX_SMBDTEXT + 1] of Char; // Text of the button. eg. "~Cancel"
-    idButton: Cardinal;        // Button ID returned when user chooses
-    flStyle: Longint;          // Button style or'ed with internal
-  end;
-  PSMBD=^TSMBD;
-
-  TSMBINFO=record
-    hIcon: Cardinal;           // Icon handle
-    cButtons: Cardinal;        // Number of buttons
-    flStyle: Cardinal;         // Icon style flags (MB_ICONQUESTION, etc...)
-    hwndNotify: HWND;          // Reserved
-    smbd: PSMBD;               // Array of button definitions
-  end;
-  PSMBINFO=^TSMBINFO;
-
-//      #pragma pack()
-
-// Analogous to WinDlgBox
-function WinSecondaryWindow(hwndParent: hwnd; hwndOwner: hwnd;
-  pfnDlgProc: proc; hmod: Cardinal; idDlg: Cardinal; pCreateParams: Pointer): Cardinal; cdecl;
-
-// Analogous to WinLoadDlg
-function WinLoadSecondaryWindow(hwndParent: hwnd; hwndOwner: hwnd;
-  pfnDlgProc: proc; hmod: Cardinal; idDlg: Cardinal; pCreateParams: Cardinal): hwnd; cdecl;
-
-// Analogous to WinProcessDlg
-function WinProcessSecondaryWindow(hwndSW: hwnd): Cardinal; cdecl;
-
-// Analogous to WinCreateDlg
-function WinCreateSecondaryWindow(hwndParent: hwnd; hwndOwner: hwnd;
-  pfnDlgProc: proc; idDlg: Cardinal; pCreateParams: Pointer): hwnd; cdecl;
-
-function WinDefaultSize(Wnd: hwnd): Longbool; cdecl;
-
-function WinInsertDefaultSize(Wnd: hwnd; pszDefaultSize: pChar): Longbool; cdecl;
-
-function WinQuerySecondaryhwnd(Wnd: hwnd; ulFlag: Cardinal): hwnd; cdecl;
-
-//************************************************************************/
-//* WinSecondaryMessageBox                                               */
-//*                                                                      */
-//* Parameters: HWND   hwndParent   - handle of the parent window.       */
-//*             HWND   hwndOwner    - handle of the owner window.        */
-//*             PSZ    pszText      - message text.                      */
-//*             PSZ    pszCaption   - title of the message box.          */
-//*             ULONG  idWindow     - Message box id                     */
-//*             PSMBINFO psmbinfo   - pointer to button/icon info        */
-//************************************************************************/
-function WinSecondaryMessageBox(hwndParent: hwnd; hwndOwner: hwnd;
-  pszText: pChar; pszCaption: pChar; idWindow: Cardinal; smb: psmbinfo): Cardinal; cdecl;
-
-//************************************************************************/
-//* WinDismissSecondaryWindow                                            */
-//*                                                                      */
-//* This function should be called from within the dlg proc. The hwnd    */
-//* passed in MUST be the handle to the actual dialog.                   */
-//************************************************************************/
-
-function WinDismissSecondaryWindow(hwndDlg: hwnd; ulResult: Cardinal): Longbool; cdecl;
-
-//************************************************************************/
-//* The parameter hwnd can be either the secondary window or the actual  */
-//* dialog.                                                              */
-//************************************************************************/
-
-function WinDestroySecondaryWindow(Wnd: hwnd): Longbool; cdecl;
-
-function WinDefSecondaryWindowProc(Wnd: hwnd; msg: Cardinal;
-                                 mp1: mParam; mp2: mParam): mResult; cdecl;
-
-//************************************************************************/
-//*                         Graphic Buttons                              */
-//************************************************************************/
-
-//************************************************************************/
-//* Notes on Using GraphicButtons                                        */
-//*                                                                      */
-//* GraphicButton CONTROL DATA                                           */
-//*                                                                      */
-//*  The format of the control data for GraphicButtons is                */
-//*         "button Text, number of bitmaps, bitmap resource id's ..."   */
-//*                                                                      */
-//*                                                                      */
-//*  Following are two example window templates of GraphicButtons:       */
-//*                                                                      */
-//*      1)  CONTROL  "", IDD_MP_REV, 120, 10, TS_PB_WIDTH, TS_PB_HEIGHT,*/
-//*                 WC_GRAPHICBUTTON,                                    */
-//*                 GBS_TWOSTATE | GBS_HILITEBITMAP |                    */
-//*                 WS_VISIBLE | WS_TABSTOP                              */
-//*                 CTLDATA GB_RESOURCE,"~REV", 2, ID_MP_REV1, ID_MP_REV0*/
-//*                                                                      */
-//*  The above graphicbutton has id IDD_MP_REV and is of type            */
-//*  GBS_TWOSTATE and GBS_HILITEBITMAP.  The GBS_HILITEBITMAP allows     */
-//*  a different bitmap to be displayed when the button is in the        */
-//*  hilite state. The graphicbutton will be displayed with text         */
-//*  "REV" and has "R" as the mnemonic.  It has 2 bitmaps associated     */
-//*  with it.  Their resource id are ID_MP_REV1 and ID_MP_REV0.          */
-//*                                                                      */
-//*                                                                      */
-//*      2)   CONTROL  "", IDD_MP_PLAY, 175, 10, TS_PB_WIDTH,            */
-//*                        TS_PB_HEIGHT, WC_GRAPHICBUTTON,               */
-//*                        GBS_AUTOTWOSTATE | GBS_AUTOANIMATION |        */
-//*                        WS_VISIBLE | WS_TABSTOP                       */
-//*                        CTLDATA GB_RESOURCE, "~PLAY", 9,              */
-//*                                ID_MP_STOP0, ID_MP_PLAY1, ID_MP_PLAY2,*/
-//*                                ID_MP_PLAY3, ID_MP_PLAY4, ID_MP_PLAY5,*/
-//*                                ID_MP_PLAY6, ID_MP_PLAY7, ID_MP_REV1  */
-//*                                                                      */
-//*  The above graphicbutton has id IDD_MP_PLAY and is of type           */
-//*  GBS_AUTOTWOSTATE and GBS_AUTOANIMATE.  When clicked upon,           */
-//*  the button will automatically toggle the state and animation.       */
-//*  The graphicbutton will be displayed with text "PLAY"                */
-//*  and mnemonic "P".  It has 9 bitmaps associated with it.             */
-//*                                                                      */
-//*                                                                      */
-//*                                                                      */
-//*  GraphicButton Painting                                              */
-//*                                                                      */
-//*  Due to the PM design, whenever a graphicbutton is clicked,          */
-//*  it is sent a BN_PAINT (to paint a non-hilite state) and then        */
-//*  BN_CLICKED.  Thus, for GBS_AUTO* style graphicbuttons, a paint      */
-//*  request is generated before the button has a chance to change       */
-//*  its state (BN_CLICKED).  To avoid this premature painting,          */
-//*  code was inserted to delay the painting of graphicbuttons           */
-//*  GB_PAINT_RESOLUTION milliseconds whenever the button is switching   */
-//*  FROM the hilite paint state.                                        */
-//*                                                                      */
-//************************************************************************/
-
-Function WinRegisterGraphicButton: Longbool; cdecl;
-
-Const
-  WC_GRAPHICBUTTON=PChar($ffff0040);
-
-//************************************************************************/
-//*             GraphicButton Animation/TwoState constants               */
-//************************************************************************/
-
-//************************************************************************/
-//*                     Graphic Button Style bits                        */
-//************************************************************************/
-
-  GBS_TWOSTATE                  = $1000;       // indicates TwoState button
-  GBS_AUTOTWOSTATE              = $2000;       // will auto toggle state up/down
-  GBS_ANIMATION                 = $4000;       // indicates Animatable button
-  GBS_AUTOANIMATION             = $8000;       // will auto toggle anim. on/off
-  GBS_DISABLEBITMAP             = $0010;       // allows a diff. bitmap when disabled
-  GBS_HILITEBITMAP              = $0020;       // allows a diff. bitmap when hilited
-  GBS_3D_TEXTRECESSED           = $0040;       // display text in 3-D recessed
-  GBS_3D_TEXTRAISED             = $0080;       // display text in 3-D raised
-  GBS_MINIBUTTON                = $0001;       // mini button style
-
-//************************************************************************/
-//*                     Graphic Button User Constants                    */
-//************************************************************************/
-
-//************************************************************************/
-//* Codes to reference allowed GraphicButton states (or paint states)    */
-//************************************************************************/
-
-  GB_ERROR                      = -1;          // GraphicButton Error
-  GB_UP                         = 1;           // GraphicButton up (and paint) state
-  GB_DOWN                       = 2;           // GraphicButton down (and paint) state
-  GB_DISABLE                    = 3;           // GraphicButton disabled state
-  GB_HILITE                     = 4;           // GraphicButton paint state only
-  GB_OUTOFHILITE                = 5;           // Changing out of hilite paint state
-
-//************************************************************************/
-//* Codes for various GraphicButton message function parameters          */
-//************************************************************************/
-
-  GB_TOGGLE                     = 10;          // GraphicButton toggle
-  GB_CURRENTSTATE               = 11;          // GraphicButton's current state
-  GB_ANIMATIONBEGIN             = 12;          // when refering to index of anim start
-  GB_ANIMATIONEND               = 13;          // when refering to index of anim end
-  GB_MAXINDEX                   = 14;          // GraphicButton max. index
-
-//************************************************************************/
-//* Codes to set/query text position relative to the bitmap              */
-//************************************************************************/
-
-  GB_TEXTBELOW                  = 1;           // place text below bitmap
-  GB_TEXTABOVE                  = 2;           // place text above bitmap
-
-//************************************************************************/
-//* Codes used to set the animation frame with message GBM_SETBITMAPINDEX*/
-//************************************************************************/
-
-  GB_INDEX_FORWARD              = -1;          // advance one frame foward
-  GB_INDEX_BACKWARD             = -2;          // advance one frame backwards
-  GB_INDEX_FIRST                = -3;          // set to first frame of sequence
-  GB_INDEX_LAST                 = -4;          // set to last frame of sequence
-
-//  #pragma pack(1)
-
-type
-  TgbtnCdata = packed record
-    usReserved: Word;
-    pszText: PChar;
-    hmod: Cardinal;
-    cBitmaps: Word;
-    aidBitmap: Array[0..1] of Word;
-  end;
-  pgbtnCdata = ^TgbtnCdata;
-
-//#pragma pack()
-
-const
-  GB_RESOURCE                   = 1;
-  GB_STRUCTURE                  = 0;
-
-
-//************************************************************************/
-//*          Notification Messages received by GraphicButton Parent      */
-//***********************************************************************/
-//************************************************************************/
-//* GBN_BUTTONDOWN, GBN_BUTTONUP, and GBN_BUTTONHILITE                   */
-//*                                                                      */
-//* The notification messages are passed as part of the WM_CONTROL       */
-//* message.                                                             */
-//*                                                                      */
-//* msg = WM_CONTROL                                                     */
-//* mp1 = MPFROM2SHORT(gpb_id, button_state)                             */
-//*         gpd_id       = identity of the displayed graphic pushbutton  */
-//*         button_state = GBN_BUTTONUP, GBN_BUTTONDOWN, or              */
-//*                        GBN_BUTTONHILITE                              */
-//*                                                                      */
-//************************************************************************/
-
-  GBN_BUTTONUP                  = $0524;
-  GBN_BUTTONDOWN                = $0525;
-  GBN_BUTTONHILITE              = $0526;
-  GBN_SETFOCUS                  = $0527;   // mp2 TRUE for gaining focus
-
-//************************************************************************/
-//*          Messages to GraphicButton Windows                           */
-//************************************************************************/
-
-//************************************************************************/
-//*                             GBM_SETGRAPHICDATA                       */
-//************************************************************************/
-//* mp1 = MPFROMP((PGBTNCDATA)&gbtncdata);    Graphic button control data*/
-//* mp2 = NULL;                               not used                   */
-//*                                                                      */
-//* WARNING: This message resets all button parameters.                  */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_SETGRAPHICDATA            = $052A;
-
-//************************************************************************/
-//*                             GBM_ANIMATE                              */
-//************************************************************************/
-//* mp1 = MPFROMSHORT(fStart)      TRUE to start animation, FALSE to stop*/
-//* mp2 = MPFROMSHORT(fContinue)   TRUE continue anim. at currently      */
-//*                                displayed bitmap, FALSE restart at    */
-//*                                the beginning.                        */
-//*                                                                      */
-//* Returns TRUE on Success                                              */
-//*         FALSE on Failure                                             */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_ANIMATE                   = $052B;
-
-//************************************************************************/
-//*                             GBM_SETANIMATIONRATE                     */
-//************************************************************************/
-//* mp1 = MPFROMSHORT(ULmIL);      Animation rate in milliseconds        */
-//* mp2 = NULL                     not used                              */
-//*                                                                      */
-//*                                                                      */
-//* Returns TRUE on Success                                              */
-//*         FALSE on Failure                                             */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_SETANIMATIONRATE          = $052C;
-
-//************************************************************************/
-//*                             GBM_QUERYANIMATIONACTIVE                 */
-//************************************************************************/
-//* mp1 = NULL;                    not used                              */
-//* mp2 = NULL;                    not used                              */
-//*                                                                      */
-//*                                                                      */
-//* Returns TRUE if animation is active, else GB_ERROR                   */
-//*                                                                      */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_QUERYANIMATIONACTIVE      = $052D;
-
-//************************************************************************/
-//*                             GBM_QUERYANIMATIONRATE                   */
-//************************************************************************/
-//* mp1 = NULL;                    not used                              */
-//* mp2 = NULL;                    not used                              */
-//*                                                                      */
-//*                                                                      */
-//* Returns ULONG sepcifying animation rate in milliseconds              */
-//*                                                                      */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_QUERYANIMATIONRATE        = $052E;
-
-//************************************************************************/
-//*                             GBM_SETBITMAPINDEX                       */
-//************************************************************************/
-//* mp1 = MPFROMSHORT(usGB_State)       Bitmap index to change           */
-//*             GB_UP,                                                   */
-//*             GB_DOWN,                                                 */
-//*             GB_DISABLE,                                              */
-//*             GB_HILITE,                                               */
-//*             GB_ANIMATIONBEGIN,                                       */
-//*             GB_ANIMATIONEND,                                         */
-//*          or GB_CURRENTSTATE    chng current state (up or down) bitmap*/
-//* mp2 = MPFROMSHORT(sFrameCode)  Set according to code or frame desire */
-//*             GB_INDEX_FORWARD,  chng to next bitmap in circular array */
-//*             GB_INDEX_BACKWARD, "   "  prev   "    "     "       "    */
-//*             GB_INDEX_FIRST,    "   "  first  "    "     "       "    */
-//*             GB_INDEX_LAST,     "   "  last   "    "     "       "    */
-//*          or desired_bitmap     otherwise desired bmp index specified */
-//*                                                                      */
-//* Returns TRUE on Success, otherwise FALSE                             */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_SETBITMAPINDEX            = $052F;
-
-//************************************************************************/
-//*                             GBM_QUERYBITMAPINDEX                     */
-//************************************************************************/
-//*  mp1 = MPFROMSHORT(usGB_State)       Query bitmap index              */
-//*            GB_UP,                                                    */
-//*            GB_DOWN,                                                  */
-//*            GB_DISABLE,                                               */
-//*            GB_HILITE,                                                */
-//*            GB_ANIMATIONBEGIN,                                        */
-//*            GB_ANIMATIONEND,                                          */
-//*         or GB_CURRENTSTATE  query current state (up or down) bitmap  */
-//*  mp2 = NULL;                    not used                             */
-//*                                                                      */
-//*  Returns USHORT specifying the index                                 */
-//*                                                                      */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_QUERYBITMAPINDEX          = $0530;
-
-//************************************************************************/
-//*                             GBM_SETSTATE                             */
-//************************************************************************/
-//* mp1 = MPFROMSHORT(usStateCode)   Set twostate button to specified    */
-//*                                  state                               */
-//*             GB_UP,                                                   */
-//*             GB_DOWN,                                                 */
-//*          or GB_TOGGLE          toggle (up/down) to (down/up)         */
-//* mp2 = MPFROMBOOL(fRepaint)     TRUE  - state changed and displayed   */
-//*                                FALSE - state changed, not displayed  */
-//*                                                                      */
-//* Returns TRUE on Success                                              */
-//*         FALSE on Failure                                             */
-//*                                                                      */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_SETSTATE                  = $0531;
-
-//************************************************************************/
-//*                             GBM_QUERYSTATE                           */
-//************************************************************************/
-//*                                                                      */
-//* mp1 = NULL                        not used                           */
-//* mp2 = NULL                        not used                           */
-//*                                                                      */
-//* Returns the state (GB_UP or GB_DOWN) else GB_ERROR.                  */
-//*                                                                      */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_QUERYSTATE                = $0532;
-
-//************************************************************************/
-//*                             GBM_SETTEXTPOSITION                      */
-//************************************************************************/
-//* mp1 = MPFROMSHORT(usTextPos)   How to position text relative to      */
-//*                                  bitmap                              */
-//*               GB_TEXTBELOW,                                          */
-//*            or GB_TEXTABOVE                                           */
-//*   mp2 = NULL                     not used                            */
-//*                                                                      */
-//*   Returns TRUE on Success, otherwise FALSE                           */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_SETTEXTPOSITION           = $0533;
-
-//************************************************************************/
-//*                             GBM_QUERYTEXTPOSITION                    */
-//************************************************************************/
-//*                                                                      */
-//*  mp1 = NULL                          not used                        */
-//*  mp2 = NULL                          not used                        */
-//*                                                                      */
-//*  Returns GB_TEXTBELOW, GB_TEXTABOVE, GB_TEXTRIGHT, GB_TEXTLEFT       */
-//*  on success, otherwise FALSE                                         */
-//*                                                                      */
-//************************************************************************/
-
-  GBM_QUERYTEXTPOSITION         = $0534;
-
-//************************************************************************/
-//*                             GraphicButton END                        */
-//************************************************************************/
-
-  MM_TABHELP                    = $054C;
-
-Implementation
-
-function WinSecondaryWindow(hwndParent: hwnd; hwndOwner: hwnd;
-  pfnDlgProc: proc; hmod: Cardinal; idDlg: Cardinal; pCreateParams: Pointer): Cardinal; cdecl;
-    external 'SW' index 1;
-
-function WinLoadSecondaryWindow(hwndParent: hwnd; hwndOwner: hwnd;
-  pfnDlgProc: proc; hmod: Cardinal; idDlg: Cardinal; pCreateParams: Cardinal): hwnd; cdecl;
-    external 'SW' index 2;
-
-function WinProcessSecondaryWindow(hwndSW: hwnd): Cardinal; cdecl;
-    external 'SW' index 3;
-
-function WinCreateSecondaryWindow(hwndParent: hwnd; hwndOwner: hwnd;
-  pfnDlgProc: proc; idDlg: Cardinal; pCreateParams: Pointer): hwnd; cdecl;
-    external 'SW' index 4;
-
-function WinDefaultSize(Wnd: hwnd): Longbool; cdecl;
-    external 'SW' index 11;
-
-function WinInsertDefaultSize(Wnd: hwnd; pszDefaultSize: pChar): Longbool; cdecl;
-    external 'SW' index 12;
-
-function WinQuerySecondaryhwnd(Wnd: hwnd; ulFlag: Cardinal): hwnd; cdecl;
-    external 'SW' index 52;
-
-function WinSecondaryMessageBox(hwndParent: hwnd; hwndOwner: hwnd;
-  pszText: pChar; pszCaption: pChar; idWindow: Cardinal; smb: psmbinfo): Cardinal; cdecl;
-    external 'SW' index 5;
-
-function WinDismissSecondaryWindow(hwndDlg: hwnd; ulResult: Cardinal): Longbool; cdecl;
-    external 'SW' index 6;
-
-function WinDestroySecondaryWindow(Wnd: hwnd): Longbool; cdecl;
-    external 'SW' index 7;
-
-function WinDefSecondaryWindowProc(Wnd: hwnd; msg: Cardinal;
-                                 mp1: mParam; mp2: mParam): mResult; cdecl;
-    external 'SW' index 8;
-
-Function WinRegisterGraphicButton: Longbool; cdecl;
-    external 'SW' index 14;
-
-End.
-
-{
-$Log$
-Revision 1.1  2003-02-15 16:59:09  hajny
-  * mmtk directory corrected to lowercase
-
-Revision 1.1  2003/02/09 13:49:06  hajny
-  + mmtk added
-
-}
-
-{ No information about following functions
-  Index   Name
-³ 00009 ³ WinQuerySecondaryFrame
-³ 00010 ³ WinQuerySecondaryDialog
-³ 00013 ³ WinRegisterCircularSlider
-³ 00053 ³ WinQueryDefaultSize
-³ 00057 ³ WinSWAssocResModule
-³ 00060 ³ WinReportMessage
-³ 00061 ³ WinRegisterSelectionSlider
-³ 00067 ³ WinRegisterCircularSlider2
-}