mmbase.pas 144 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276
  1. {
  2. $Id$
  3. Copyright (c) 1990-1993 International Business Machines Corporation
  4. Copyright (c) 2002 by Andry Svirgunov ([email protected])
  5. Copyright (c) 2002-2003 by Yuri Prokushev ([email protected])
  6. OS/2 Multimedia structures and definitions
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU Library General Public License (LGPL) as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version. This program is
  11. distributed in the hope that it will be useful, but WITHOUT ANY
  12. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE.
  14. See the GNU Library General Public License for more details. You should
  15. have received a copy of the GNU Library General Public License along
  16. with this program; if not, write to the Free Software Foundation, Inc.,
  17. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. **********************************************************************}
  19. {
  20. @abstract(Multimedia structures and definitions)
  21. @author(Andry Svirgunov ([email protected]))
  22. @author(Yuri Prokushev ([email protected]))
  23. @created(17 Dec 2002)
  24. @lastmod(19 Jan 2003)
  25. OS/2 Multimedia structures and definitions
  26. Warning: This code is alfa. Future versions of this unit will propably
  27. not be compatible.
  28. }
  29. //****************************************************************************/
  30. //* */
  31. //* Module Name: MMBase.pas */
  32. //* */
  33. //* OS/2 2.0 Multimedia Extensions Base Definitions */
  34. //* */
  35. //* Copyright (c) International Business Machines Corporation 1991, 1992 */
  36. //* All Rights Reserved */
  37. //* */
  38. //*------------------------------------------------------------------------- */
  39. //* Converted by Andry Svirgunov. Email: [email protected] */
  40. //* 14.11.2002. */
  41. //* Revised by Yuri Prokushev ([email protected]) */
  42. //****************************************************************************/
  43. Unit mmbase;
  44. {$MODE ObjFPC}
  45. Interface
  46. Uses Os2Def;
  47. Type
  48. VERSION = WORD;
  49. LPSTR = ^Char;
  50. LPTR = Pointer;
  51. LPRECT = Pointer;
  52. HANDLE = HWND;
  53. PW = ^Word;
  54. PAW = ^Word;
  55. PFN = Pointer ;
  56. PPFN = ^PFN;
  57. type
  58. FNMCI=Function(var p,w:Word;a,b,c:LongInt):Longint;
  59. TYPE
  60. PFNMCI = ^FNMCI;
  61. SZ = Char; //* ASCIIZ char string type*/
  62. MMTIME = LongInt; //* universal Chinatown time (1/3000 second)*/
  63. PMMTIME = ^MMTIME; //* Ptr to MMTIME unit*/
  64. HMMIO = LongInt; //* Handle to an MMIO object*/
  65. PHMMIO = ^HMMIO; //* Handle to an MMIO object*/
  66. TYPE
  67. FOURCC=Cardinal;
  68. //**********************************************
  69. //*
  70. //* SPCBKEY - Stream Protocol Key
  71. //*
  72. //**********************************************/
  73. Type _SPCBKEY = record //* spcbkey SPCB key (Stream data type) */
  74. ulDataType : LongInt;
  75. ulDataSubType : LongInt;
  76. ulIntKey : LongInt; //* generated internal key */
  77. end;
  78. TYPE PSPCBKEY = ^_SPCBKEY;
  79. Const
  80. _SPCBKEY_DEFINED = 1;
  81. //**********************************************
  82. // *
  83. // * MMTRACKINFO - This structure is used to
  84. // * represent a video, audio or
  85. // * some other type of track
  86. // * within a digital video movie
  87. // * file.
  88. // *
  89. // **********************************************/
  90. TYPE _MMTRACKINFO = record //* mmtrackinfo */
  91. ulTrackID : LongInt; //* track identifier */
  92. ulMediaType : LongInt; //* media type */
  93. ulCountry : LongInt; //* country code for the track */
  94. ulCodePage : LongInt; //* country code page for the track */
  95. ulReserved1: LongInt; //* reserved must be 0 */
  96. ulReserved2 : LongInt; //* reserved must be 0 */
  97. end;
  98. TYPE PMMTRACKINFO = ^_MMTRACKINFO; //* Ptr to a track table entry */
  99. //************************
  100. // * Clipboard formats
  101. // ************************/
  102. CONST
  103. CF_RMID = 10;
  104. CF_RIFF = 11;
  105. CF_WAVE = 12;
  106. CF_AVI = 13;
  107. //************************
  108. // * Resource formats
  109. // ************************/
  110. RT_RMID = 100;
  111. RT_RIFF = 101;
  112. RT_WAVE = 102;
  113. RT_AVI = 103;
  114. RT_AVS = 104;
  115. //************************
  116. // * Drag formats
  117. // ************************/
  118. DRT_WAVE = 'DIGITAL AUDIO';
  119. DRT_AVI = 'DIGITAL VIDEO';
  120. DRT_MIDI = 'MIDI';
  121. //************************
  122. // * Sampling Rate
  123. // ************************/
  124. HZ_8000 = 8000; //* 8.0 kHz*/
  125. HZ_11025 = 11025; //* 11.025 kHz*/
  126. HZ_14700 = 14700; //* 14.700 kHz (SPV/2)*/
  127. HZ_18900 = 18900; //* 18.900 kHz (CD/XA LVL C)*/
  128. HZ_22050 = 22050; //* 22.050 kHz*/
  129. HZ_37800 = 37800; //* 37.800 kHz (CD/XA LVL B)*/
  130. HZ_44100 = 44100; //* 44.100 kHz*/
  131. //************************
  132. // * Bits per Sample
  133. // ************************/
  134. BPS_4 = 4; //* 4 bits/sample (ADPCM)*/
  135. BPS_8 = 8; //* 8 bits/sample (PCM)*/
  136. BPS_16 =16; //* 16 bits/sample(PCM)*/
  137. //************************
  138. //* Channels
  139. //************************/
  140. CH_1 = 1; //* Mono*//
  141. CH_2 = 2; //* Stereo*//
  142. CH_4 = 4; //* Quad*//
  143. //*************************************************************************
  144. // * Multimedia Datatypes (spcbkey values)
  145. // *************************************************************************/
  146. ///****************
  147. // * NULL datatype
  148. // ****************/
  149. DATATYPE_NULL = $0000; //* NULL stream data type (NULL)*/
  150. SUBTYPE_NONE = $0000; //* No subtype for this data type*/
  151. //*********************
  152. // * WAVEFORM datatypes
  153. // *********************/
  154. DATATYPE_WAVEFORM = $0001; //* WAVEFORM audio (PCM)*/
  155. //* Subtypes for DATATYPE_WAVEFORM:*/
  156. WAVE_FORMAT_1M08 = $0001; //* 11.025kHz, Mono , 8-bit*/
  157. WAVE_FORMAT_1S08 = $0002; //* 11.025kHz, Stereo, 8-bit*/
  158. WAVE_FORMAT_1M16 = $0003; //* 11.025kHz, Mono , 16-bit*/
  159. WAVE_FORMAT_1S16 = $0004; //* 11.025kHz, Stereo, 16-bit*/
  160. WAVE_FORMAT_2M08 = $0005; //* 22.05kHz , Mono , 8-bit*/
  161. WAVE_FORMAT_2S08 = $0006; //* 22.05kHz , Stereo, 8-bit*/
  162. WAVE_FORMAT_2M16 = $0007; //* 22.05kHz , Mono , 16-bit*/
  163. WAVE_FORMAT_2S16 = $0008; //* 22.05kHz , Stereo, 16-bit*/
  164. WAVE_FORMAT_4M08 = $0009; //* 44.1kHz , Mono , 8-bit*/
  165. WAVE_FORMAT_4S08 = $000A; //* 44.1kHz , Stereo, 8-bit*/
  166. WAVE_FORMAT_4M16 = $000B; //* 44.1kHz , Mono , 16-bit*/
  167. WAVE_FORMAT_4S16 = $000C; //* 44.1kHz , Stereo, 16-bit*/
  168. WAVE_FORMAT_8M08 = $000D; //* 8.0kHz , Mono , 8-bit*/
  169. WAVE_FORMAT_8S08 = $000E; //* 8.0kHz , Stereo, 8-bit*/
  170. WAVE_FORMAT_8M16 = $000F; //* 8.0kHz , Mono , 16-bit*/
  171. WAVE_FORMAT_8S16 = $0010; //* 8.0kHz , Stereo, 16-bit*/
  172. //*********************
  173. // * DIGVIDEO datatypes
  174. // *********************/
  175. DATATYPE_DIGVIDEO = $0002; //* Digital Video */
  176. //* Subtypes for DATATYPE_DIGVIDEO:*/
  177. DIGVIDEO_PHOTOM = $544F4850; //* Photmotion video, FOURCC value for phio */
  178. DIGVIDEO_ULTIM = $49544C55; //* Ultimotion video, FOURCC value for ulio */
  179. DIGVIDEO_AVI = $20495641; //* AVI video, FOURCC value for avio */
  180. DIGVIDEO_MONITOR = $206E6FD; //* MONITOR video, FOURCC value for monitoring */
  181. DIGVIDEO_FLC = $63696C66; //* FLIC video, FOURCC value for flic */
  182. DIGVIDEO_MPEG = $4745504D; //* MPEG video, FOURCC value for MPEG */
  183. //******************
  184. // * MuLaw datatypes
  185. //******************/
  186. DATATYPE_MULAW = $0101; //* MuLaw*/
  187. DATATYPE_RIFF_MULAW = $0007; //* MuLaw*/
  188. //* Subtypes for DATATYPE_MULAW:*/
  189. MULAW_8B8KS = $0001; //* 8bit 8kHz stereo*/
  190. MULAW_8B11KS = $0002; //* 8bit 11kHz stereo*/
  191. MULAW_8B22KS = $0003; //* 8bit 22kHz stereo*/
  192. MULAW_8B44KS = $0004; //* 8bit 44kHz stereo*/
  193. MULAW_8B8KM = $0005; //* 8bit 8kHz mono*/
  194. MULAW_8B11KM = $0006; //* 8bit 11kHz mono*/
  195. MULAW_8B22KM = $0007; //* 8bit 22kHz mono*/
  196. MULAW_8644KM = $0008; //* 8bit 44kHz mono*/
  197. //*****************
  198. // * ALaw datatypes
  199. // *****************/
  200. DATATYPE_ALAW = $0102; //* ALaw*/
  201. DATATYPE_RIFF_ALAW = $0006; //* ALaw*/
  202. //* Subtypes for DATATYPE_ALAW:*/
  203. ALAW_8B8KS = $0001; //* 8bit 8kHz stereo*/
  204. ALAW_8B11KS = $0002; //* 8bit 11kHz stereo*/
  205. ALAW_8B22KS = $0003; //* 8bit 22kHz stereo*/
  206. ALAW_8B44KS = $0004; //* 8bit 44kHz stereo*/
  207. ALAW_8B8KM = $0005; //* 8bit 8kHz mono*/
  208. ALAW_8B11KM = $0006; //* 8bit 11kHz mono*/
  209. ALAW_8B22KM = $0007; //* 8bit 22kHz mono*/
  210. ALAW_8B44KM = $0008; //* 8bit 44kHz mono*/
  211. //*******************************
  212. // * AVC ADPCM WAVEFORM datatypes
  213. // *******************************/
  214. DATATYPE_ADPCM_AVC = $0103; //* ADPCM audio*/
  215. //* Subtypes for DATATYPE_ADPCM_AVC:*/
  216. ADPCM_AVC_VOICE = $0001;
  217. ADPCM_AVC_MUSIC = $0002;
  218. ADPCM_AVC_STEREO = $0003;
  219. ADPCM_AVC_HQ = $0004;
  220. //******************
  221. // * CT_ADPCM datatypes
  222. // ******************/
  223. DATATYPE_CT_ADPCM = $0200; //* Creative technologies */
  224. //* Subtypes for DATATYPE_CT_ADPCM:*/
  225. CD_ADPCM_16B8KS = $0001; //* 16bit 8kHz stereo*/
  226. CD_ADPCM_16B11KS = $0002; //* 16bit 11kHz stereo*/
  227. CD_ADPCM_16B22KS = $0003; //* 16bit 22kHz stereo*/
  228. CD_ADPCM_16B44KS = $0004; //* 16bit 44kHz stereo*/
  229. CD_ADPCM_16B8KM = $0005; //* 16bit 8kHz mono*/
  230. CD_ADPCM_16B11KM = $0006; //* 16bit 11kHz mono*/
  231. CD_ADPCM_16B22KM = $0007; //* 16bit 22kHz mono*/
  232. CD_ADPCM_16B44KM = $0008; //* 16bit 44kHz mono*/
  233. //****************
  234. // * MIDI datatype
  235. // ****************/
  236. DATATYPE_MIDI = $0201; //* MIDI*/
  237. //* SUBTYPE_NONE 0x0000L No subtype for this data type*/
  238. //********************
  239. // * GENERIC datatypes
  240. // ********************/
  241. DATATYPE_GENERIC = $0202; //* Generic for files / memory. This*/
  242. //* datatype will match any other*/
  243. //* datatype at stream creation time.*/
  244. //**************************
  245. // * Speech Viewer datatypes
  246. // **************************/
  247. DATATYPE_SPV2 = $0203; //* Speech Viewer*/
  248. //* Subtypes for DATATYPE_SPV2:*/
  249. SPV2_BPCM = $0001;
  250. SPV2_PCM = $0002;
  251. SPV2_NONE = $0003;
  252. //******************
  253. // * CD-XA datatypes
  254. // ******************/
  255. DATATYPE_CDXA_VIDEO = $0204; //* CD-XA Video datatype*/
  256. DATATYPE_CDXA_DATA = $0205; //* CD-XA sub-band data datatype*/
  257. DATATYPE_CDXA_AUDIO = $0206; //* CD-XA ADPCM Audio datatype*/
  258. DATATYPE_CDXA_AUDIO_HD = $0207; //* CD-XA ADPCM Audio with Headers*/
  259. DATATYPE_CDXA_HEADERS = $0208; //* CD-XA Headers and Subheaders*/
  260. //* Subtypes for DATATYPE_CDXA_AUDIO:*/
  261. DATATYPE_LEVELB = $0000; //* LEVEL B Audio Stereo*/
  262. DATATYPE_LEVELC = $0001; //* LEVEL C Audio Stereo*/
  263. DATATYPE_LEVELB_MONO = $0002; //* LEVEL B Audio Mono*/
  264. DATATYPE_LEVELC_MONO = $0003; //* LEVEL C Audio Mono*/
  265. //*********************
  266. // * DIGISPEECH datatype
  267. // *********************/
  268. DATATYPE_DIGISPEECH = $0208; //* DIGISPEECH */
  269. DATATYPE_NATIVE = $0001; //* Native digispeech */
  270. //*********************
  271. // * MPEG-1 Audio datatypes
  272. // *********************/
  273. DATATYPE_MPEG1AUDIO = $0050; //* MPEG-1 Audio */
  274. //* Subtypes for DATATYPE_MPEG1AUDIO:*/
  275. MPEG1_FORMAT_3M16 = $0001; //* 32.000kHz, Mono , 16-bit*/
  276. MPEG1_FORMAT_3S16 = $0002; //* 32.000kHz, Stereo, 16-bit*/
  277. MPEG1_FORMAT_4M16 = $0003; //* 44.1/48kHz, Mono , 16-bit*/
  278. MPEG1_FORMAT_4S16 = $0004; //* 44.1/48kHz, Stereo, 16-bit*/
  279. //*******************
  280. // * UNKNOWN datatype
  281. // *******************/
  282. DATATYPE_UNKNOWN = $FFFFFFFF; //* Unknown datatype */
  283. //* SUBTYPE_NONE 0x0000L No subtype for this data type*/
  284. // ERROR CODES
  285. CONST
  286. NO_ERROR = 0;
  287. //*****************************************/
  288. //* MCI Device Manager Error Return codes */
  289. //*****************************************/
  290. CONST
  291. MCIERR_BASE = 5000;
  292. MCIERR_SUCCESS = 0;
  293. MCIERR_INVALID_DEVICE_ID =(MCIERR_BASE + 1);
  294. MCIERR_NO_MASTER =(MCIERR_BASE + 2);
  295. MCIERR_UNRECOGNIZED_KEYWORD =(MCIERR_BASE + 3);
  296. MCIERR_MASTER_CONFLICT =(MCIERR_BASE + 4);
  297. MCIERR_UNRECOGNIZED_COMMAND =(MCIERR_BASE + 5);
  298. MCIERR_HARDWARE =(MCIERR_BASE + 6);
  299. MCIERR_INVALID_DEVICE_NAME =(MCIERR_BASE + 7);
  300. MCIERR_OUT_OF_MEMORY =(MCIERR_BASE + 8);
  301. MCIERR_DEVICE_OPEN =(MCIERR_BASE + 9);
  302. MCIERR_CANNOT_LOAD_DRIVER =(MCIERR_BASE + 10);
  303. MCIERR_MISSING_COMMAND_STRING =(MCIERR_BASE + 11);
  304. MCIERR_PARAM_OVERFLOW =(MCIERR_BASE + 12);
  305. MCIERR_MISSING_STRING_ARGUMENT =(MCIERR_BASE + 13);
  306. MCIERR_BAD_INTEGER =(MCIERR_BASE + 14);
  307. MCIERR_PARSER_INTERNAL =(MCIERR_BASE + 15);
  308. MCIERR_DRIVER_INTERNAL =(MCIERR_BASE + 16);
  309. MCIERR_MISSING_PARAMETER =(MCIERR_BASE + 17);
  310. MCIERR_UNSUPPORTED_FUNCTION =(MCIERR_BASE + 18);
  311. MCIERR_FILE_NOT_FOUND =(MCIERR_BASE + 19);
  312. MCIERR_DEVICE_NOT_READY =(MCIERR_BASE + 20);
  313. MCIERR_INTERNAL =(MCIERR_BASE + 21);
  314. MCIERR_DRIVER =(MCIERR_BASE + 22);
  315. MCIERR_CANNOT_USE_ALL =(MCIERR_BASE + 23);
  316. MCIERR_MULTIPLE =(MCIERR_BASE + 24);
  317. MCIERR_EXTENSION_NOT_FOUND =(MCIERR_BASE + 25);
  318. MCIERR_OUTOFRANGE =(MCIERR_BASE + 26);
  319. MCIERR_CANNOT_ADD_ALIAS =(MCIERR_BASE + 27);
  320. MCIERR_FLAGS_NOT_COMPATIBLE =(MCIERR_BASE + 28);
  321. MCIERR_CANNOT_USE_NOUNLOAD =(MCIERR_BASE + 29);
  322. MCIERR_FILE_NOT_SAVED =(MCIERR_BASE + 30);
  323. MCIERR_DEVICE_TYPE_REQUIRED =(MCIERR_BASE + 31);
  324. MCIERR_DEVICE_LOCKED =(MCIERR_BASE + 32);
  325. MCIERR_DUPLICATE_ALIAS =(MCIERR_BASE + 33);
  326. MCIERR_INSTANCE_INACTIVE =(MCIERR_BASE + 34);
  327. MCIERR_COMMAND_TABLE =(MCIERR_BASE + 35);
  328. MCIERR_INI_FILE_LOCKED =(MCIERR_BASE + 37);
  329. MCIERR_NO_AUDIO_SUPPORT =(MCIERR_BASE + 40);
  330. MCIERR_NOT_IN_PM_SESSION =(MCIERR_BASE + 41);
  331. MCIERR_DUPLICATE_KEYWORD =(MCIERR_BASE + 42);
  332. MCIERR_COMMAND_STRING_OVERFLOW =(MCIERR_BASE + 43);
  333. MCIERR_DRIVER_PROC_NOT_FOUND =(MCIERR_BASE + 44);
  334. MCIERR_INVALID_DEVICE_TYPE =(MCIERR_BASE + 45);
  335. MCIERR_INVALID_DEVICE_ORDINAL =(MCIERR_BASE + 46);
  336. MCIERR_HEADPHONES_NOT_SET =(MCIERR_BASE + 47);
  337. MCIERR_SPEAKERS_NOT_SET =(MCIERR_BASE + 48);
  338. MCIERR_SOUND_NOT_SET =(MCIERR_BASE + 49);
  339. MCIERR_INVALID_BUFFER =(MCIERR_BASE + 50);
  340. MCIERR_INVALID_MEDIA_TYPE =(MCIERR_BASE + 51);
  341. MCIERR_INVALID_CONNECTOR_INDEX =(MCIERR_BASE + 52);
  342. MCIERR_NO_CONNECTION =(MCIERR_BASE + 53);
  343. MCIERR_INVALID_FLAG =(MCIERR_BASE + 54);
  344. MCIERR_CANNOT_LOAD_DSP_MOD =(MCIERR_BASE + 55);
  345. MCIERR_ALREADY_CONNECTED =(MCIERR_BASE + 56);
  346. MCIERR_INVALID_CALLBACK_HANDLE =(MCIERR_BASE + 57);
  347. MCIERR_DRIVER_NOT_FOUND =(MCIERR_BASE + 58);
  348. MCIERR_DUPLICATE_DRIVER =(MCIERR_BASE + 59);
  349. MCIERR_INI_FILE =(MCIERR_BASE + 60);
  350. MCIERR_INVALID_GROUP_ID =(MCIERR_BASE + 61);
  351. MCIERR_ID_ALREADY_IN_GROUP =(MCIERR_BASE + 62);
  352. MCIERR_MEDIA_CHANGED =(MCIERR_BASE + 63);
  353. MCIERR_MISSING_FLAG =(MCIERR_BASE + 64);
  354. MCIERR_UNSUPPORTED_FLAG =(MCIERR_BASE + 65);
  355. MCIERR_DRIVER_NOT_LOADED =(MCIERR_BASE + 66);
  356. MCIERR_INVALID_MODE =(MCIERR_BASE + 67);
  357. MCIERR_INVALID_ITEM_FLAG =(MCIERR_BASE + 68);
  358. MCIERR_INVALID_TIME_FORMAT_FLAG =(MCIERR_BASE + 69);
  359. MCIERR_SPEED_FORMAT_FLAG =(MCIERR_BASE + 70);
  360. MCIERR_INVALID_AUDIO_FLAG =(MCIERR_BASE + 71);
  361. MCIERR_NODEFAULT_DEVICE =(MCIERR_BASE + 72);
  362. MCIERR_DUPLICATE_EXTENSION =(MCIERR_BASE + 73);
  363. MCIERR_FILE_ATTRIBUTE =(MCIERR_BASE + 74);
  364. MCIERR_DUPLICATE_CUEPOINT =(MCIERR_BASE + 75);
  365. MCIERR_INVALID_CUEPOINT =(MCIERR_BASE + 76);
  366. MCIERR_CUEPOINT_LIMIT_REACHED =(MCIERR_BASE + 77);
  367. MCIERR_MISSING_ITEM =(MCIERR_BASE + 78);
  368. MCIERR_MISSING_TIME_FORMAT =(MCIERR_BASE + 79);
  369. MCIERR_MISSING_SPEED_FORMAT =(MCIERR_BASE + 80);
  370. MCIERR_INVALID_CONNECTOR_TYPE =(MCIERR_BASE + 81);
  371. MCIERR_TARGET_DEVICE_FULL =(MCIERR_BASE + 82);
  372. MCIERR_UNSUPPORTED_CONN_TYPE =(MCIERR_BASE + 83);
  373. MCIERR_CANNOT_MODIFY_CONNECTOR =(MCIERR_BASE + 84);
  374. MCIERR_RECORD_ABORTED =(MCIERR_BASE + 85);
  375. MCIERR_GROUP_COMMAND =(MCIERR_BASE + 86);
  376. MCIERR_DEVICE_NOT_FOUND =(MCIERR_BASE + 87);
  377. MCIERR_RESOURCE_NOT_AVAILABLE =(MCIERR_BASE + 88);
  378. MCIERR_INVALID_IO_PROC =(MCIERR_BASE + 89);
  379. MCIERR_WAVE_OUTPUTSINUSE =(MCIERR_BASE + 90);
  380. MCIERR_WAVE_SETOUTPUTINUSE =(MCIERR_BASE + 91);
  381. MCIERR_WAVE_INPUTSINUSE =(MCIERR_BASE + 92);
  382. MCIERR_WAVE_SETINPUTINUSE =(MCIERR_BASE + 93);
  383. MCIERR_WAVE_OUTPUTUNSPECIFIED =(MCIERR_BASE + 94);
  384. MCIERR_WAVE_INPUTUNSPECIFIED =(MCIERR_BASE + 95);
  385. MCIERR_WAVE_OUTPUTSUNSUITABLE =(MCIERR_BASE + 96);
  386. MCIERR_WAVE_SETOUTPUTUNSUITABLE =(MCIERR_BASE + 97);
  387. MCIERR_WAVE_INPUTSUNSUITABLE =(MCIERR_BASE + 98);
  388. MCIERR_WAVE_SETINPUTUNSUITABLE =(MCIERR_BASE + 99);
  389. MCIERR_SEQ_DIV_INCOMPATIBLE =(MCIERR_BASE + 100);
  390. MCIERR_SEQ_PORT_INUSE =(MCIERR_BASE + 101);
  391. MCIERR_SEQ_PORT_NONEXISTENT =(MCIERR_BASE + 102);
  392. MCIERR_SEQ_PORT_MAPNODEVICE =(MCIERR_BASE + 103);
  393. MCIERR_SEQ_PORT_MISCERROR =(MCIERR_BASE + 104);
  394. MCIERR_SEQ_TIMER =(MCIERR_BASE + 105);
  395. MCIERR_VDP_COMMANDCANCELLED =(MCIERR_BASE + 106);
  396. MCIERR_VDP_COMMANDFAILURE =(MCIERR_BASE + 107);
  397. MCIERR_VDP_NOTSPUNUP =(MCIERR_BASE + 108);
  398. MCIERR_VDP_NOCHAPTER =(MCIERR_BASE + 109);
  399. MCIERR_VDP_NOSIDE =(MCIERR_BASE + 110);
  400. MCIERR_VDP_NOSIZE =(MCIERR_BASE + 111);
  401. MCIERR_VDP_INVALID_TIMEFORMAT =(MCIERR_BASE + 112);
  402. MCIERR_CLIPBOARD_ERROR =(MCIERR_BASE + 114);
  403. MCIERR_CANNOT_CONVERT =(MCIERR_BASE + 115);
  404. MCIERR_CANNOT_REDO =(MCIERR_BASE + 116);
  405. MCIERR_CANNOT_UNDO =(MCIERR_BASE + 117);
  406. MCIERR_CLIPBOARD_EMPTY =(MCIERR_BASE + 118);
  407. MCIERR_INVALID_WORKPATH =(MCIERR_BASE + 119);
  408. MCIERR_INDETERMINATE_LENGTH =(MCIERR_BASE + 120);
  409. MCIERR_DUPLICATE_EA =(MCIERR_BASE + 121);
  410. MCIERR_INVALID_CONNECTION =(MCIERR_BASE + 122);
  411. MCIERR_CHANNEL_OFF =(MCIERR_BASE + 123);
  412. MCIERR_CANNOT_CHANGE_CHANNEL =(MCIERR_BASE + 124);
  413. MCIERR_FILE_IO =(MCIERR_BASE + 125);
  414. MCIERR_SYSTEM_FILE =(MCIERR_BASE + 126);
  415. MCIERR_DISPLAY_RESOLUTION =(MCIERR_BASE + 127);
  416. MCIERR_NO_ASYNC_PLAY_ACTIVE =(MCIERR_BASE + 128);
  417. MCIERR_UNSUPP_FORMAT_TAG =(MCIERR_BASE + 129);
  418. MCIERR_UNSUPP_SAMPLESPERSEC =(MCIERR_BASE + 130);
  419. MCIERR_UNSUPP_BITSPERSAMPLE =(MCIERR_BASE + 131);
  420. MCIERR_UNSUPP_CHANNELS =(MCIERR_BASE + 132);
  421. MCIERR_UNSUPP_FORMAT_MODE =(MCIERR_BASE + 133);
  422. MCIERR_NO_DEVICE_DRIVER =(MCIERR_BASE + 134);
  423. MCIERR_CODEC_NOT_SUPPORTED =(MCIERR_BASE + 135);
  424. MCIERR_TUNER_NO_HW =(MCIERR_BASE + 136);
  425. MCIERR_TUNER_NO_AFC =(MCIERR_BASE + 137);
  426. MCIERR_TUNER_AFC_ON =(MCIERR_BASE + 138);
  427. MCIERR_TUNER_CHANNEL_SKIPPED =(MCIERR_BASE + 139);
  428. MCIERR_TUNER_CHANNEL_TOO_LOW =(MCIERR_BASE + 140);
  429. MCIERR_TUNER_CHANNEL_TOO_HIGH =(MCIERR_BASE + 141);
  430. MCIERR_AUD_CHANNEL_OUTOFRANGE =(MCIERR_BASE + 142);
  431. MCIERR_TUNER_INVALID_REGION =(MCIERR_BASE + 143);
  432. MCIERR_SIGNAL_INVALID =(MCIERR_BASE + 144);
  433. MCIERR_TUNER_MODE =(MCIERR_BASE + 145);
  434. MCIERR_TUNER_REGION_NOT_SET =(MCIERR_BASE + 146);
  435. MCIERR_TUNER_CHANNEL_NOT_SET =(MCIERR_BASE + 147);
  436. MCIERR_UNSUPP_CLASS =(MCIERR_BASE + 148);
  437. MCIERR_UNSUPPORTED_ATTRIBUTE =(MCIERR_BASE + 149);
  438. MCIERR_CUSTOM_DRIVER_BASE =(MCIERR_BASE + 256);
  439. //******************************************/
  440. //* Sync/Stream Manager Error Return codes */
  441. //******************************************/
  442. MEBASE =(MCIERR_BASE + 500);
  443. ERROR_INVALID_STREAM =(MEBASE + 1);
  444. ERROR_INVALID_HID =(MEBASE + 2);
  445. ERROR_INVALID_NETWORK =(MEBASE + 3);
  446. ERROR_INVALID_OBJTYPE =(MEBASE + 4);
  447. ERROR_INVALID_FLAG =(MEBASE + 5);
  448. ERROR_INVALID_EVCB =(MEBASE + 6);
  449. ERROR_INVALID_EVENT =(MEBASE + 7);
  450. ERROR_INVALID_MMTIME =(MEBASE + 8);
  451. ERROR_INVALID_NUMSLAVES =(MEBASE + 9);
  452. ERROR_INVALID_REQUEST =(MEBASE + 10);
  453. ERROR_INVALID_SPCBKEY =(MEBASE + 11);
  454. ERROR_INVALID_HNDLR_NAME =(MEBASE + 12);
  455. ERROR_INVALID_PROTOCOL =(MEBASE + 13);
  456. ERROR_INVALID_BUFFER_SIZE =(MEBASE + 14);
  457. ERROR_INVALID_BUFFER_RETURNED =(MEBASE + 15);
  458. ERROR_INVALID_ACB =(MEBASE + 16);
  459. ERROR_INVALID_RECORD_RETURNED =(MEBASE + 17);
  460. ERROR_INVALID_MESSAGE =(MEBASE + 18);
  461. ERROR_STREAM_NOT_OWNER =(MEBASE + 99);
  462. ERROR_STREAM_USED =(MEBASE + 100);
  463. ERROR_STREAM_CREATION =(MEBASE + 101);
  464. ERROR_STREAM_NOTMASTER =(MEBASE + 102);
  465. ERROR_STREAM_NOT_STOP =(MEBASE + 103);
  466. ERROR_STREAM_OPERATION =(MEBASE + 104);
  467. ERROR_STREAM_STOP_PENDING =(MEBASE + 105);
  468. ERROR_STREAM_ALREADY_STOP =(MEBASE + 106);
  469. ERROR_STREAM_ALREADY_PAUSE =(MEBASE + 107);
  470. ERROR_STREAM_NOT_STARTED =(MEBASE + 108);
  471. ERROR_STREAM_NOT_ACTIVE =(MEBASE + 109);
  472. ERROR_START_STREAM =(MEBASE + 110);
  473. ERROR_MASTER_USED =(MEBASE + 111);
  474. ERROR_SPCBKEY_MISMATCH =(MEBASE + 112);
  475. ERROR_INSUFF_BUFFER =(MEBASE + 113);
  476. ERROR_ALLOC_RESOURCES =(MEBASE + 114);
  477. ERROR_ACCESS_OBJECT =(MEBASE + 115);
  478. ERROR_HNDLR_REGISTERED =(MEBASE + 116);
  479. ERROR_DATA_ITEM_NOT_SPECIFIED =(MEBASE + 117);
  480. ERROR_INVALID_SEQUENCE =(MEBASE + 118);
  481. ERROR_INITIALIZATION =(MEBASE + 119);
  482. ERROR_READING_INI =(MEBASE + 120);
  483. ERROR_LOADING_HNDLR =(MEBASE + 121);
  484. ERROR_HNDLR_NOT_FOUND =(MEBASE + 122);
  485. ERROR_SPCB_NOT_FOUND =(MEBASE + 123);
  486. ERROR_DEVICE_NOT_FOUND =(MEBASE + 124);
  487. ERROR_TOO_MANY_EVENTS =(MEBASE + 125);
  488. ERROR_DEVICE_OVERRUN =(MEBASE + 126);
  489. ERROR_DEVICE_UNDERRUN =(MEBASE + 127);
  490. ERROR_HNDLR_NOT_IN_INI =(MEBASE + 128);
  491. ERROR_QUERY_STREAM_TIME =(MEBASE + 129);
  492. ERROR_DATA_ITEM_NOT_SEEKABLE =(MEBASE + 130);
  493. ERROR_NOT_SEEKABLE_BY_TIME =(MEBASE + 131);
  494. ERROR_NOT_SEEKABLE_BY_BYTES =(MEBASE + 132);
  495. ERROR_STREAM_NOT_SEEKABLE =(MEBASE + 133);
  496. ERROR_PLAYLIST_STACK_OVERFLOW =(MEBASE + 135);
  497. ERROR_PLAYLIST_STACK_UNDERFLOW =(MEBASE + 136);
  498. ERROR_LOCKING_BUFFER =(MEBASE + 137);
  499. ERROR_UNLOCKING_BUFFER =(MEBASE + 138);
  500. ERROR_SEEK_PAST_END =(MEBASE + 139);
  501. ERROR_SEEK_BACK_NOT_SUPPORTED =(MEBASE + 140);
  502. ERROR_INTERNAL_ERROR =(MEBASE + 141);
  503. ERROR_INTERNAL_CORRUPT =(MEBASE + 142);
  504. ERROR_INSUFF_MEM =(MEBASE + 143);
  505. ERROR_LARGE_SEEK_BY_TIME =(MEBASE + 144);
  506. ERROR_STREAM_PREROLLING =(MEBASE + 145);
  507. ERROR_INI_FILE =(MEBASE + 146);
  508. ERROR_SEEK_BEFORE_BEGINNING =(MEBASE + 147);
  509. ERROR_TOO_MANY_HANDLERS =(MEBASE + 148);
  510. ERROR_ALLOC_HEAP =(MEBASE + 149);
  511. ERROR_END_OF_PLAYLIST =(MEBASE + 150);
  512. ERROR_TOO_MANY_STREAMS =(MEBASE + 151);
  513. ERROR_FILE_FORMAT_INCORRECT =(MEBASE + 152);
  514. ERROR_DESTROY_STREAM =(MEBASE + 153);
  515. ERROR_INVALID_NUMMASTERS =(MEBASE + 154);
  516. ERROR_MASTER_CONFLICT =(MEBASE + 155);
  517. ERROR_NO_MASTER =(MEBASE + 156);
  518. ERROR_NO_SYNC =(MEBASE + 157);
  519. ERROR_STREAM_ALREADY_IN_NETWORK =(MEBASE + 158);
  520. ERROR_NO_STREAMS_IN_NETWORK =(MEBASE + 159);
  521. ERROR_MISSING_EVENT_ROUTINE =(MEBASE + 160);
  522. ERROR_CAN_NOT_REMOVE_STREAM =(MEBASE + 161);
  523. ERROR_BUFFER_NOT_AVAILABLE =(MEBASE + 400);
  524. ERROR_TOO_MANY_BUFFERS =(MEBASE + 401);
  525. ERROR_TOO_MANY_RECORDS =(MEBASE + 402);
  526. //*----- ERROR_INVALID_PROTOCOL ulErrorStatus defines -----*/
  527. //*----- Refer to SHC_NEGOTIATE_RESULT api.*/
  528. PROTOCOL_SPCBLENGTH =1;
  529. PROTOCOL_SPCBKEY =2;
  530. PROTOCOL_DATAFLAG =3;
  531. PROTOCOL_NUMRECORDS =4;
  532. PROTOCOL_BLOCKSIZE =5;
  533. PROTOCOL_BUFFERSIZE =6;
  534. PROTOCOL_MINNUMBUFFERS =7;
  535. PROTOCOL_MAXNUMBUFFERS =8;
  536. PROTOCOL_SOURCESTART =9;
  537. PROTOCOL_TARGETSTART =10;
  538. PROTOCOL_BUFFERFLAG =11;
  539. PROTOCOL_HANDLERFLAG =12;
  540. PROTOCOL_SYNCTOLERANCE =13;
  541. PROTOCOL_SYNCINTERVAL =14;
  542. PROTOCOL_INTERNALERROR =-1;
  543. //***********************************/
  544. //* MMIO Manager Error Return codes */
  545. //***********************************/
  546. MMIOERR_BASE =(MEBASE + 1000);
  547. MMIOERR_UNBUFFERED =(MMIOERR_BASE + 1);
  548. MMIOERR_CANNOTWRITE =(MMIOERR_BASE + 2);
  549. MMIOERR_CHUNKNOTFOUND =(MMIOERR_BASE + 3);
  550. MMIOERR_INVALID_HANDLE =(MMIOERR_BASE + 4);
  551. MMIOERR_INVALID_PARAMETER =(MMIOERR_BASE + 5);
  552. MMIOERR_INTERNAL_SYSTEM =(MMIOERR_BASE + 6);
  553. MMIOERR_NO_CORE =(MMIOERR_BASE + 7);
  554. MMIOERR_INI_OPEN =(MMIOERR_BASE + 8);
  555. MMIOERR_INI_READ =(MMIOERR_BASE + 9);
  556. MMIOERR_INVALID_BUFFER_LENGTH =(MMIOERR_BASE + 10);
  557. MMIOERR_NO_BUFFER_ALLOCATED =(MMIOERR_BASE + 11);
  558. MMIOERR_NO_FLUSH_FOR_MEM_FILE =(MMIOERR_BASE + 12);
  559. MMIOERR_NO_FLUSH_NEEDED =(MMIOERR_BASE + 13);
  560. MMIOERR_READ_ONLY_FILE =(MMIOERR_BASE + 14);
  561. MMIOERR_WRITE_ONLY_FILE =(MMIOERR_BASE + 15);
  562. MMIOERR_INSTALL_PROC_FAILED =(MMIOERR_BASE + 16);
  563. MMIOERR_READ_FAILED =(MMIOERR_BASE + 17);
  564. MMIOERR_WRITE_FAILED =(MMIOERR_BASE + 18);
  565. MMIOERR_SEEK_FAILED =(MMIOERR_BASE + 19);
  566. MMIOERR_CANNOTEXPAND =(MMIOERR_BASE + 20);
  567. MMIOERR_FREE_FAILED =(MMIOERR_BASE + 21);
  568. MMIOERR_EOF_SEEN =(MMIOERR_BASE + 22);
  569. MMIOERR_INVALID_ACCESS_FLAG =(MMIOERR_BASE + 23);
  570. MMIOERR_INVALID_STRUCTURE =(MMIOERR_BASE + 24);
  571. MMIOERR_INVALID_SIZE =(MMIOERR_BASE + 25);
  572. MMIOERR_INVALID_FILENAME =(MMIOERR_BASE + 26);
  573. MMIOERR_CF_DUPLICATE_SEEN =(MMIOERR_BASE + 27);
  574. MMIOERR_CF_ENTRY_NO_CORE =(MMIOERR_BASE + 28);
  575. MMIOERR_CF_WO_UNSUPPORTED =(MMIOERR_BASE + 29);
  576. MMIOERR_CF_ELEMENTS_OPEN =(MMIOERR_BASE + 30);
  577. MMIOERR_CF_NON_BND_FILE =(MMIOERR_BASE + 31);
  578. MMIOERR_CF_ENTRY_NOT_FOUND =(MMIOERR_BASE + 32);
  579. MMIOERR_DELETE_FAILED =(MMIOERR_BASE + 33);
  580. MMIOERR_OUTOFMEMORY =(MMIOERR_BASE + 34);
  581. MMIOERR_INVALID_DLLNAME =(MMIOERR_BASE + 35);
  582. MMIOERR_INVALID_PROCEDURENAME =(MMIOERR_BASE + 36);
  583. MMIOERR_MATCH_NOT_FOUND =(MMIOERR_BASE + 37);
  584. MMIOERR_SEEK_BEFORE_BEGINNING =(MMIOERR_BASE + 38);
  585. MMIOERR_INVALID_FILE =(MMIOERR_BASE + 39);
  586. MMIOERR_QOSUNAVAILABLE =(MMIOERR_BASE + 40);
  587. MMIOERR_MEDIA_NOT_FOUND =(MMIOERR_BASE + 41);
  588. MMIOERR_ERROR_IN_FRAME_DATA =(MMIOERR_BASE + 42);
  589. MMIOERR_INVALID_DIM_ALIGN =(MMIOERR_BASE + 43);
  590. MMIOERR_CODEC_NOT_SUPPORTED =(MMIOERR_BASE + 44);
  591. MMIOERR_UNSUPPORTED_FUNCTION =(MMIOERR_BASE + 45);
  592. MMIOERR_CLIPBRD_ERROR =(MMIOERR_BASE + 46);
  593. MMIOERR_CLIPBRD_ACTIVE =(MMIOERR_BASE + 47);
  594. MMIOERR_CLIPBRD_EMPTY =(MMIOERR_BASE + 48);
  595. MMIOERR_NEED_NEW_FILENAME =(MMIOERR_BASE + 49);
  596. MMIOERR_INVALID_TRACK_OPERATION=(MMIOERR_BASE + 50);
  597. MMIOERR_INCOMPATIBLE_DATA =(MMIOERR_BASE + 51);
  598. MMIOERR_ACCESS_DENIED =(MMIOERR_BASE + 52);
  599. MMIOERR_MISSING_FLAG =(MMIOERR_BASE + 53);
  600. MMIOERR_INVALID_ITEM_FLAG =(MMIOERR_BASE + 54);
  601. //*************************************/
  602. //* Real-Time MIDI Error Return Codes */
  603. //*************************************/
  604. MIDIERR_BASE =(MMIOERR_BASE + 500);
  605. MIDIERR_DUPLICATE_INSTANCE_NAME =(MIDIERR_BASE + 1);
  606. MIDIERR_HARDWARE_FAILED =(MIDIERR_BASE + 2);
  607. MIDIERR_INTERNAL_SYSTEM =(MIDIERR_BASE + 3);
  608. MIDIERR_INVALID_BUFFER_LENGTH =(MIDIERR_BASE + 4);
  609. MIDIERR_INVALID_CLASS_NUMBER =(MIDIERR_BASE + 5);
  610. MIDIERR_INVALID_CONFIG_DATA =(MIDIERR_BASE + 6);
  611. MIDIERR_INVALID_FLAG =(MIDIERR_BASE + 7);
  612. MIDIERR_INVALID_INSTANCE_NAME =(MIDIERR_BASE + 8);
  613. MIDIERR_INVALID_INSTANCE_NUMBER =(MIDIERR_BASE + 9);
  614. MIDIERR_INVALID_PARAMETER =(MIDIERR_BASE + 10);
  615. MIDIERR_INVALID_SETUP =(MIDIERR_BASE + 11);
  616. MIDIERR_NO_DRIVER =(MIDIERR_BASE + 12);
  617. MIDIERR_NO_DEFAULT_HW_NODE =(MIDIERR_BASE + 13);
  618. MIDIERR_NOT_ALLOWED =(MIDIERR_BASE + 14);
  619. MIDIERR_NOTIFY_MISSED =(MIDIERR_BASE + 15);
  620. MIDIERR_RESOURCE_NOT_AVAILABLE =(MIDIERR_BASE + 16);
  621. MIDIERR_SENDONLY =(MIDIERR_BASE + 17);
  622. MIDIERR_RECEIVEONLY =(MIDIERR_BASE + 18);
  623. TIMERERR_BASE =(MIDIERR_BASE + 100);
  624. TIMERERR_INVALID_PARAMETER =(TIMERERR_BASE + 1);
  625. TIMERERR_INTERNAL_SYSTEM =(TIMERERR_BASE + 2);
  626. //***********************************/
  627. //* User defined Error Return codes */
  628. //***********************************/
  629. USERERR_BASE =(MMIOERR_BASE + 1000);
  630. Const
  631. FOURCC_ULTI:FOURCC=0;
  632. FOURCC_RT21:FOURCC=0;
  633. FOURCC_DIB :FOURCC=0;
  634. FOURCC_R565:FOURCC=0;
  635. FOURCC_R555:FOURCC=0;
  636. FOURCC_R664:FOURCC=0;
  637. FOURCC_RGB3:FOURCC=0;
  638. FOURCC_BGR3:FOURCC=0;
  639. FOURCC_RGB4:FOURCC=0;
  640. FOURCC_BGR4:FOURCC=0;
  641. FOURCC_LUT8:FOURCC=0;
  642. FOURCC_LT12:FOURCC=0;
  643. FOURCC_GREY:FOURCC=0;
  644. FOURCC_GY16:FOURCC=0;
  645. FOURCC_Y888:FOURCC=0;
  646. FOURCC_Y2X2:FOURCC=0;
  647. FOURCC_Y4X4:FOURCC=0;
  648. FOURCC_YUV9:FOURCC=0;
  649. FOURCC_Y644:FOURCC=0;
  650. FOURCC_MONO:FOURCC=0;
  651. FOURCC_Y422:FOURCC=0;
  652. FOURCC_Y42B:FOURCC=0;
  653. FOURCC_Y42D:FOURCC=0;
  654. FOURCC_Y411:FOURCC=0;
  655. FOURCC_VGA :FOURCC=0;
  656. Const
  657. // FourCCs will be initialized in Initialization section
  658. FourCC_RIFF : FourCC = 0;
  659. FourCC_LIST : FourCC = 0;
  660. FourCC_MEM : FourCC = 0;
  661. FourCC_DOS : FourCC = 0;
  662. FourCC_BND : FourCC = 0;
  663. FourCC_FREE : FourCC = 0;
  664. FourCC_DEL : FourCC = 0;
  665. FourCC_CTOC : FourCC = 0;
  666. FourCC_CGRP : FourCC = 0;
  667. FourCC_CF : FourCC = 0;
  668. //****************************************************************************/
  669. //* */
  670. //* Module Name: AUDIO.H */
  671. //* */
  672. //* OS/2 2.0 Multimedia Extensions Audio Structures and definitions. */
  673. //* */
  674. //* Copyright (c) International Business Machines Corporation 1991, 1992 */
  675. //* All Rights Reserved */
  676. //* */
  677. //* Ported to FPC: CooL/2 Aka Andy Svirgunov. */
  678. //****************************************************************************/
  679. //*-------------------------------------------------------------------------*
  680. //* AUDIODD version level
  681. //-------------------------------------------------------------------------*/
  682. CONST
  683. CURRENT_VERSION=$01020000;
  684. //*-------------------------------------------------------------------------*
  685. //* Control definitions
  686. //*-------------------------------------------------------------------------*/
  687. AUDIO_IOCTL_CAT =$80;
  688. AUDIO_INIT =$40;
  689. AUDIO_STATUS =$41;
  690. AUDIO_CONTROL =$42;
  691. AUDIO_BUFFER =$43;
  692. AUDIO_LOAD =$44;
  693. AUDIO_WAIT =$45;
  694. AUDIO_HPI =$46;
  695. AUDIO_CAPABILITY =$48;
  696. MIX_GETCONNECTIONS=$60;
  697. MIX_SETCONNECTIONS=$61;
  698. MIX_GETLINEINFO =$62;
  699. MIX_GETCONTROL =$63;
  700. MIX_SETCONTROL =$64;
  701. //*-------------------------------------------------------------------------*
  702. //* AUDIO_INIT declarations and defines
  703. //*-------------------------------------------------------------------------*/
  704. LOAD_PATH = 260;
  705. //* Values for AUDIO_INIT.sMode */
  706. ADPCM =1; //* AVC type ADPCM */
  707. PCM =2; //* Pulse Coded Modulation */
  708. MU_LAW =3; //* mu-law */
  709. MIDI =4; //* MIDI data */
  710. A_LAW =5; //* a-law */
  711. SOURCE_MIX=6; //* External audio source */
  712. SPV2 =7; //* Speech Viewer/2 */
  713. ADPCMXA =8; //* XA CD ROM */
  714. SPV2BCPCM =25; //* Speech Viewer/2 */
  715. SPV2PCM =26;
  716. SPV2NONE =27;
  717. IDLE =999;
  718. CLAIM_HDWR=32000; //* Serialize access to hardware */
  719. //* Values for AUDIO_INIT.ulFlags */
  720. FIXED =$00000001; // Fixed length data */
  721. LEFT_ALIGNED =$00000002; // Left align bits on byte bndry */
  722. RIGHT_ALIGNED =$00000004; // Right align bits on byte bndry*/
  723. TWOS_COMPLEMENT =$00000008; // 2's complement data */
  724. SIGNED =$00000010; // Signed data */
  725. BIG_ENDIAN =$00000020; // MSB's first (motorola format) */
  726. RIFF_DATATYPE =$00000040; // sMode contains a RIFF datatype*/
  727. PITCH =$00100000; // Pitch control is supported */
  728. INPUT =$00200000; // Input select is supported */
  729. OUTPUT =$00400000; // Output select is supported */
  730. MONITOR =$00800000; // Monitor is supported */
  731. VOLUME =$01000000; // Volume control is supported */
  732. VOLUME_DELAY =$02000000; // Volume delay is supported */
  733. BALANCE =$04000000; // Balance control is supported */
  734. BALANCE_DELAY =$08000000; // Balance delay is supported */
  735. TREBLE =$10000000; // Treble control is supported */
  736. BASS =$20000000; // Bass control supported */
  737. BESTFIT_PROVIDED =$40000000; // bestfit returned */
  738. LOAD_CODE =$80000000; // DSP load needed */
  739. //* Values for AUDIO_INIT.ulOperation */
  740. OPERATION_PLAY =1;
  741. OPERATION_RECORD =2;
  742. PLAY_AND_RECORD =3;
  743. ANALYSIS =6; // Speech Viewer/2 */
  744. DISTANCE =7; // Speech Viewer/2 */
  745. MIGRATION =8; // Speech Viewer/2 */
  746. //* Values for AUDIO_INIT.sReturnCode */
  747. NO_PLAY =1;
  748. NO_RECORD =2;
  749. NO_RECORD_AND_PLAY =3;
  750. INVALID_REQUEST =4;
  751. CONFLICT =5;
  752. OVERLOADED =6;
  753. DOWNLEVEL_DD =7; // DD is down level from appl. */
  754. DSP_LOAD_PENDING_ON_OTHER_TRK=8; // Other trk hasn't loaded dsp */
  755. AUDIO_IGNORE =-1;
  756. //* Values for AUDIO_INIT.sDeviceID */
  757. MINIDD =0;
  758. ACPA =1;
  759. MACPA =2;
  760. MPU401 =3;
  761. SOUND_BLASTER =4;
  762. IMF =5;
  763. PS1 =6;
  764. PAS16 =7;
  765. //* AUDIO_INIT structure declaration */
  766. TYPE MCI_AUDIO_INIT = RECORD
  767. lSRate:LongInt;
  768. lBitsPerSRate:Longint;
  769. lBsize:LongInt;
  770. sMode:Integer;
  771. sChannels:Integer;
  772. lResolution:LongInt;
  773. abLoadPath:ARRAY [0..LOAD_PATH] of CHAR;
  774. ulFlags:LongInt;
  775. ulOperation:LongInt;
  776. sReturnCode:Integer;
  777. sSlotNumber:Integer;
  778. sDeviceID:Integer;
  779. pvReserved:Pointer; //* MMPM2 uses this to pass back sysfilenum */
  780. ulVersionLevel:LongInt;
  781. end;
  782. TYPE PMCI_AUDIO_INIT = ^MCI_AUDIO_INIT;
  783. //*-------------------------------------------------------------------------*
  784. //* AUDIO_DEVID declarations and defines
  785. //*-------------------------------------------------------------------------*/
  786. TYPE _MCI_AUDIO_DEVID = RECORD
  787. ulDevType:LongInt;
  788. ulDevNum:LongInt;
  789. end;
  790. TYPE PMCI_AUDIO_DEVID = ^_MCI_AUDIO_DEVID;
  791. //* Input devices */
  792. CONST
  793. NULL_INPUT =0;
  794. STEREO_LINE_INPUT =1;
  795. LEFT_LINE_INPUT =2;
  796. RIGHT_LINE_INPUT =3;
  797. MIC_INPUT =4;
  798. BOOSTED_MIC_INPUT =5;
  799. PHONE_LINE_INPUT =6;
  800. HANDSET_INPUT =7;
  801. SYNTH_INPUT =8;
  802. DIGITAL_PHONE_LINE_INPUT=9;
  803. DIGITAL_HANDSET_INPUT =10;
  804. MIDI_IN_PORT =11;
  805. LOOPBACK =11;
  806. DEFAULT_INPUT =$FFFFFFFF;
  807. //* Output devices */
  808. NULL_OUTPUT = 0;
  809. STEREO_LINE_OUTPUT = 1;
  810. LEFT_LINE_OUTPUT = 2;
  811. RIGHT_LINE_OUTPUT = 3;
  812. SPEAKER_OUTPUT = 4;
  813. HEADSET_OUTPUT = 5;
  814. PHONE_LINE_OUTPUT = 6;
  815. HANDSET_OUTPUT = 7;
  816. SYNTH_OUTPUT = 8;
  817. DIGITAL_PHONE_LINE_OUTPUT= 9;
  818. DIGITAL_HANDSET_OUTPUT = 10;
  819. MIDI_OUT_PORT = 11;
  820. DEFAULT_OUTPUT = $FFFFFFFF;
  821. //* Defined values for DevNum */
  822. DEFAULT_DEVICE = 0;
  823. DEVICE_1 = 1;
  824. DEVICE_2 = 2;
  825. //*-------------------------------------------------------------------------*
  826. //* Valid Return codes for the ulSupport field of MCI_AUDIO_CAPS
  827. //*-------------------------------------------------------------------------*/
  828. SUPPORT_SUCCESS =$00000000;
  829. UNSUPPORTED_RATE =$00000001;
  830. UNSUPPORTED_CHANNELS =$00000002;
  831. UNSUPPORTED_BPS =$00000004;
  832. UNSUPPORTED_DATATYPE =$00000008;
  833. UNSUPPORTED_OPERATION =$00000010;
  834. TYPE _MCI_AUDIO_CAPS = RECORD
  835. ulLength:LongInt; // in Structure length */
  836. ulSamplingRate:LongInt; // in out Sampling rate to query */
  837. ulChannels:LongInt; // in out Channels to query */
  838. ulBitsPerSample:LongInt; // in out BPS to query */
  839. ulDataType:LongInt; // in out RIFF Datatype to query */
  840. ulOperation:LongInt; // in out OPERATION_PLAY or OPERATION_RECORD */
  841. ulSupport:LongInt; // out BOOLEAN-does DD support this mode */
  842. ulDataSubType:LongInt; // out Data-subtype to use */
  843. ulResourceUnits:LongInt; // out Resource units this mode */
  844. ulResourceClass:LongInt; // out Resource class for this mode */
  845. ulBlockAlign:LongInt; // out Block alignment for this mode. */
  846. fCanRecord:LongInt; // out Is recording possbile - this mode */
  847. ulFlags:LongInt; // out */
  848. ulCapability:LongInt; // out Capability of the device. */
  849. end;
  850. TYPE PAUDIO_CAPS=^_MCI_AUDIO_CAPS;
  851. //*-------------------------------------------------------------------------*
  852. //* Valid Return codes for the ul field of MCI_AUDIO_CAPS
  853. //*-------------------------------------------------------------------------*/
  854. CONST
  855. SUPPORT_MIX =$00000001;// supports mixer functions */
  856. SUPPORT_RIFF_MODES =$00000002;// supports RIFF modes for AUDIO_INIT */
  857. SUPPORT_CAP =$80000000;// Capability IOCTL supported */
  858. //*-------------------------------------------------------------------------*
  859. //* AUDIO_CHANGE declarations and defines
  860. //*-------------------------------------------------------------------------*/
  861. //* Values for AUDIO_CHANGE.lMonitor */
  862. MONITOR_OFF =0;
  863. MONITOR_UNCOMPRESSED =1;
  864. MONITOR_COMPRESSED =2;
  865. //* Values for AUDIO_CHANGE.lInput */
  866. HIGH_GAIN_MIC = 0;
  867. LINE_1 = 1;
  868. LINE_2 = 2;
  869. LINES_1AND2 = 3;
  870. LOW_GAIN_MIC = 4;
  871. ALL_LINES = $FFFF;
  872. INPUTS_LISTED = $5555;
  873. //* Values for AUDIO_CHANGE.lOutput */
  874. EXTERNAL_SPEAKER =1;
  875. INTERNAL_SPEAKER =2;
  876. OUTPUT_1 =4;
  877. OUTPUTS_LISTED =$5555;
  878. //* AUDIO_CHANGE structure declaration */
  879. TYPE _MCI_AUDIO_CHANGE = RECORD
  880. pvDevInfo:Pointer;
  881. lInput:LongInt;
  882. lOutput:LongInt;
  883. lMonitor:LongInt;
  884. lVolume:LongInt;
  885. lVolumeDelay:LongInt;
  886. lBalance:LongInt;
  887. lBalanceDelay:LongInt;
  888. lTreble:LongInt;
  889. lBass:LongInt;
  890. lPitch:LongInt;
  891. rInputList:ARRAY[0..8] OF _MCI_AUDIO_DEVID;
  892. rOutputList:ARRAY[0..8] OF _MCI_AUDIO_DEVID;
  893. prMoreInputs:PMCI_AUDIO_DEVID;
  894. prMoreOutputs:PMCI_AUDIO_DEVID;
  895. lGain:LongInt;
  896. pvModeInfo:Pointer;
  897. end;
  898. TYPE PMCI_AUDIO_CHANGE=^_MCI_AUDIO_CHANGE;
  899. TYPE MIDI_INFO = RECORD
  900. sTempo:Integer;
  901. sCPQN:Integer;
  902. sMidiSwitches:Integer;
  903. sReserved:ARRAY[0..5] OF Integer;
  904. end;
  905. //*************************************************************************
  906. //* MIDI Switches
  907. //**************************************************************************/
  908. CONST
  909. MIDI_THRU_THRU =0;
  910. MIDI_THRU_OUT =1;
  911. //*-------------------------------------------------------------------------*
  912. //* AUDIO_STATUS declarations and defines
  913. //*-------------------------------------------------------------------------*/
  914. //* Values for AUDIO_STATUS.ulOperation */
  915. STOPPED =0;
  916. PLAYING =1;
  917. RECORDING =2;
  918. PLAYING_AND_RECORDING =3;
  919. UNITIALIZED =$FFFFFFFF;
  920. //* AUDIO_STATUS structure declaration */
  921. TYPE MCI_AUDIO_STATUS = RECORD
  922. lSRate:LongInt;
  923. lBitsPerSRate:LongInt;
  924. lBsize:LongInt;
  925. sMode:Integer;
  926. sChannels:Integer;
  927. ulFlags:longInt;
  928. ulOperation:LongInt;
  929. rAudioChange:_MCI_AUDIO_CHANGE;
  930. end;
  931. TYPE PMCI_AUDIO_STATUS = MCI_AUDIO_STATUS;
  932. //*-------------------------------------------------------------------------*
  933. //* AUDIO_CONTROL declarations and defines
  934. //*-------------------------------------------------------------------------*/
  935. //* Values for AUDIO_CONTROL.usIOCtlRequest */
  936. CONST
  937. AUDIO_CHANGE =0;
  938. AUDIO_START =1;
  939. AUDIO_STOP =2;
  940. AUDIO_PAUSE =3;
  941. AUDIO_RESUME =4;
  942. //* Values for AUDIO_CONTROL.sReturnCode */
  943. AC_UNINITED = 1; // Device must be init'ed or loaded first */
  944. FULL_QUEUE = 2; // Maximum # requests exceeded */
  945. AC_UNPAUSED = 3; // Resume issued, but dev not paused */
  946. AC_UNSTARTED = 5; // Device must be started first */
  947. INVALID_INPUT_LIST = 7; // invalid change.input_list entry */
  948. INVALID_OUTPUT_LIST = 8; // invalid change.output_list entry */
  949. //* AUDIO_CONTROL structure declaration */
  950. TYPE MCI_AUDIO_CONTROL = RECORD
  951. usIOCtlRequest:Integer;
  952. pbRequestInfo:Pointer;
  953. ulPosition:LongInt;
  954. sReturnCode:Integer;
  955. end;
  956. TYPE PMCI_AUDIO_CONTROL = MCI_AUDIO_CONTROL;
  957. //*-------------------------------------------------------------------------*
  958. //* AUDIO_BUFFER declarations and defines
  959. //*-------------------------------------------------------------------------*/
  960. //* Values for AUDIO_BUFFER.ulFlags */
  961. CONST
  962. AUDIO_UNDERRUN =1;
  963. AUDIO_OVERRUN =2;
  964. //* Values for AUDIO_BUFFER.ulPositionType */
  965. POS_MSECS =0;
  966. MIDI_CLOCKS =1;
  967. SMPTE_24 =24;
  968. SMPTE_25 =25;
  969. SMPTE_30DF =29;
  970. SMPTE_30 =30;
  971. TYPE MCI_AUDIO_BUFFER = RECORD
  972. ulFlags:LongInt;
  973. ulReadBufSize:LongInt;
  974. ulWriteBufSize:LongInt;
  975. ulReadBufTime:LongInt;
  976. ulWriteBufTime:LongInt;
  977. ulReadBufMax:LongInt;
  978. ulWriteBufMax:LongInt;
  979. ulPosition:LongInt;
  980. ulPositionType:LongInt;
  981. lReadBufCap:LongInt;
  982. lWriteBufCap:LongInt;
  983. lRequestBufCap:LongInt;
  984. end;
  985. TYPE PMCI_AUDIO_BUFFER =^MCI_AUDIO_BUFFER;
  986. //*-------------------------------------------------------------------------*
  987. //* AUDIO_LOAD declarations and defines
  988. //*-------------------------------------------------------------------------*/
  989. //* Values for AUDIO_LOAD.ulFlags */
  990. CONST
  991. LOAD_START =$01;
  992. LOAD_END =$02;
  993. LOAD_32BIT =$10;
  994. TYPE MCI_AUDIO_LOAD = RECORD
  995. pbBuffer:^Char;
  996. ulSize:LongInt;
  997. ulFlags:LongInt;
  998. end;
  999. TYPE PMCI_AUDIO_LOAD = MCI_AUDIO_LOAD;
  1000. //*-------------------------------------------------------------------------*
  1001. //* Track info declarations and defines
  1002. //*-------------------------------------------------------------------------*/
  1003. //* Track Info structure declaration */
  1004. TYPE MCI_TRACK_INFO = RECORD
  1005. usMasterVolume:Integer;
  1006. usDitherPct:Integer; //* Percent of a bit dither during record */
  1007. usMasterVolumeDelay:Integer;
  1008. usMasterBalance:Integer;
  1009. usMasterBalanceDelay:Integer;
  1010. end;
  1011. TYPE PMCI_TRACK_INFO = ^MCI_TRACK_INFO;
  1012. //*-------------------------------------------------------------------------*
  1013. //* IOBUFFER declarations and defines
  1014. //*-------------------------------------------------------------------------*/
  1015. CONST
  1016. STARTED =1;
  1017. PAUSED =2;
  1018. TYPE _MCI_AUDIO_IOBUFFER = RECORD
  1019. lSize:LongInt;
  1020. pHead:^Char;
  1021. pTail:^Char;
  1022. lCount:LongInt;
  1023. ulPosition:LongInt;
  1024. lDelay:LongInt;
  1025. usRunFlags:Integer;
  1026. usSelInc:Integer;
  1027. pBuffer:^Char;
  1028. end;
  1029. TYPE PMCI_AUDIO_IOBUFFER = ^_MCI_AUDIO_IOBUFFER;
  1030. //*-------------------------------------------------------------------------*
  1031. //* AUDIO_HPI declarations and defines
  1032. //-------------------------------------------------------------------------*/
  1033. CONST
  1034. CBXMIT =1;
  1035. CBREC =2;
  1036. CRTIMER =4;
  1037. EP_OPEN =0;
  1038. EP_CLOSE =1;
  1039. EP_READ =2;
  1040. EP_WRITE =3;
  1041. EP_INIT =4;
  1042. EP_STATUS =5;
  1043. EP_CONTROL =6;
  1044. EP_BUFFER =7;
  1045. EP_LOAD =8;
  1046. EP_WAIT =9;
  1047. TYPE MCI_AUDIO_HPI = RECORD
  1048. pvEntry :procedure;
  1049. pvCallBack:procedure;
  1050. // VOID (FAR *pvEntry)();
  1051. // VOID (FAR *pvCallBack)();
  1052. prXBuff:PMCI_AUDIO_IOBUFFER;
  1053. prRBuff:PMCI_AUDIO_IOBUFFER;
  1054. usFlags:Integer;
  1055. end;
  1056. TYPE PMCI_AUDIO_HPI = ^MCI_AUDIO_HPI;
  1057. //**************************/
  1058. //* AUDIO_UPDATE Structure */
  1059. //**************************/
  1060. TYPE AUDIO_UPDATE = RECORD
  1061. iobuf_type:Char; //* 0 - XMITIO, 1 - RECIO to be updated */
  1062. buffer_address:^Char; //* address to buffer to be added to array */
  1063. buffer_length:LongInt; //* length of buffer to be added */
  1064. rc:Integer; //* return code */
  1065. reserved:Pointer; //* future use */
  1066. end;
  1067. TYPE UPDATE = ^AUDIO_UPDATE;
  1068. //* audio_update.iobuf_type definitions */
  1069. CONST
  1070. XMIT_IOBUF =0;
  1071. REC_IOBUF =1;
  1072. //* audio_update.rc definitions */
  1073. MAX_NUM_BUFFERS_REACHED =9;
  1074. UPDATE_GENERAL_FAILURE =10;
  1075. INVALID_BUFFER_LENGTH =11;
  1076. //****************************************************************************/
  1077. //* */
  1078. //* Module Name: CDAUDIO.H */
  1079. //* */
  1080. //* FUNCTION: This file contains the macro definition and common record */
  1081. //* structures used between the CD Audio MCI Driver, its VSDs */
  1082. //* (Vendor Specific Drivers), and the CD look-up table, */
  1083. //* MMPMCD.INI. */
  1084. //* */
  1085. //* Copyright (c) International Business Machines Corporation 1991 - 1993 */
  1086. //* All Rights Reserved */
  1087. //****************************************************************************/
  1088. //* */
  1089. //* Ported to FPC: CooL/2 Aka Andy Svirgunov. */
  1090. //* */
  1091. //****************************************************************************/
  1092. //*******************************************************************/
  1093. //* CD MCD and VSD values and inter-modual communications */
  1094. //*******************************************************************/
  1095. //**********************************/
  1096. //* Macro Definitions */
  1097. //**********************************/
  1098. Const
  1099. UPC_SIZE = 7; //* UPC code size, CD serial number */
  1100. CDMCD_CUEPOINT_MAX = 20; //* maximum number of cuepoints */
  1101. CDROM_SPEC_START = 6000; //* 2 seconds, greatest min start address */
  1102. MCI_INTERNAL_MESSAGES_START = 1000;
  1103. //*************************************************************************/
  1104. //* Internal messages between the MCI Driver and the VSD. */
  1105. //*************************************************************************/
  1106. MCIDRV_REGISTER_DISC =MCI_INTERNAL_MESSAGES_START + 1;
  1107. MCIDRV_REGISTER_DRIVE =MCI_INTERNAL_MESSAGES_START + 2;
  1108. MCIDRV_REGISTER_TRACKS =MCI_INTERNAL_MESSAGES_START + 3;
  1109. MCIDRV_CD_READ_LONG =MCI_INTERNAL_MESSAGES_START + 4;
  1110. MCIDRV_CD_SET_VERIFY =MCI_INTERNAL_MESSAGES_START + 5;
  1111. MCIDRV_CD_STATUS_CVOL =MCI_INTERNAL_MESSAGES_START + 6;
  1112. //*************************************************************************/
  1113. //* Internal callback routine from the VSD to the MCI Driver. */
  1114. //*************************************************************************/
  1115. //typedef VOID (*PFNCDMCD) (DWORD, DWORD, DWORD);
  1116. //***********************************/
  1117. //* CDAudRegister record structures */
  1118. //***********************************/
  1119. TYPE MCI_CD_ID = Record //* ID a disc, used to verify a disc change */
  1120. //* must stay at 8 bytes to equal size of UPC */
  1121. Mode:byte; //* mode, 0=UPC, 1=ID */
  1122. wTrack1:word; //* address of track one in MMTIME */
  1123. NumTracks:byte; //* number of tracks */
  1124. dwLeadOut:word; //* address of lead out track */
  1125. end;
  1126. TYPE MCI_CD_REGDRIVE_PARMS=RECORD //* CD-ROM Drive information, determines capabilities */
  1127. wCaps:WORD; //* capabilities */
  1128. dwPrerollType:WORD; //* preroll type */
  1129. dwPrerollTime:WORD; //* preroll time */
  1130. dwMinStartTime:WORD; //* minimum starting time */
  1131. dwCDMCDID:WORD; //* CD MCD ID for instance */
  1132. // pCDMCDReturn:PFNCDMCD; //* addr of CD MCD Return function */
  1133. end;
  1134. //*************************************************/
  1135. //* These flags are valid for the wCaps Field */
  1136. //*************************************************/
  1137. CONST
  1138. CDVSD_CAP_CAN_RECORD =$0001; //* Can record audio */
  1139. CDVSD_CAP_HAS_AUDIO =$0002; //* Can play audio */
  1140. CDVSD_CAP_HAS_VIDEO =$0004; //* Can play video */
  1141. CDVSD_CAP_CAN_CLSDOOR =$0008; //* Can retract tray/close door */
  1142. CDVSD_CAP_CAN_EJECT =$0010; //* Can eject disc */
  1143. CDVSD_CAP_CAN_STREAM =$0020; //* Can stream */
  1144. CDVSD_CAP_HAS_DAC =$0040; //* Can process internal */
  1145. CDVSD_CAP_CAN_LOCK =$0080; //* Can disable manual eject */
  1146. CDVSD_CAP_CAN_VOLUME =$0100; //* Can manipulate volume settings */
  1147. CDVSD_CAP_CAN_REVERSE =$0200; //* Can play in reverse */
  1148. CDVSD_CAP_CAN_V_SPEED =$0400; //* Can vary play speed */
  1149. CDVSD_CAP_CAN_CUE =$0800; //* Can read sequent. after break */
  1150. //* Used for Cue, Pause, and Seek */
  1151. TYPE MCI_CD_REGDISC_PARMS = RECORD //* Information about the disc */
  1152. LowestTrackNum:BYTE; //* lowest track number */
  1153. HighestTrackNum:BYTE; //* highest track number */
  1154. UPC:ARRAY [0..UPC_SIZE] of BYTE; //* upc, 13 BCD + 4bit 0 */
  1155. DiscID:MCI_CD_ID; //* Disc ID */
  1156. end;
  1157. TYPE MCI_CD_REGTRACK_REC=RECORD //* Information about each track */
  1158. TrackNum:BYTE; //* track number */
  1159. dwStartAddr:WORD; //* starting address in MMTIME */
  1160. dwEndAddr:WORD; //* ending address */
  1161. TrackControl:BYTE; //* track control information */
  1162. end;
  1163. TYPE MCI_CD_REGTRACKS_PARMS=RECORD //* Track information, used to verify address */
  1164. TrackRecArr:^MCI_CD_REGTRACK_REC; //* ptr to array of track recs */
  1165. dwBufSize:WORD; //* size of buffer */
  1166. end;
  1167. //********************************************/
  1168. //* Environment settings to save and restore */
  1169. //********************************************/
  1170. TYPE MCIDRV_CD_SAVE_PARMS=RECORD
  1171. dwPosition:WORD; //* current position in MMTIME */
  1172. dwEndPlay:WORD; //* end play position */
  1173. dwMode:WORD; //* Play mode: playing, paused, etc. */
  1174. dwLevel:WORD; //* volume levels */
  1175. dwVSDData:WORD; //* Extra VSD data storage area */
  1176. end;
  1177. //********************************************/
  1178. //* Read Long (2352-Byte) Sectors */
  1179. //********************************************/
  1180. //**************************************************************************/
  1181. //* Flag for the MCIDRV_CD_READ_LONG message */
  1182. //* Default addressing mode for the dwFrom field is Hardware Red Book. */
  1183. //* Absolute sector addressing for ISO-9660, or High Sierra Group */
  1184. //* requires a flag, as does an MMTIME address. */
  1185. //**************************************************************************/
  1186. CONST
  1187. MCI_CD_READLONG_HSG =$00000100;
  1188. MCI_CD_READLONG_MMTIME =$00000200;
  1189. TYPE MCI_CD_READLONG_PARMS=RECORD
  1190. dwFrom:WORD; //* read from this position */
  1191. wCount:WORD; //* Number of sectors to read */
  1192. lpstrReturn:^CHAR; //* Pointer to return buffer */
  1193. dwRetSize:WORD; //* Return buffer size */
  1194. end;
  1195. //*******************************************************************/
  1196. //* CD Table INI file, MMPMCD.INI, values */
  1197. //*******************************************************************/
  1198. //*******************************************************************/
  1199. //* Capability Flags I from the CD drive look-up table, MMPMCD.INI */
  1200. //*******************************************************************/
  1201. CONST
  1202. CDHW_CAP_CAN_EJECT =$00000001; //* Can software eject disc */
  1203. CDHW_CAP_CAN_LOCK =$00000002; //* Can lock drive/disable eject */
  1204. CDHW_CAP_READS_RAW =$00000004; //* Can read raw sectors */
  1205. CDHW_CAP_CAN_WRITE =$00000008; //* Can write to disc */
  1206. CDHW_CAP_CAN_PLAY =$00000010; //* Can play CD-DA tracks */
  1207. CDHW_CAP_CAN_INTERLEV =$00000020; //* Supports ISO-9660 interleaving */
  1208. CDHW_CAP_CAN_PREFETCH =$00000080; //* Can prefetch internally */
  1209. CDHW_CAP_MANIP_AUDIO =$00000100; //* Can manipulte audio channels */
  1210. CDHW_CAP_USES_REDBOOK =$00000200; //* Can use Red Book mode */
  1211. CDHW_CAP_READS_XA =$00000400; //* Can read CD-ROM/XA data */
  1212. CDHW_CAP_CONT_READS =$00000800; //* Continues to read DA after stop */
  1213. CDHW_CAP_CAN_REVERSE =$00001000; //* Can play in reverse */
  1214. CDHW_CAP_READS_CDDA =$40000000; //* Can read CD-DA audio tracks */
  1215. //*******************************************************************/
  1216. //* Capability Flags II from the CD drive look-up table, MMPMCD.INI */
  1217. //*******************************************************************/
  1218. CDHW_VOL_DEP_MASK =$00000007; //* Volume dependency mask */
  1219. CDHW_VOL_DEP_NONE = 0; //* Volume without dependency */
  1220. CDHW_VOL_DEP_HIGH = 2; //* Volume is highest value */
  1221. CDHW_VOL_DEP_LOW = 3; //* Volume is lowest value */
  1222. CDHW_VOL_DEP_LEFT = 4; //* Volume is left volume */
  1223. CDHW_VOL_DEP_RIGHT = 5; //* Volume is right volume */
  1224. CDHW_VOL_INDEP_MUTE =$00000008; //* Mute has no dependency */
  1225. CDHW_CAP_LOCK_MOUNT =$00000010; //* Can only lock when mounted */
  1226. CDHW_CAP_PLAY_VIDEO =$00000020; //* Can play video */
  1227. CDHW_CAP_MODAL_ONLY =$00000040; //* Stop req to interrupt PLAY */
  1228. CDHW_CAP_SUP_SEEK =$00000080; //* Supports SEEK IOCTL */
  1229. CDHW_CAP_SUP_UPC =$00000100; //* Supports UPC IOCTL */
  1230. CDHW_CAP_SUP_SUBCHAN =$00000200; //* Supports sub-channel IOCTL */
  1231. CDHW_CAP_CAN_CLS_TRAY =$00000400; //* Can close door/retract caddy */
  1232. CDHW_CAP_NO_STREAM =$00001000; //* Cannot stream CD-DA when PDD */
  1233. //* says it can */
  1234. CDHW_CAP_VAR_PLAY =$80000000; //* Supports variable speeds */
  1235. //* INI file record structure */
  1236. CDINI_APPSIZE = 8; //* Application name size */
  1237. CDINI_KEYSIZE = 16; //* Key name size */
  1238. CDINI_VSD_NAME_SIZE = 8; //* size of file name */
  1239. VOLUME_CONTROL = 101; //* num of values, 0% - 100% */
  1240. TYPE MMPMCD_REC=RECORD
  1241. usEntryVer:INTEGER; //* Entry version */
  1242. ulCaps1:LONGINT; //* Capability flag I */
  1243. ulCaps2:LONGINT; //* Capability flag II */
  1244. VSDName:ARRAY [0..CDINI_VSD_NAME_SIZE] of CHAR; //* DLL name for VSD */
  1245. ulMinStart:LONGINT; //* Min starting addr, 0x00MMSSFF */
  1246. usVolCnt:INTEGER; //* volume level counter */
  1247. ausVolValues:ARRAY [0..VOLUME_CONTROL] of INTEGER; //* volume control values */
  1248. end;
  1249. //*************************START OF SPECIFICATIONS **************************/
  1250. // */
  1251. // Module NAME: VIDEO.H */
  1252. // */
  1253. // OS/2 2.0 Multimedia Extensions Video structures and definitions */
  1254. // */
  1255. // Copyright (c) International Business Machines Corporation 1993 */
  1256. // All Rights Reserved */
  1257. //***************************************************************************/
  1258. // Converted by Andry Svirgunov. Email: [email protected] */
  1259. // 14.11.2002 */
  1260. // */
  1261. //************************* END OF SPECIFICATIONS ***************************/
  1262. TYPE _VIDEO_FRAME_HDR = RECORD // vfh */
  1263. FrameNumber : LongInt; // relative frame number */
  1264. FramesSkipped : LongInt; // no. frames skipped between this and last frames */
  1265. StreamTime : LongInt; // stream time in milliseconds */
  1266. FrameSize : LongInt; // size in bytes */
  1267. SHparm1 : LongInt; // used by stream handler */
  1268. reserved3 : LongInt; // unused */
  1269. reserved2 : LongInt; // unused */
  1270. reserved1 : LongInt; // unused */
  1271. end;
  1272. TYPE PVIDEO_FRAME_HDR = ^_VIDEO_FRAME_HDR;
  1273. //*************************START OF SPECIFICATIONS **************************/
  1274. // */
  1275. // COPYRIGHT: IBM - International Business Machines */
  1276. // Copyright (c) IBM Corporation 1991, 1992, 1993 */
  1277. // All Rights Reserved */
  1278. // */
  1279. // */
  1280. // SOURCE FILE NAME: UMFORMAT.H */
  1281. // */
  1282. // DESCRIPTIVE NAME: Ultimotion File Format Headers (Beta) */
  1283. // */
  1284. // An Ultimotion file consists of interlevaed audio and video and text */
  1285. // chunks within the data list chunk. */
  1286. // */
  1287. // A file may contain interleaved audio chunks or the soundtrack may */
  1288. // be contained in a seperate file specified in the header chunk, or */
  1289. // there may be no associated soundtrack (a silent movie). Multiple */
  1290. // audio tracks are supported by this file format, either interleaved */
  1291. // or in seperate files. Only one video track, track 0, is supported in */
  1292. // a single file. Audio tracks are identified by a track number, with */
  1293. // the first audio track being track 1. */
  1294. // */
  1295. // If a file specifies both interleaved audio tracks and external */
  1296. // audio tracks (.WAV files), the external audio tracks are numbered */
  1297. // consecutively following the interleaved audio tracks. For */
  1298. // example, if a file specifies two interleaved audio tracks and two */
  1299. // external audio tracks, the interleaved audio tracks will be tracks */
  1300. // 0 and 1, and the external audio tracks will be tracks 2 and 3. */
  1301. // Note that tracks can carry distinct audio information such as */
  1302. // multiple languages, and that stereo audio can be carried in a */
  1303. // single track. */
  1304. // */
  1305. //************************* END OF SPECIFICATIONS ***************************/
  1306. // The hex fourcc value is also the SPCBKEY.ulDataSubType value for the */
  1307. // Ultimotion file format - OS2MEDEF.H */
  1308. //***************************************************************************/
  1309. // Ultimotion File Format: */
  1310. // */
  1311. // */
  1312. // Conventions used in this format: */
  1313. // */
  1314. // - A file is a collection of chunks */
  1315. // - The first ULONG in a chunk is the chunk type (chunk ID) */
  1316. // - The second ULONG in a chunk is the length of the chunk, */
  1317. // including the header and the data, but excluding the chunk */
  1318. // ID and chunk length. */
  1319. // - For each interleaved audio track there is one audio frame that */
  1320. // corresponds to each video frame */
  1321. // - An audio frame has the same duration as its corresponding video */
  1322. // frame */
  1323. // - Audio frames always follow their corresponding video frame, and */
  1324. // as such preceed the next video frame */
  1325. // */
  1326. // Legend: */
  1327. // [<element name>] optional */
  1328. // <element name> 1 */
  1329. // <element name>... 1 or more */
  1330. // [<element name>]... 0 or more */
  1331. // */
  1332. // */
  1333. // */
  1334. // SMV form */
  1335. // --------- */
  1336. // */
  1337. // <RIFF( 'ummv' */
  1338. // <LIST( 'umhl' - Header LIST */
  1339. // <Videoheader-ck> - Video header chunk */
  1340. // <videotitle-ck>... - Video title chunk(s) */
  1341. // - */
  1342. // [<LIST( 'umal' - Audio LIST(s) */
  1343. // {<extaudiofilename-ck> | - Ext. WAV files */
  1344. // <audioheader-ck>} - Audio header */
  1345. // <audiotitle-ck>...)>]... - Audio title */
  1346. // - */
  1347. // [<LIST( 'umtl' - Text LIST */
  1348. // <textheader-ck>...)>])> - Text header */
  1349. // - */
  1350. // <LIST( 'umfd' - Frame data LIST */
  1351. // <LIST( 'umcd' { - Chapter data LIST */
  1352. // <videoframe-ck> - Video frame */
  1353. // [<audioframe-ck>] - Audio frame */
  1354. // [<textframe-ck>]}...)>...) - Text frame */
  1355. // - */
  1356. // [<LIST( 'umci' - Chap index table LIST */
  1357. // <LIST( 'umce' - Chap index entry LIST */
  1358. // <chapterheader-ck> - Chapter index hdr */
  1359. // <chapttitle-ck>... - Chapter title */
  1360. // <frameindex-ck>)>...)>])> - frame index */
  1361. // - table */
  1362. // */
  1363. //***************************************************************************/
  1364. CONST
  1365. UMAUDIOFILENAMELENGTH =60;
  1366. SIZEOF_FORM =4;
  1367. // ULTIMOTION FORMS */
  1368. UMFORM_MOVIE = 'ummv';
  1369. UMFORM_HEADERLIST = 'umhl';
  1370. UMFORM_AUDIOHDRLIST = 'umal';
  1371. UMFORM_TEXTHDRLIST = 'umtl';
  1372. UMFORM_FRAMEDATALIST = 'umfd';
  1373. UMFORM_CHAPTERDATALIST = 'umcd';
  1374. UMFORM_CHAPTERTABLELIST = 'umci';
  1375. UMFORM_CHAPTERENTRYLIST = 'umce';
  1376. // byte swapped hex defines for ulong assignments... */
  1377. HEX_UMFORM_MOVIE =$766d6d75; // vmmu */
  1378. HEX_UMFORM_HEADERLIST =$6c686d75; // lhmu */
  1379. HEX_UMFORM_AUDIOHDRLIST =$6c616d75; // lamu */
  1380. HEX_UMFORM_TEXTHDRLIST =$6c746d75; // ltmu */
  1381. HEX_UMFORM_FRAMEDATALIST =$64666d75; // dfmu */
  1382. HEX_UMFORM_CHAPTERDATALIST =$64636d75; // dcmu */
  1383. HEX_UMFORM_CHAPTERTABLELIST =$69636d75; // icmu */
  1384. HEX_UMFORM_CHAPTERENTRYLIST =$65636d75; // ecmu */
  1385. // ULTIMOTION CHUNK IDS */
  1386. UMID_VIDEOHEADER ='umvh';
  1387. UMID_EXTAUDIONAME ='umea';
  1388. UMID_AUDIOHEADER ='umah';
  1389. UMID_TEXTHEADER ='umth';
  1390. UMID_VIDEOTITLE ='umvt';
  1391. UMID_AUDIOTITLE ='umat';
  1392. UMID_TEXTFRAME ='umtf';
  1393. UMID_VIDEOFRAME ='umvf';
  1394. UMID_AUDIOFRAME ='umaf';
  1395. UMID_CHAPTERHEADER ='umch';
  1396. UMID_CHAPTERTITLE ='umct';
  1397. UMID_FRAMETABLE ='umfi';
  1398. // byte swapped hex defines for ulong assignments... */
  1399. HEX_UMID_VIDEOHEADER =$68766d75; // hvmu */
  1400. HEX_UMID_EXTAUDIONAME =$61656d75; // aemu */
  1401. HEX_UMID_AUDIOHEADER =$68616d75; // hamu */
  1402. HEX_UMID_TEXTHEADER =$68746d75; // htmu */
  1403. HEX_UMID_VIDEOTITLE =$74766d75; // tvmu */
  1404. HEX_UMID_AUDIOTITLE =$74616d75; // tamu */
  1405. HEX_UMID_TEXTFRAME =$66746d75; // ftmu */
  1406. HEX_UMID_VIDEOFRAME =$66766d75; // fvmu */
  1407. HEX_UMID_AUDIOFRAME =$66616d75; // famu */
  1408. HEX_UMID_CHAPTERHEADER =$68636d75; // hcmu */
  1409. HEX_UMID_CHAPTERTITLE =$74636d75; // tcmu */
  1410. HEX_UMID_FRAMETABLE =$69666d75; // ifmu */
  1411. //***************************************************************************/
  1412. // CHUNK HEADER STRUCTURE - APPEARS AT START OF EACH CHUNK */
  1413. //***************************************************************************/
  1414. type UMCHUNKHEADER =record // umch */
  1415. ulChunkID:LongInt; // ID for this chunk */
  1416. ulChunkLength:LongInt; // Length of chunk that follows */
  1417. end;
  1418. PUMCHUNKHEADER=^UmChunkHeader; // pumch */
  1419. //***************************************************************************/
  1420. // VIDEO HEADER CHUNK - */
  1421. // */
  1422. // The UMVIDEOHEADER structure is followed by a list of */
  1423. // usInterleavedTracks null-terminated external audio (.WAV) file */
  1424. // names. The audio file name fields are fixed size to better enable */
  1425. // changing the file names without re-writing the file. */
  1426. //***************************************************************************/
  1427. UMVIDEOHEADER = record // umvh */
  1428. ulTotalDuration:LongInt; // Video duration in MMTIME */
  1429. ulMaxFrameSize:LongInt; // Max video frame size in bytes */
  1430. ulMaxAvgDataRate:LongInt; // Max avergage data rate */
  1431. ulMaxBurstInterval:LongInt; // Max interval for max data rate */
  1432. ulCompressionRatioX100:LongInt; // Compression ratio */
  1433. ulPosterFrameOffset:LongInt; // Poster for video (from beginning) */
  1434. usMaxFrameX:Word; // Max horizontal frame size */
  1435. usMaxFrameY:Word; // Max vertical frame size */
  1436. usNomFrameDuration:Word; // Nominal recorded frame duration */
  1437. usNomIFrameInterval:word; // I-frame every this many frames */
  1438. usNumCompressionTypes:Word; // number of different CODECS used in file */
  1439. aulCompressionTypes:Array [0..20] of LongInt;// List of CODECs found in this file */
  1440. Reserved:Array [0..16] of LongInt; // Reserved space */
  1441. end;
  1442. PUMVIDEOHEADER=^UMVIDEOHEADER; // pumvh */
  1443. //***************************************************************************/
  1444. // EXTERNAL AUDIO FILE NAME CHUNK */
  1445. //***************************************************************************/
  1446. EXTAUDIONAME = record // umea */
  1447. usTrackNumber:Word; // Audio track number for this format */
  1448. szFileName:Array [0..UMAUDIOFILENAMELENGTH] of Char;
  1449. end;
  1450. PEXTAUDIONAME=^EXTAUDIONAME; // pumea */
  1451. //***************************************************************************/
  1452. // INTERLEAVED AUDIO TRACK HEADER CHUNK */
  1453. //***************************************************************************/
  1454. AUDIOHEADER = record // umah */
  1455. usTrackNumber:Word; // Audio track number for this format */
  1456. usFormatTag:Word; // Type of wave format */
  1457. usChannels:Word; // Number of channels (1=mono 2=stereo)*/
  1458. ulSamplesPerSec:LongInt; // Sampling rate */
  1459. ulAvgBytesPerSec:LongInt; // Avg bytes per sec */
  1460. usBlockAlign:Word; // Block alignment in bytes */
  1461. usBitsPerSample:Word; // Bits per sample */
  1462. usCountryCode:Word; // Country code for this title */
  1463. end;
  1464. PAUDIOHEADER=^AUDIOHEADER; // pumah */
  1465. //***************************************************************************/
  1466. // INTERLEAVED TEXT TRACK HEADER CHUNK */
  1467. //***************************************************************************/
  1468. TEXTHEADER = record // umth */
  1469. usTrackNumber:Word; // Audio track number for this format */
  1470. usCountryCode:Word; // Country code for this title */
  1471. end;
  1472. PTEXTHEADER=^TEXTHEADER; // pumth */
  1473. //***************************************************************************/
  1474. // TITLE CHUNK */
  1475. //***************************************************************************/
  1476. TITLE =record // ttl */
  1477. usCountryCode:Word; // Country code for this title */
  1478. szTitle:Array [0..1] of Char; // Video title null-terminated */
  1479. end;
  1480. PTITLE=^TITLE; // pttl */
  1481. //***************************************************************************/
  1482. // AUDIO FRAME CHUNK */
  1483. //***************************************************************************/
  1484. AUDIOFRAME =record // umaf */
  1485. usTrackNumber:Word; // audio track number */
  1486. bData:Array [0..1] of Byte;
  1487. end;
  1488. PAUDIOFRAME=^AUDIOFRAME; // pumaf */
  1489. //***************************************************************************/
  1490. // TEXT FRAME CHUNK */
  1491. //***************************************************************************/
  1492. TEXTFRAME =record // umtf */
  1493. usTrackNumber:Word; // Text track number */
  1494. szText:Array [0..1] of Char; // Text null-terminated */
  1495. end;
  1496. //***************************************************************************/
  1497. // VIDEO FRAME CHUNK */
  1498. //***************************************************************************/
  1499. VIDEOFRAME = record // umvf */
  1500. usTrackNumber:Word; // Video track number (0L only for now) */
  1501. ulDuration:LongInt; // Frame duration in MMTIME */
  1502. ulFrameFlags:LongInt; // Frame flags */
  1503. ulCompressionType:LongInt; // Compression type */
  1504. bData:Array [0..1] of Byte;
  1505. end;
  1506. PVIDEOFRAME =^VIDEOFRAME; // pumvf */
  1507. // ulCompressionType defines: */
  1508. CONST
  1509. UM_VIDEO_COMPRESSION_TYPE_RAWRGB565 =1;
  1510. UM_VIDEO_COMPRESSION_TYPE_RAWUVY556 =2;
  1511. UM_VIDEO_COMPRESSION_TYPE_RAWYUV411 =3;
  1512. UM_VIDEO_COMPRESSION_TYPE_BH146 =10; // BETA-RGB16 */
  1513. UM_VIDEO_COMPRESSION_TYPE_BH211SCS4 =11; // 1.1 YUV16 subsampled chroma sub4 */
  1514. UM_VIDEO_COMPRESSION_TYPE_BH211UCS4 =12; // unique chroma sub4 */
  1515. // ulVideoFrameFlags defines: */
  1516. UM_VIDEO_FRAME_FLAG_DELTAFRAME =$1; // 1: delta frame, 0: I frame */
  1517. UM_VIDEO_FRAME_FLAG_SCENECHANGE =$2;
  1518. //***************************************************************************/
  1519. // CHAPTER INDEX HEADER (header for each entry in chapter index LIST */
  1520. //***************************************************************************/
  1521. TYPE UMCHAPTERINDEX = record // umch */
  1522. ulChapterOffset:LongInt; // Offset from beginning of file */
  1523. ulChapterDuration:LongInt; // Duration of chapter in MMTIME */
  1524. ulPosterFrameOffset:LongInt; // Poster for chapter (offset from chapter)*/
  1525. end;
  1526. PUMCHAPTERINDEX =^UMCHAPTERINDEX; // pumch */
  1527. //***************************************************************************/
  1528. // FRAME INDEX ENTRY */
  1529. //***************************************************************************/
  1530. UMFRAMEINDEX = record // umfi */
  1531. ulFrameOffsets:LongInt; // Offset from beginning of chapter */
  1532. ulFrameFlags:LongInt; // Frame flags (Refer to frame header) */
  1533. end;
  1534. PUMFRAMEINDEX =^UMFRAMEINDEX; // pumfi */
  1535. //***************************************************************************/
  1536. // */
  1537. // Module Name: SPCB.H */
  1538. // */
  1539. // OS/2 2.0 Multimedia Extensions Sync/Stream Manager Stream Protocol */
  1540. // Control Block Definitions. */
  1541. // */
  1542. // Copyright (c) International Business Machines Corporation 1991, 1992 */
  1543. // All Rights Reserved */
  1544. //--------------------------------------------------------------------------*/
  1545. // Converted by Andry Svirgunov. Email: [email protected] */
  1546. // 14.11.2002 */
  1547. // */
  1548. //***************************************************************************/
  1549. //*********************************************
  1550. // *
  1551. // * SPCBKEY - Stream Protocol Key
  1552. // *
  1553. // **********************************************/
  1554. //TYPE
  1555. // MMTIME = Cardinal;
  1556. spcbKey = record
  1557. ulDataType : LongInt;
  1558. ulDataSubType : LongInt;
  1559. ulIntKey : LongInt; // Generated internal key
  1560. end;
  1561. // pspcbKey = ^spcbKey;
  1562. //*********************************************
  1563. // *
  1564. // * SPCB - Stream Protocol Control Block
  1565. // *
  1566. // **********************************************/
  1567. _spcb = record
  1568. ulSPCBLen : LongInt; // SPCB struture length
  1569. spcbkey : SPCBKEY;
  1570. ulDataFlags : LongInt; // Data type flags
  1571. ulNumRec : LongInt; // Max # records/buffer (Only used for Split streams)
  1572. ulBlockSize : LongInt; // Block alignment in bytes.
  1573. ulBufSize : LongInt; // Buffer size (SSM allocated buffers) must be
  1574. // a multiple of Block size
  1575. ulMinBuf : LongInt; // Minimum number of buffers needed to stream
  1576. ulMaxBuf : LongInt; // Maximum number of buffers needed to stream
  1577. ulSrcStart : LongInt; // # of EMPTY buffers required to start Source
  1578. ulTgtStart : LongInt; // # of FULL buffers required to start Target
  1579. ulBufFlags : LongInt; // Handler Protocol negotiation flags
  1580. ulHandFlags : LongInt; // Handler Protocol flags
  1581. mmtimeTolerance : mmTime; // Sync tolerance value...Used as check by SSM
  1582. // to determine whether to send a sync pulse
  1583. // to this specific slave Stream Handler.
  1584. // Algorithm:
  1585. // diff = abs(master time - slave time)
  1586. // if diff >= tolerance
  1587. // then send sync pulse
  1588. // (Valid only for Slave stream handlers)
  1589. mmtimeSync : mmTime; // Used to save sync pulse generation granularity
  1590. // if the master uses the Stream Manager Timer.
  1591. // if SpiSetSync passed NULL value for sync gran
  1592. // then use this default value. (since hardware
  1593. // must have it's own interrupt time interval.
  1594. // (Valid only for Master stream handlers)
  1595. ulBytesPerUnit : LongInt; // Bytes/unit of time. This is used to do seeks
  1596. // on linear data that is not compressed or
  1597. // of variable length.
  1598. mmtimePerUnit : mmTime; // The amount of mmtime each unit represents.
  1599. // A unit can be a second, minute or whatever.
  1600. end;
  1601. pspcb = ^_spcb;
  1602. const
  1603. spcb_max_buf_Size = 1024*1024; // Largest buffer size in bytes
  1604. //******************
  1605. // * SPCB_ulDataFlags:
  1606. // *******************/
  1607. // SPCB_ulDataFlags:
  1608. spcbData_CueTime = $0002; // This data type can support time cue points
  1609. spcbData_CueData = $0004; // This data type can support data cue points
  1610. spcbData_Seek = $0000; // Seeks can be performed on this data type.
  1611. spcbData_NoSeek = $0008; // NO seeks can be performed on this data type.
  1612. spcbData_YieldTime = $0010; // The ulBytes per unit field is used for a millisecond value
  1613. // It represents the amount of yield time between reads of
  1614. // each buffer. If this bit is set, the value of ulBytesPerUnit
  1615. // is used as input to DosSleep to yield for that period of time
  1616. ValidDataFlags = spcbData_CueTime OR spcbData_CueData OR
  1617. spcbData_YieldTime OR spcbData_NoSeek;
  1618. //*******************
  1619. //* SPCB_ulBufFlags:
  1620. //********************/
  1621. // SPCB_ulBufFlags:
  1622. spcbBuf_USERPROVIDED = $0001; // User provides buffers for stream
  1623. // SSMgr will not allocate buffers,
  1624. // but must lock down provided buffers,
  1625. // so this will affect performance!!
  1626. // (Source Handler only)
  1627. spcbBuf_FIXEDBUF = $0002; // Buffer size is fixed for this data type
  1628. // in this handler. Can not be used
  1629. // with the spcbBuf_USERPROVIDED flags.
  1630. spcbBuf_NONCONTIGUOUS = $0004; // Buffer do not need to be contiguous
  1631. // in physical memory.
  1632. spcbBuf_INTERLEAVED = $0008; // Stream buffers can be interleaved.
  1633. // Can not be use with the
  1634. // spcbBuf_USERPROVIDED flag.
  1635. // (Source Handler only)
  1636. spcbBuf_MAXSIZE = $0010; // ulBufSize is the maximum size that
  1637. // can be used by this stream handler
  1638. spcbBuf_16MEG = $0020; // The Stream buffers may be allocated
  1639. // above the 16 Meg line. This is used
  1640. // by stream handlers that can support
  1641. // greater than 16 Megabyte addresses.
  1642. spcbBuf_FIXEDBLOCK = $0040; // Use the ulBlockSize field to represent
  1643. // the size of the IO reads that should
  1644. // be performed (Interleaved streams)
  1645. ValidBufFlags = spcbBuf_UserProvided OR spcbBuf_FixedBuf OR
  1646. spcbBuf_NonContiguous OR spcbBuf_Interleaved OR
  1647. spcbBuf_16Meg OR spcbBuf_FixedBlock OR
  1648. spcbBuf_MaxSize;
  1649. //******************
  1650. // * SPCB_ulHandFlags:
  1651. // *******************/
  1652. // SPCB_ulHandFlags:
  1653. spcbHand_genSync = $0001; // (INPUT FROM HANDLER ONLY)
  1654. // This handler can generate sync pulses
  1655. // if it is the master.
  1656. spcbHand_RcvSync = $0002; // (INPUT FROM HANDLER ONLY)
  1657. // This handler can receive sync pulses
  1658. // if it is a slave
  1659. spcbHand_Timer = $0004; // Use Stream Manager Timer for Sync
  1660. spcbHand_NonStream = $0008; // Stream Handler is non-streaming
  1661. spcbHand_GenTime = $0010; // This handler contains real
  1662. // stream time. The handler that
  1663. // supports the SpiGetTime, data/time
  1664. // cue point calls for this stream.
  1665. spcbHand_NoPreRoll = $0020; // This stream can not be prerolled.
  1666. // (i.e. recording streams)
  1667. spcbHand_NoSync = $0040; // This stream can be group into a
  1668. // sync group, but does not send or
  1669. // receive sync pulses.
  1670. spcbHand_Phys_Seek = $0080; // This handler does a seek to a physical
  1671. // device or memory not just a time adjustment.
  1672. // (ssm will always call this handler first on
  1673. // an SpiSeekStream call).
  1674. ValidHandFlags = spcbHand_GenSync OR spcbHand_RcvSync OR
  1675. spcbHand_Timer OR spcbHand_NonStream OR
  1676. spcbHand_GenTime OR spcbHand_NoPreRoll OR
  1677. spcbHand_NoSync OR spcbHand_Phys_Seek;
  1678. //**************************************************************************\
  1679. //
  1680. // Module Name: SHDD.H
  1681. //
  1682. // OS/2 2.0 Multimedia Extensions Stream Handler Device Driver Interfaces
  1683. // Block defintions.
  1684. //
  1685. // Copyright (c) International Business Machines Corporation 1990,1991
  1686. // All Rights Reserved
  1687. // -------------------------
  1688. // Ported by Andry Svirgunov
  1689. //
  1690. //**************************************************************************/
  1691. //***************************************************************************/
  1692. // D E F I N E S */
  1693. //***************************************************************************/
  1694. // Multimedia Extensions Stream Handler Device Driver Interfaces
  1695. // Block defintions.
  1696. type
  1697. shdfn = pointer;
  1698. ddcmdfn = pointer;
  1699. hstream = Longint;
  1700. hevent = LongInt;
  1701. hID = LongInt;
  1702. // MMTIME = Cardinal;
  1703. type
  1704. time_evcb = record
  1705. ulType : LongInt; // Event_CUE_TIME
  1706. ulSubType : LongInt; // Not used
  1707. ulFlags : LongInt; // Single/Recurring(input/output)
  1708. hstream : HSTREAM; // handle to stream for this event (input/output)
  1709. hid : hID; // handler Id (input/output)
  1710. ulStatus : LongInt; // Event status/error return code (output)
  1711. mmtimeStream : MMTIME; // Stream time (input/output)
  1712. unused1 : LongInt; // 0 (input)
  1713. unused2 : LongInt; // 0 (input)
  1714. end;
  1715. ptime_evcb = ^time_evcb;
  1716. (*type
  1717. spcbKey = record
  1718. ulDataType : LongInt;
  1719. ulDataSubType : LongInt;
  1720. ulIntKey : LongInt; // Generated internal key
  1721. end;*)
  1722. // pspcbKey = ^spcbKey;
  1723. //***************************************************************************/
  1724. // S T R U C T U R E S */
  1725. //***************************************************************************/
  1726. //***************************************************************************/
  1727. //*** DDCMD Interface **/
  1728. //***************************************************************************/
  1729. const
  1730. // DDCMD Defines
  1731. DDCMD_SETUP = 0;
  1732. DDCMD_READ = 1;
  1733. DDCMD_WRITE = 2;
  1734. DDCMD_STATUS = 3;
  1735. DDCMD_CONTROL = 4;
  1736. DDCMD_REG_STREAM = 5;
  1737. DDCMD_DEREG_STREAM = 6;
  1738. type
  1739. ddCmdCommon = record
  1740. ulFunction : LongInt; // Function requested by SH
  1741. Stream : hStream; // data stream instance
  1742. end;
  1743. pddCmdCommon = ^ddCmdCommon;
  1744. ddCmd_Setup_parm = record
  1745. ulFunction : LongInt; // Function requested by SH
  1746. hStream : HSTREAM;
  1747. pSetupParm : Pointer; // see SETUP_PARM struct
  1748. ulSetupParmSize : LongInt; // see SETUP_PARM struct
  1749. end;
  1750. pddCmdSetup = ^ddCmd_Setup_parm;
  1751. //*********************************************/
  1752. // SETUP_PARM structure */
  1753. //*********************************************/
  1754. // SETUP_PARM structure
  1755. Setup_Parm = record // DDCMDSETUP parameter block
  1756. ulStreamTime : LongInt; // stream time in milliseconds
  1757. ulFlags : LongInt; // various flags (input/output)
  1758. // NOTE: new fields will be added here
  1759. end;
  1760. pSetup_Parm = ^Setup_Parm;
  1761. //*********************************************/
  1762. // ulFlag defines */
  1763. //*********************************************/
  1764. const
  1765. // ulFlag defines
  1766. SETUP_RECURRING_EVENTS = $00000001;
  1767. // the device driver sets this flag on return from the
  1768. // DDCMD_SETUP command if the device driver assumes events
  1769. // are recurring events---in this case, the stream handler
  1770. // will not have to re-enable a recurring event each time
  1771. // the event occurs by sending a DDCMD_CONTROL command to
  1772. // the device driver. this is useful when CUE_TIME or
  1773. // DATA_CUE events are expected to be used as RECURRING
  1774. type
  1775. ccCmdReadWrite = record
  1776. ulFunction : LongInt; // Function requested by SH
  1777. hStream : HSTREAM;
  1778. pBuffer : Pointer;
  1779. ulBufferSize : LongInt;
  1780. pProcessLin : Pointer;
  1781. fEOS : Boolean;
  1782. ulParm1 : LongInt;
  1783. ulParm2 : LongInt;
  1784. ulLength : LongInt;
  1785. end;
  1786. pccCmdReadWrite = ^ccCmdReadWrite;
  1787. ppccCmdReadWrite = ^pccCmdReadWrite;
  1788. ccCmdStatus = record
  1789. ulFunction : LongInt; // Function requested by SH
  1790. hStream : HSTREAM;
  1791. pStatus : Pointer; // (output)ptr to current position time
  1792. ulStatusSize : LongInt; // (output)size of position time
  1793. end;
  1794. pccCmdStatus = ^ccCmdStatus;
  1795. //*********************************************/
  1796. // STATUS_PARM structure */
  1797. //*********************************************/
  1798. // STATUS_PARM structure
  1799. Status_Parm = record // DDCMDSTATUS parameter block
  1800. ulTime : LongInt; // current position time in milliseconds
  1801. // NOTE: new fields will be added here
  1802. end;
  1803. pStatus_Parm = ^Status_Parm;
  1804. ddCmdControl = record
  1805. ulFunction : LongInt; // Function requested by SH
  1806. hStream : HSTREAM;
  1807. hEvent : hEvent; // used for EVENTS only
  1808. ulCmd : LongInt;
  1809. pParm : Pointer; // see CONTROL_PARM structure
  1810. ulParmSize : LongInt; // see CONTROL_PARM structure
  1811. end;
  1812. pddCmdControl = ^ddCmdControl;
  1813. //*********************************************/
  1814. // ulCmd defines */
  1815. //*********************************************/
  1816. const
  1817. // ulCmd defines
  1818. DDCMD_START = 1; // start device
  1819. DDCMD_STOP = 2; // stop device and return current position in pParm
  1820. DDCMD_PAUSE = 3; // pause device and return current position in pParm
  1821. DDCMD_RESUME = 4; // resume device
  1822. DDCMD_ENABLE_EVENT = 5; // ask PDD to create this event
  1823. DDCMD_DISABLE_EVENT = 6; // ask PDD to purge this event
  1824. DDCMD_PAUSE_TIME = 7; // pause time keeping, but not the stream
  1825. DDCMD_RESUME_TIME = 8; // resume time keeping.
  1826. //*********************************************/
  1827. // CONTROL_PARM structure */
  1828. //*********************************************/
  1829. type
  1830. // CONTROL_PARM structure
  1831. Control_Parm = record // DDCMDCONTROL parameter block
  1832. ulTime : LongInt; // time in milliseconds
  1833. // SH sets cuetime when ulCmd is ENABLE_EVENT
  1834. // PDD returns current time for STOP, PAUSE
  1835. evcb : TIME_EVCB;
  1836. end;
  1837. pControl_Parm = ^Control_Parm;
  1838. //******************************************************************************/
  1839. // This structure is filled in by the amp mixer based on the instance */
  1840. // data. */
  1841. //******************************************************************************/
  1842. TYPE AUDIOMODE = record // audio mode fields for DDCMDRegister */
  1843. lSRate:LongInt; // sample rate */
  1844. lBitsPerSRate:LongInt; // bits per sample */
  1845. sChannels:Integer; // Channels */
  1846. end;
  1847. TYPE PAUDIOMODE=^AUDIOMODE;
  1848. TYPE ddCmdRegister = record
  1849. ulFunction : LongInt; // Function requested by SH
  1850. hStream : HSTREAM; // Stream handle needed @ interrupt time
  1851. ulSysFileNum : LongInt; // Device Handle so pdd can map device instance to hstream
  1852. pSHDEntryPoint : SHDFN; // Stream handler entry point
  1853. ulStreamOperation : LongInt; // SH input Record or play
  1854. spcbkey : SPCBKEY;
  1855. ulBufSize : LongInt; // PDD output (optional) buffer size in bytes for SPCB
  1856. ulNumBufs : LongInt; // PDD output (optional) # of buffers for SPCB
  1857. ulAddressType : LongInt; // PDD output (required) addr ptr type to data buffer
  1858. ulBytesPerUnit : LongInt; // PDD output (required)
  1859. mmtimePerUnit : MMTIME; // PDD output (required)
  1860. AudioMode : AUDIOMODE; // SH input Device Control Block
  1861. hid : HID; // SH input stream handler id
  1862. end;
  1863. pddCmdRegister = ^ddCmdRegister;
  1864. //****************************/
  1865. // ulStreamOperation defines*/
  1866. //****************************/
  1867. const
  1868. // ulStreamOperation defines
  1869. STREAM_OPERATION_MASK = $C000;
  1870. STREAM_OPERATION_CONSUME = $8000;
  1871. STREAM_OPERATION_PRODUCE = $C000;
  1872. //******************************************************************************/
  1873. // ulAddressType defines */
  1874. // The PDD will tell the SH what type of address ptr it expects the data buffer*/
  1875. // to be. The SH will then request this address type to the SSM, so that the */
  1876. // SSM will send the correct type of each buffer request. */
  1877. //******************************************************************************/
  1878. ADDRESS_TYPE_VIRTUAL = 0;
  1879. ADDRESS_TYPE_PHYSICAL = 1; //default
  1880. ADDRESS_TYPE_LINEAR = 2;
  1881. type
  1882. ddCmdDeregister = record
  1883. ulFunction : LongInt; // Function requested by SH
  1884. Stream : hStream; // Stream handle needed @ interrupt time
  1885. end;
  1886. pddCmdDeregister = ^ddCmdDeregister;
  1887. //***************************************************************************/
  1888. //*** RING 0 Stream Handler SHD Interfaces ***/
  1889. //***************************************************************************/
  1890. const
  1891. // RING 0 Stream Handler SHD's:
  1892. SHD_REPORT_INT = 0; // PDD reports interrupt has arrived
  1893. SHD_REPORT_EVENT = 1; // PDD reports cuetime has arrived
  1894. type
  1895. shd_Common = record
  1896. ulFunction : LongInt; // Function requested by PDD
  1897. Stream : hStream; // Stream handle needed @ interrupt time
  1898. end;
  1899. pshd_Common = ^shd_Common;
  1900. type shd_ReportInt = record
  1901. ulFunction : LongInt; // Function requested by PDD
  1902. hStream : HSTREAM; // so SH knows which stream to process
  1903. pBuffer : Pointer; // return ptr to last used buffer
  1904. ulFlag : LongInt; // reason for interrupt
  1905. ulStatus : LongInt; // rc or bytes read/written
  1906. ulStreamTime : LongInt; // time in milliseconds of stream position
  1907. end;
  1908. pshd_ReportInt = ^shd_ReportInt;
  1909. //******************/
  1910. // ulFlag settings */
  1911. //******************/
  1912. const
  1913. // ulFlag settings
  1914. ERROR = $80;
  1915. STREAM_STOP_NOW = $40;
  1916. SHD_READ_COMPLETE = 1;
  1917. SHD_WRITE_COMPLETE = 2;
  1918. type
  1919. shd_ReportEvent = record
  1920. ulFunction : LongInt; // Function requested by PDD
  1921. hStream : HSTREAM; // so SH knows which stream to process
  1922. hEvent : hEvent; // event handle pass back to stream handler
  1923. ulStreamTime : LongInt; // time in milliseconds of stream position
  1924. end;
  1925. pshd_ReportEvent = ^shd_ReportEvent;
  1926. //***************************************************************************/
  1927. //*** RING 3 Stream Handler SHD Interfaces ***/
  1928. //***************************************************************************/
  1929. //*** RING 3 Stream Handler SHD Interfaces **
  1930. const
  1931. // RING 3 Stream Handler SHD's: (Uses SpiSendMsg as interface)
  1932. SHC_REPORT_INT = $80000000; // ulMsgType for SHD_REPORT_INT
  1933. SHC_REPORT_EVENT = $80000001; // ulMsgType for SHD_REPORT_EVENT
  1934. //*********************************************
  1935. // *
  1936. // * MSG_REPORTINT Control Block.
  1937. // * pMsg field of SpiSendMsg api
  1938. // *
  1939. // **********************************************/
  1940. type
  1941. // MSG_REPORTINT Control Block.
  1942. // pMsg field of SpiSendMsg api
  1943. msg_ReportInt = record
  1944. ulMsgLen : LongInt; // Length of structure
  1945. pBuffer : Pointer; // return ptr to last used buffer
  1946. ulFlag : LongInt; // reason for interrupt
  1947. ulStatus : LongInt; // rc or bytes read/written
  1948. ulStreamTime : LongInt; // time in milliseconds of stream position
  1949. end;
  1950. pmsg_ReportInt = ^msg_ReportInt;
  1951. // For ulFlag defines, refer to the _shd_reportint_parm structure */
  1952. //*********************************************
  1953. // *
  1954. // * MSG_REPORTEVENT Control Block.
  1955. // * pMsg field of SpiSendMsg api
  1956. // *
  1957. // **********************************************/
  1958. type
  1959. // MSG_REPORTEVENT Control Block.
  1960. // pMsg field of SpiSendMsg api
  1961. msg_ReportEvent = record
  1962. ulMsgLen : LongInt; // Length of structure
  1963. hevent : hEvent; // event handle pass back to stream handler
  1964. ulStreamTime : LongInt; // time in milliseconds of stream position
  1965. end;
  1966. type pmsg_ReportEvent = ^msg_ReportEvent;
  1967. //***************************************************************************/
  1968. // F U N C T I O N P R O T O T Y P E S */
  1969. //***************************************************************************/
  1970. //RC FAR SHDEntryPoint(PSHD_COMMON pCommon);
  1971. //RC FAR DDCMDEntryPoint(PDDCMDCOMMON pCommon);
  1972. //***************************************************************************\
  1973. //* *
  1974. //* Multimedia Mixer Software Development Kit Include File *
  1975. //* *
  1976. //* *
  1977. //***************************************************************************/
  1978. // Converted by Andry Svirgunov. Email: [email protected] */
  1979. // 14.11.2002 */
  1980. // */
  1981. //***************************************************************************/
  1982. TYPE HMIXER = longint;
  1983. TYPE PHMIXER = ^HMIXER;
  1984. TYPE _MIXERLINEINFO = RECORD
  1985. ulLength : LongInt; //length of the struct */
  1986. ulNumChannels : LongInt; // number of channels on input */
  1987. ulSupport : LongInt; // supported functionality (MIXLINEINFO) */
  1988. ulConnectionsPossible : LongInt;// lines connectable to */
  1989. ulLine : LongInt; // which line to operate on */
  1990. end;
  1991. TYPE PMIXERLINEINFO = ^_MIXERLINEINFO;
  1992. TYPE _LINECONNECTIONS = RECORD
  1993. ulLength : Longint; // length of the struct */
  1994. ulConnection : LongInt;
  1995. ulLine : Longint;
  1996. ulFlags : LongInt;
  1997. end;
  1998. TYPE PLINECONNECTIONS = ^_LINECONNECTIONS;
  1999. // flags for MIXERCONTROL ulFlags field */
  2000. CONST
  2001. MIX_MASTER = $000000001; // indicates that this is master effect for the control */
  2002. TYPE _MIXERCONTROL = RECORD
  2003. ulLength : LongInt; // length of the struct */
  2004. ulLine : LongInt;
  2005. ulControl : LongInt;
  2006. ulSettings : LongInt;
  2007. ulFlags : LongInt;
  2008. end;
  2009. TYPE PMIXERCONTROL = ^_MIXERCONTROL;
  2010. // -- need masteraudio command for the following. */
  2011. // flags for MIXERLINEINFO ulSupport field */
  2012. CONST
  2013. MIX_BALANCE = $00100000; // separate balance volume control */
  2014. MIX_ALC = $00000004; // supports Auto Level Control */
  2015. MIX_MONITOR = $00000002; // supports Monitor Control */
  2016. MIX_CROSSOVER = $00000010; // supports crossover change */
  2017. MIX_LOUDNESS = $00000020; // supports loudness equalization */
  2018. MIX_MUTE = $00000040; // supports channel mute */
  2019. MIX_REVERB = $00000080; // supports reverb */
  2020. MIX_STEREOENHANCE = $00000100; // supports stereo enhance */
  2021. MIX_CUSTOM1 = $00000200; // supports custom effect #1 */
  2022. MIX_CUSTOM2 = $00000400; // supports custom effect #2 */
  2023. MIX_CUSTOM3 = $00000800; // supports custom effect #3 */
  2024. MIX_LRVOLUME = $00001000; // separate left-right volume control */
  2025. MIX_BASS = $00800000; // supports Bass */
  2026. MIX_MID = $00020000; // supports Mid */
  2027. MIX_TREBLE = $00400000; // supports Treble */
  2028. MIX_PITCH = $00200000; // supports pitch modifications */
  2029. MIX_GAIN = $01000000; // supports gain modifications */
  2030. MIX_CHORUS = $00004000; // supports Bass */
  2031. MIX_VOLUME = 000800000; // supports volume controls */
  2032. MIX_STEREO_OFF = $00000000;
  2033. MIX_STEREO_STUDIO = $40004000;
  2034. MIX_STEREO_HALL = $80008000;
  2035. MIX_STEREO_STADIUM= $C000C000;
  2036. MCI_STEREO_OFF = $00000000;
  2037. MCI_STEREO_STUDIO = $00000001;
  2038. MCI_STEREO_HALL = $00000002;
  2039. MCI_STEREO_STADIUM= $00000004;
  2040. MIX_LOUDNESS_OFF = $00000000;
  2041. MIX_LOUDNESS_ON = $FFFFFFFF;
  2042. MCI_LOUDNESS_OFF = $00000000;
  2043. MCI_LOUDNESS_ON = $FFFFFFFF;
  2044. // ERROR MESSAGES */
  2045. CONST
  2046. MIXERR_BASE = 512;
  2047. MIXERR_NOERR = 0;
  2048. MIXERR_INVALIDHANDLE = MIXERR_BASE+0;
  2049. MIXERR_INVALIDINPUT = MIXERR_BASE+1;
  2050. MIXERR_INVALIDOUTPUT = MIXERR_BASE+2;
  2051. MIXERR_NOTSUPPORTED = MIXERR_BASE+7;
  2052. // INPUT LINES */
  2053. // SOURCES */
  2054. IN_SYNTHESIZER = 0;
  2055. IN_MIXER = 1;
  2056. IN_EXTERNAL = 2;
  2057. IN_INTERNAL = 3;
  2058. IN_MICROPHONE = 4;
  2059. IN_PCM = 5;
  2060. IN_PC_SPEAKER = 6;
  2061. // SINKS */
  2062. OUT_AMPLIFIER = 0;
  2063. OUT_PCM = 1;
  2064. // SOURCES */
  2065. SOURCE_SYNTHESIZER = $000000001;
  2066. SOURCE_LINE = $000000002;
  2067. SOURCE_INTERNAL_AUDIO = $000000004;
  2068. SOURCE_MICROPHONE = $000000008;
  2069. SOURCE_WAVE = $000000010;
  2070. SOURCE_PC_SPEAKER = $000000020;
  2071. SOURCE_NULL = $000000040;
  2072. SOURCE_MIDI = $000000080;
  2073. // SINKS */
  2074. // lad--these defines are invalid. */
  2075. SINK_LINE_OUT = $000100000;
  2076. SINK_SPEAKER = $000200000;
  2077. SINK_HEADPHONES = $000400000;
  2078. SINK_NULL = $000800000;
  2079. SINK_ALL = $001000000;
  2080. // lad--wpos addition */
  2081. SINK_WAVE = $002000000;
  2082. SINK_MIDI = $004000000;
  2083. //*************************START OF SPECIFICATIONS **************************/
  2084. // */
  2085. // Module NAME: MCD.H */
  2086. // */
  2087. // */
  2088. // OS/2 2.0 Multimedia Extensions MCD structures and definitions */
  2089. // */
  2090. // Copyright (c) International Business Machines Corporation 1990,1991 */
  2091. // All Rights Reserved */
  2092. //*--------------------------------------------------------------------------*/
  2093. //* Converted by Andry Svirgunov. Email: [email protected] */
  2094. //* 14.11.2002 */
  2095. //* */
  2096. //************************//END OF SPECIFICATIONS ***************************/
  2097. CONST
  2098. LIST_LEN=8;
  2099. LINE_IN_ON =$00000001;
  2100. MIC_ON =$00000002;
  2101. LINE_OUT_ON =$00000004;
  2102. TYPE
  2103. PSZ = PChar;
  2104. SHandle = Word;
  2105. HFile = SHandle;
  2106. // HMTX = Longint;
  2107. //-------------------------------------------------------------------------*
  2108. //RIFF to ACPA Mode conversion Table
  2109. //------------------------------------------------------------------------*/
  2110. TYPE RIFFTABLE = Record
  2111. ulDataType:LongInt;
  2112. ulAUDIODDMode:LongInt;
  2113. end;
  2114. TYPE _MCI_PORT_LIST = Record // devid */
  2115. ulDevType:LongInt;
  2116. ulDevNum:LongInt;
  2117. end;
  2118. //-------------------------------------------------------------------------*
  2119. //Amp/Mixer instance structure declaration
  2120. //------------------------------------------------------------------------*/
  2121. TYPE _MCI_AMP_INSTANCE = Record
  2122. szDeviceName:Array [0..128] of char;
  2123. szDriverName:Array [0..15] of char;
  2124. hFile:HFile;
  2125. usDeviceID:Integer;
  2126. ulGlobalFile:LongInt;
  2127. usMasterVolume:Integer;
  2128. lLeftVolume:LongInt;
  2129. lRightVolume:LongInt;
  2130. lVolumeDelay:LongInt;
  2131. lBalance:LongInt;
  2132. lBalanceDelay:LongInt;
  2133. lBass:LongInt;
  2134. lTreble:LongInt;
  2135. lPitch:LongInt;
  2136. lGain:LongInt;
  2137. lSRate:LongInt;
  2138. lBitsPerSRate:LongInt;
  2139. lBsize:LongInt;
  2140. sMode:Integer;
  2141. sChannels:Integer;
  2142. ulFlags:LongInt;
  2143. lMonitor:LongInt;
  2144. lInput:LongInt;
  2145. lOutput:LongInt;
  2146. ulOperation:LongInt;
  2147. ulGainLevel:LongInt;
  2148. ulStoreRVolume:LongInt;
  2149. ulStoreLVolume:LongInt;
  2150. ulDosOpened:LongInt;
  2151. ulInitOpen:LongInt;
  2152. ulMasterVolume:LongInt;
  2153. ulActive:LongInt;
  2154. lStoreSRate:LongInt;
  2155. lStoreBitsPerSRate:LongInt;
  2156. ulStoreOperation:LongInt;
  2157. sStoreMode:Integer;
  2158. sStoreChannels:Integer;
  2159. ulSetAmpDefaults:LongInt;
  2160. ulDefaultsSet:LongInt;
  2161. ulOutputDev:LongInt;
  2162. ulInputDev:LongInt;
  2163. ulResourcesUsed:LongInt;
  2164. ulRestoreNotify:LongInt;
  2165. ulCallback:LongInt;
  2166. sUserParm:Integer;
  2167. lNotifyFlag:LongInt;
  2168. // LONG ( //APIENTRY pfnAUDIOIF) ( PVOID, LONG, LONG, LONG, LONG);
  2169. hmtxInstanceSem:HMTX;
  2170. ulClass:LongInt;
  2171. ulBlockAlignment:LongInt;
  2172. ulHardwareMode:LongInt;
  2173. rInputList:Array [0.. LIST_LEN ] of _MCI_PORT_LIST;
  2174. rOutputList:Array [0.. LIST_LEN ] of _MCI_PORT_LIST;
  2175. ulNumInputs:LongInt;
  2176. ulNumOutputs:LongInt;
  2177. ulDataType:LongInt;
  2178. ulSubType:LongInt;
  2179. ulBytesPerBlock:LongInt;
  2180. ulMMTimePerBlock:LongInt;
  2181. //-------------------------------------------------------------------------*
  2182. //New resource management stuff
  2183. //------------------------------------------------------------------------*/
  2184. pAudioModeData:Pointer; // ptr to dev. specific resource data */
  2185. pResourceDLL:Array [0.. 128 ] of Char;
  2186. pProdInfo:PSZ; // pointer to the product name */
  2187. ulDeviceID:LongInt; // pointer to the device id. */
  2188. ulNumMappingRows:LongInt; // num of RIFF->AUDIODD mapping modes */
  2189. ulMatch:LongInt;
  2190. pMapTable:^RIFFTABLE; // additional RIFF->AUDIODD mappings */
  2191. ulNumDataTypes:LongInt; // number of datatypes to check */
  2192. pDataTypeTable:Pointer;
  2193. fMute:Boolean;
  2194. ulResourceID:LongInt; // offset in the resource dll to use */
  2195. ulConnDefaults:LongInt; // Default values for connectors */
  2196. end;
  2197. TYPE PMCI_AMP_INSTANCE = ^_MCI_AMP_INSTANCE;
  2198. const
  2199. MIDINAMESIZE = 40;
  2200. MIDIPATCHNUM = 128;
  2201. MIDITYPEAPPNAME = 'MidiTypes'; // Appname in MIDITYPE.INI
  2202. //*******************************************************************/
  2203. // These structures describe the format of the MIDI maps that are */
  2204. // located in the MIDITYPE.INI file. */
  2205. //*******************************************************************/
  2206. type
  2207. // These structures describe the format of the MIDI maps that are
  2208. // located in the MIDITYPE.INI file.
  2209. MidiTypeEntry = record
  2210. uGenMidiPatchNumber : Integer; // Device To General Midi Conversion
  2211. uDevMidiPatchNumber : Integer; // General Midi to Device Conversion
  2212. uVolumePercent : Integer; // Channel Patch Volume Scaler
  2213. uGenMidiKeyNumber : Integer; // Device To General Midi Perc. Key Conversion
  2214. uDevMidiKeyNumber : Integer; // General Midi to Device Perc. Key Conversion
  2215. end;
  2216. pMidiTypeEntry = ^MidiTypeEntry;
  2217. _MidiType = record
  2218. uStyle : Integer; // Midi Style
  2219. uDrums10 : Integer; // Patch 10 Drums if Perckey not supported
  2220. uDrums16 : Integer; // Patch 16 Drums if Perckey not supported
  2221. ulReserved : LongInt; // Reserved
  2222. MidiTypeEntry : array[0..midiPatchNum-1] of MIDITYPEENTRY;
  2223. // Array of MIDITYPEENTRYs
  2224. szPatchAndPercKeyName: array[0..2*MIDIPATCHNUM*MIDINAMESIZE-1] of char;
  2225. // List of 128 Patch Names
  2226. // that are null terminated, then a
  2227. // list of 128 Percussion key names that
  2228. // are double null terminated
  2229. // Each item is null terminated
  2230. end;
  2231. MidiTpye=_MidiType;
  2232. pMidiType = ^_MidiType;
  2233. const
  2234. // Style Flags
  2235. MT_PERCUSSIONKEYS = $1; // Percussion Keys are supported
  2236. MT_MAPPERCKEYPATCHES = $2; // Map Percussion Key Patches
  2237. CONST
  2238. STATUS_BIT = $80;
  2239. TRACK_OFF = 0;
  2240. TRACK_ON = 1;
  2241. NORMAL_SYSEX = $F0;
  2242. ESCAPE_SYSEX = $F7;
  2243. // User defined messages for IO PROC
  2244. MMIOM_START = $0E00;
  2245. MMIOM_USER = $0F00;
  2246. MMIOM_GETHEADER = MMIOM_START + 9;
  2247. META = $FF;
  2248. // Meta stuff */
  2249. // user defined messages for IO PROC */
  2250. MMIO_SEQ = MMIOM_USER + 1;
  2251. MMIO_MERGE = MMIOM_USER + 2;
  2252. MMIO_FROM_SEQ = MMIOM_USER + 3;
  2253. MMIO_TIMED_READ = MMIOM_USER + 4;
  2254. MMIO_SET_TRACKS = MMIOM_USER + 5;
  2255. MMIO_FORMAT_O = MMIOM_USER + 6;
  2256. MMIO_GETHEADER = MMIOM_GETHEADER;
  2257. MMIO_GETFILELENTH = MMIOM_USER +10;
  2258. MMIO_GETTRACKLENGTH = MMIOM_USER + 11;
  2259. type
  2260. MidiHeader = record // midi header //
  2261. chHeaderChunk : array[0..3] of Char;
  2262. case Boolean of
  2263. true: (
  2264. dwHeaderLength : Dword;
  2265. wFormat : Word;
  2266. wNumTracks : Word;
  2267. wDivision : Word;
  2268. vpAdditionalInformation_ : ^LongInt;
  2269. );
  2270. false: (
  2271. ulHeaderLength : LongInt;
  2272. usFormat : Integer;
  2273. usNumTracks : Integer;
  2274. usDivision : Integer;
  2275. vpAdditionalInformation : Pointer;
  2276. )
  2277. end;
  2278. pMidiHeader = ^MidiHeader;
  2279. mmMidiHeader = record
  2280. case boolean of
  2281. true: (
  2282. ulHeaderLength : LongInt; // Length in Bytes
  2283. ulContentType : LongInt; // Image content
  2284. ulMediaType : LongInt; // type of media
  2285. midiheader : MidiHeader; // header
  2286. );
  2287. false: (
  2288. dwHeaderLength : DWORD; // Length in Bytes */
  2289. dwContentType : DWORD; // Image content */
  2290. dwMediaType : DWORD; // type of media */
  2291. midiheader_ : MIDIHEADER; // header */
  2292. )
  2293. end;
  2294. pmmMidiHeader = ^mmMidiHeader;
  2295. //***************************************************************************/
  2296. // */
  2297. // Module Name: EVCB.H */
  2298. // */
  2299. // OS/2 2.0 Multimedia Extensions Sync/Stream Manager Event Control */
  2300. // Block defintitions. */
  2301. // */
  2302. // Copyright (c) International Business Machines Corporation 1991, 1992 */
  2303. // All Rights Reserved */
  2304. //***************************************************************************/
  2305. // Converted by Andry Svirgunov. Email: [email protected] */
  2306. // 14.11.2002 */
  2307. // */
  2308. //***************************************************************************/
  2309. //*********************************************
  2310. // * List of Implicit events:
  2311. // * EVENT_EOS - Use IMPL_EVCB
  2312. // * EVENT_ERROR - Use IMPL_EVCB
  2313. // * EVENT_STREAM_STOPPED - Use IMPL_EVCB
  2314. // * EVENT_SYNC_PREROLLED - Use IMPL_EVCB
  2315. // * EVENT_PLAYLISTMESSAGE - Use PLAYL_EVCB
  2316. // * EVENT_PLAYLISTCUEPOINT - Use PLAYL_EVCB
  2317. // * EVENT_QUEUE_OVERFLOW - Use IMPL_EVCB
  2318. // **********************************************/
  2319. //*********************************************
  2320. // * List of Explicit events:
  2321. // * EVENT_SYNCOVERRUN - Use OVRU_EVCB
  2322. // * EVENT_CUE_TIME - Use TIME_EVCB
  2323. // * EVENT_CUE_DATA - Use DATA_EVCB
  2324. // * EVENT_DATAUNDERRUN - Use EVCB
  2325. // * EVENT_DATAOVERRUN - Use EVCB
  2326. // * EVENT_CUE_TIME_PAUSE - Use TIME_EVCB
  2327. // **********************************************/
  2328. CONST
  2329. EVENT_SYNCOVERRUN =$4;
  2330. EVENT_CUE_TIME =$5; // Cue point in terms of stream time*/
  2331. EVENT_CUE_DATA =$6; // Cue point in terms of data items */
  2332. EVENT_DATAUNDERRUN =$7; // data underrun event from SH */
  2333. EVENT_DATAOVERRUN =$8; // data underrun event from SH */
  2334. EVENT_CUE_TIME_PAUSE =$9; // Pause when cue-point reached. */
  2335. EVENT_STATUS_LEVEL =$10; // Report status level */
  2336. //*********************************************
  2337. // * SYNC_EVCB - Sync Pulse Event Control Block
  2338. // * (This event is only seen by
  2339. // * stream handlers)
  2340. // **********************************************/
  2341. EVENT_SYNC =$1; // Synchronization point in stream */
  2342. TYPE _SYNC_EVCB = RECORD // syevcb */
  2343. ulType:LongInt; // EVENT_SYNC */
  2344. ulSubType:LongInt; // Not used */
  2345. ulSyncFlags:LongInt; // 0 (input),status (output) */
  2346. hstream:LongInt; // handle to stream for this event */
  2347. hid:LongInt; // Handler id */
  2348. ulStatus:LongInt; // Event status (output) */
  2349. mmtimeStart:MMTIME; // Filled in by Sync/Stream manager */
  2350. // at SpiEnableSync time. (input) */
  2351. mmtimeMaster:MMTIME; // Filled in by Master SH (input) */
  2352. mmtimeSlave:MMTIME; // Filled in by slave SH. (output) */
  2353. end;
  2354. TYPE PSYNC_EVCB = ^_SYNC_EVCB; // Ptr to a EVCB */
  2355. // ulSyncFlags:
  2356. CONST
  2357. SYNCOVERRUN =$0001; // Set by SSM if sync pulse comes in before */
  2358. // a has processed the current sync pulse. */
  2359. SYNCPOLLING =$0002; // SSM set this after filling the handler EVCB.*/
  2360. // Handler resets it after it processes the */
  2361. // contents of EVCB. The SSM must check this */
  2362. // bit before modifying EVCB. If bit already */
  2363. // set, set the SYNC overrun bit. */
  2364. EVENT_RESERVED =$2; // RESERVED */
  2365. //*********************************************
  2366. // * IMPL_EVCB - Implicit Event Control Block
  2367. // * (This is a parameter on the
  2368. // * SpiCreatStrem API)
  2369. // **********************************************/
  2370. EVENT_IMPLICIT_TYPE=$3; // These events are always supported*/
  2371. TYPE _IMPL_EVCB = RECORD // imevcb */
  2372. ulType:LongInt; // EVENT_IMPLICIT_TYPE */
  2373. ulSubType:LongInt; // One of the implicit events (input) */
  2374. ulFlags:LongInt; // 0 (Input), status (Output) */
  2375. hstream:LongInt; // handle to stream for this event (input/output) */
  2376. hid:LongInt; // 0 (input), handler Id (output) */
  2377. ulStatus:LongInt; // Event status/error return code (output) */
  2378. unused1:LongInt; // 0 (input) */
  2379. unused2:LongInt; // 0 (input) */
  2380. unused3:LongInt; // 0 (input) */
  2381. end;
  2382. TYPE PIMPL_EVCB = ^_IMPL_EVCB;
  2383. // ulSubtype: */
  2384. CONST
  2385. EVENT_EOS =$1; // End of Stream */
  2386. EVENT_ERROR =$2; // Error in Stream handler or device driver */
  2387. EVENT_STREAM_STOPPED =$3; // Stream is in a stopped state (Discard or Flush) */
  2388. EVENT_SYNC_PREROLLED =$4; // All streams are prerolled (buffers */
  2389. // have been filled by the Source SH's.*/
  2390. EVENT_PLAYLISTMESSAGE =$5; // Memory SH playlist message event */
  2391. EVENT_PLAYLISTCUEPOINT =$6; // Memory SH playlist cue point */
  2392. EVENT_QUEUE_OVERFLOW =$7; // Event Queue overflow. Indicates lost */
  2393. // events. Application must use this */
  2394. // to clear any waiting conditions. */
  2395. EVENT_START =$8; // Start stream */
  2396. //*********************************************
  2397. // * PLAYL_EVCB - Playlist Message Event Control Block
  2398. // **********************************************/
  2399. // (IMPLICIT EVENT) */
  2400. TYPE _PLAYL_EVCB=RECORD // plevcb */
  2401. ulType:LongInt; // EVENT_IMPLICIT_TYPE */
  2402. ulSubType:LongInt; // EVENT_PLAYLISTMESSAGE or EVENT_PLAYLISTCUEPOINT */
  2403. ulFlags:LongInt; // 0 (input), status (output) */
  2404. hstream:LongInt; // handle to stream for this event (input/output) */
  2405. hid:LongInt; // 0 (input), handler Id (output) */
  2406. ulStatus:LongInt; // Playlist Instruction number (output) */
  2407. ulMessageParm:LongInt; // 0 (input), Message from playlist (output) */
  2408. unused1:LongInt; // 0 (input) */
  2409. unused2:LongInt; // 0 (input) */
  2410. end;
  2411. TYPE PPLAYL_EVCB = ^_PLAYL_EVCB; // Ptr to a EVCB */
  2412. //*********************************************
  2413. // * OVRU_EVCB - Sync Overrun Event Control Block
  2414. // * (Applications can request to be
  2415. // * notified whenever a Sync overrun
  2416. // * occurs.
  2417. // **********************************************/
  2418. TYPE _OVRU_EVCB = RECORD // ovevcb */
  2419. ulType:LongInt; // EVENT_SYNCOVERRUN */
  2420. ulSubType:LongInt; // Not used */
  2421. ulFlags:LongInt; // 0 (input), status (output) */
  2422. hstream:LongInt; // handle to stream for this event (input/output) */
  2423. hid:LongInt; // handler Id (input/output) */
  2424. ulStatus:LongInt; // Event status/error return code (output) */
  2425. mmtimeSlave:MMTIME; // 0 (input), Slave stream time (output) */
  2426. mmtimeStart:MMTIME; // 0 (input), Slave start offset (offset) */
  2427. mmtimeMaster:MMTIME; // 0 (input), Master stream time (output) */
  2428. end;
  2429. TYPE POVRU_EVCB = ^_OVRU_EVCB; // Ptr to a EVCB */
  2430. //*********************************************
  2431. // * TIME_EVCB - Cue Time Event Control Block
  2432. // * (Applications can request to be
  2433. // * notified for a time cue point)
  2434. // **********************************************/
  2435. TYPE _TIME_EVCB = RECORD // tievcb */
  2436. ulType:LongInt; // EVENT_CUE_TIME */
  2437. ulSubType:LongInt; // Not used */
  2438. ulFlags:LongInt; // Single/Recurring(input/output) */
  2439. hstream:LongInt; // handle to stream for this event (input/output)*/
  2440. hid:LongInt; // handler Id (input/output) */
  2441. ulStatus:LongInt; // Event status/error return code (output) */
  2442. mmtimeStream:MMTIME; // Stream time (input/output) */
  2443. unused1:LongInt; // 0 (input) */
  2444. unused2:LongInt; // 0 (input) */
  2445. end;
  2446. //TYPE PTIME_EVCB = ^_TIME_EVCB; // Ptr to a EVCB */
  2447. // */
  2448. // ulFlags: */
  2449. CONST
  2450. EVENT_SINGLE =$0; // This is single one time event */
  2451. EVENT_RECURRING =$1; // This is recurring event */
  2452. //*********************************************
  2453. // * DATA_EVCB - Cue Data Event Control Block
  2454. // * (Applications can request to be
  2455. // * notified for a data cue point)
  2456. // **********************************************/
  2457. TYPE _DATA_EVCB = RECORD // daevcb */
  2458. ulType:LongInt; // EVENT_CUE_DATA */
  2459. ulSubType:LongInt; // Event SubType */
  2460. ulFlags:LongInt; // Single/Recurring(input/output) */
  2461. hstream:LongInt; // handle to stream for this event (input/output) */
  2462. hid:LongInt; // handler Id (input/output) */
  2463. ulStatus:LongInt; // Event status/error return code (output) */
  2464. mmtimeStream:MMTIME; // Stream time (input/output) */
  2465. ulEventParm1:LongInt; // Data to Cue on (input/output) */
  2466. // This is interpreted by the stream handler */
  2467. ulEventParm2:LongInt; // Length of data cue buffer (input/output) */
  2468. end;
  2469. TYPE PDATA_EVCB = ^_DATA_EVCB; // Ptr to a EVCB */
  2470. // ulFlags: */
  2471. //#define EVENT_SINGLE 0L This is single one time event */
  2472. //#define EVENT_RECURRING 1L This is recurring event */
  2473. CONST
  2474. EVENT_DATAPTR =$2; // ulEventParm1 if ptr to buffer and*/
  2475. // ulEventParm2 is a length of buffer, */
  2476. // else ulEventParm1 is data. */
  2477. //*****************
  2478. // * EVCB_ulType: (Stream Handler defined types)
  2479. // ******************/
  2480. SH_TYPE =$80000000; // Stream Handler defined types must */
  2481. // have the high order bit set in the*/
  2482. // ulType field. */
  2483. // events: 0H - 7FFFFFFFH are reserved!*/
  2484. //*********************************************
  2485. // * EVCB - Generic Event Control Block (Use the
  2486. // * specific one in the SSM.H if possible)
  2487. // **********************************************/
  2488. TYPE _EVCB = RECORD // evcb */
  2489. ulType:LongInt; // Event type (input) */
  2490. ulSubType:LongInt; // Event SubType (input) */
  2491. ulFlags:LongInt; // 0 (Input), status (Output) */
  2492. hstream:LongInt; // handle to stream for this event */
  2493. hid:LongInt; // handler Id (input/output) */
  2494. ulStatus:LongInt; // Event status (output) */
  2495. ulEventParm1:LongInt; // Event parameters (input), HID if implicit event */
  2496. ulEventParm2:LongInt; // Event parameters (input) */
  2497. ulEventParm3:LongInt; // Event parameters (input) */
  2498. end;
  2499. TYPE PEVCB = ^_EVCB; // Ptr to a EVCB */
  2500. //*********************************************
  2501. // * STATUS_LEVEL_EVCB - Status Level Event Control Block
  2502. // **********************************************/
  2503. TYPE _STATUS_LEVEL_EVCB = RECORD // stevcb */
  2504. // standard part */
  2505. ulType:LongInt; // Event type (input) */
  2506. ulSubType:LongInt; // Event SubType (input) */
  2507. pMCDInstance:LongInt; // for MCD use */
  2508. hstream:LongInt; // handle to stream for this event */
  2509. hid:LongInt; // handler Id (input/output) */
  2510. // custom part */
  2511. ulSample:ARRAY [0..4] OF LongInt; // Samples */
  2512. end;
  2513. TYPE PSTATUS_EVCB = ^_STATUS_LEVEL_EVCB; // Ptr to a EVCB */
  2514. //***************************************************************************/
  2515. // */
  2516. // Module Name: DCB.H */
  2517. // */
  2518. // OS/2 2.0 Multimedia Extensions Sync/Stream Manager Device Control */
  2519. // Block defintitions. */
  2520. // */
  2521. // Copyright (c) International Business Machines Corporation 1991, 1992 */
  2522. // All Rights Reserved */
  2523. //***************************************************************************/
  2524. // Converted by Andry Svirgunov. Email: [email protected] */
  2525. // 14.11.2002 */
  2526. // */
  2527. //***************************************************************************/
  2528. CONST MAX_SPI_NAME = 9;
  2529. //**************************************************************************
  2530. // *
  2531. // * DCB - Common Device Control Block
  2532. // * (*** PACKED STRUCTURE ***)
  2533. // ***************************************************************************/
  2534. TYPE _DCB = RECORD // dcb - Device Control Block */
  2535. ulDCBLen : LongInt; // length of structure */
  2536. szDevName: Array [0..MAX_SPI_NAME] of char;// device driver name */
  2537. end;
  2538. TYPE PDCB = ^_DCB;
  2539. //**************************************************************************
  2540. // *
  2541. // * E_DCB - Extended Device Control Block
  2542. // *
  2543. // * This structure will grow over time as new fields are added
  2544. // * to the end of the structure. If you manipulate the structure,
  2545. // * be sure to check the length field.
  2546. // *
  2547. // * (*** PACKED STRUCTURE ***)
  2548. // ***************************************************************************/
  2549. TYPE E_DCB = RECORD // e_dcb - Extended Device Control Block */
  2550. ulDCBLen : LongInt; // length of structure */
  2551. szDevName: Array [0..MAX_SPI_NAME] of char;// device driver name */
  2552. ulSysFileNum: LongInt; // file handle number */
  2553. end;
  2554. TYPE PE_DCB = ^E_DCB;
  2555. TYPE PDCB_AUDIOSH = ^E_DCB;
  2556. //**************************************************************************
  2557. // *
  2558. // * VSD_DCB - VSD Device Control Block
  2559. // *
  2560. // * This structure will allow stream handlers to use the VSD DLL
  2561. // * by using by the additional fields in the structure.
  2562. // *
  2563. // * (*** PACKED STRUCTURE ***)
  2564. // ***************************************************************************/
  2565. TYPE _VSD_DCB = RECORD // vsd_dcb - VSD Device Control Block */
  2566. ulDCBLen : Longint; // length of structure */
  2567. szDevName: Array [0..MAX_SPI_NAME] of char;// device driver name */
  2568. ulSysFileNum: LongInt; // file handle number */
  2569. hvsd : LongInt; // Handle to VSD instance */
  2570. pfnEntryPoint : ^PFN; // Address of VSD entry point */
  2571. ulReserved1 : LongInt; // Reserved for system */
  2572. ulReserved2 : LongInt; // Reserved for system */
  2573. end;
  2574. TYPE PVSD_DCB = ^_VSD_DCB;
  2575. //****************************************************************************/
  2576. //* */
  2577. //* Module Name: ACB.H */
  2578. //* */
  2579. //* OS/2 2.0 Multimedia Extensions Sync/Stream Manager Associate */
  2580. //* Control Block Definitions. */
  2581. //* */
  2582. //* Copyright (c) International Business Machines Corporation 1991, 1992 */
  2583. //* All Rights Reserved */
  2584. //*--------------------------------------------------------------------------*/
  2585. //* Converted by Andry Svirgunov. Email: [email protected] */
  2586. //* 14.11.2002 */
  2587. //* */
  2588. //****************************************************************************/
  2589. CONST
  2590. MAX_PORT_NAME=40; // Max port name length */
  2591. MAX_PORTS =16; // Max number ports */
  2592. //**********************************************
  2593. // *
  2594. // * ACB - Associate Control Block
  2595. // *
  2596. // * Each stream handler must define the
  2597. // * ACB for each data object type that
  2598. // * expect ACB's from the application.
  2599. // *
  2600. // **********************************************/
  2601. TYPE _ACB = RECORD //* acb - Assoc. Control Block */
  2602. ulACBLen : LongInt; //* length of structure */
  2603. ulObjType : LongInt;
  2604. ulParm1 : LongInt;
  2605. ulParm2 : LongInt;
  2606. end;
  2607. TYPE PACB = ^_ACB; //* Ptr to an ACB */
  2608. //******************************************************
  2609. // * FSSH - File system stream handler MMIO Object ACB
  2610. // ******************************************************/
  2611. CONST
  2612. ACBTYPE_MMIO=$0001; //* MMIO object */
  2613. TYPE _ACB_MMIO = RECORD //* acbmmio - MMIO Assoc. Control Block */
  2614. ulACBLen : LongInt; //* length of structure */
  2615. ulObjType : LongInt; //* ACBTYPE_MMIO */
  2616. hmmio : HMMIO ; //* Handle of media element mgr obj */
  2617. end;
  2618. TYPE PACB_MMIO = ^_ACB_MMIO; //* Ptr to an ACB */
  2619. //******************************************************
  2620. // * MSH - Memory stream handler Playlist Object ACB
  2621. // ******************************************************/
  2622. CONST
  2623. ACBTYPE_MEM_PLAYL=$0003; //* Memory playlist object */
  2624. TYPE _ACB_MEM_PLAYL = RECORD //* acbplyl - File system Assoc. Control Block */
  2625. ulACBLen : LongInt; //* length of structure */
  2626. ulObjType : LongInt; //* ACBTYPE_MEM_PLAYL */
  2627. pMemoryAddr : Pointer; //* Starting address of memory obj */
  2628. end;
  2629. TYPE PACB_MEM_PLAYL = ^_ACB_MEM_PLAYL; //* Ptr to an ACB */
  2630. //******************************************************
  2631. // * CDDASH - CD DA stream handler Object ACB
  2632. // ******************************************************/
  2633. CONST
  2634. ACBTYPE_CDDA=$0004; //* Compact disk - digital audio obj*/
  2635. TYPE _ACB_CDDA = RECORD //* acbcdda - CD Assoc. Control Block */
  2636. ulACBLen : LongInt; //* length of structure */
  2637. ulObjType : LongInt; //* ACBTYPE_CDDA */
  2638. bCDDrive : Char; //* CD drive letter */
  2639. end;
  2640. TYPE PACB_CDDA = ^_ACB_CDDA; //* Ptr to an ACB */
  2641. //******************************************************
  2642. // * MISH - MIDI stream handler port-stream table ACB
  2643. // ******************************************************/
  2644. CONST
  2645. ACBTYPE_MISH=$0005; //* MIDI port-stream table */
  2646. TYPE _ACB_MISH = RECORD //* acbmish - MIDI Assoc. Control Block */
  2647. ulACBLen : LongInt; //* length of structure */
  2648. ulObjType: LongInt; //* ACBTYPE_MISH */
  2649. hStreamDefault : Longint;//* Default hstream to use when mapper */
  2650. //* is turned off. */
  2651. ulDeviceTypeID : LongInt;//* device type id */
  2652. ulpMapperPorts : LongInt;//* pointer to mapper port table */
  2653. ulNumInStreams : LongInt;
  2654. hStreamIn : Array [0..MAX_PORTS] of Longint;//* Array of Input streams */
  2655. ulNumOutStreams : LongInt;
  2656. hStreamsOut : Array [0..MAX_PORTS] of Longint;//* Array of Output streams */
  2657. //* The index into the array is */
  2658. //* the source channel for that */
  2659. //* stream. */
  2660. end;
  2661. TYPE PACB_MISH = ^_ACB_MISH; //* Ptr to MIDI associate control block */
  2662. //******************************************************
  2663. // * MISH - MIDI stream handler SET ACB
  2664. // ******************************************************/
  2665. CONST
  2666. ACBTYPE_SET=$0006; //* MIDI set function */
  2667. TYPE _ACB_SET = RECORD //* acbset - Set Assoc. Control Block */
  2668. ulACBLen :LongInt; //* length of structure */
  2669. ulObjType : LongInt; //* ACBTYPE_SET */
  2670. ulFlags : LongInt; //* Set flags */
  2671. ulReserved : Longint; //* Reserved */
  2672. end;
  2673. TYPE PACB_SET = ^_ACB_SET; //* Ptr to set associate control block */
  2674. //* ulFlags defines: */
  2675. CONST
  2676. MIDI_MAP_ON =$0000; //* turn mapping function on in MISH */
  2677. MIDI_MAP_OFF=$0001; //* turn mapping function off in MISH */
  2678. //******************************************************
  2679. // * NULLSH - Null stream handler user ACB
  2680. // ******************************************************/
  2681. ACBTYPE_NULLSH=$0007; //* User od Null stream handler */
  2682. TYPE _ACB_NULISH = RECORD //* acbnullsh - NULLSH Assoc. Control Block */
  2683. ulACBLen : LongInt; //* length of structure */
  2684. ulObjType : LongInt; //* ACBTYPE_NULLSH */
  2685. pfnEntry : PFN ; //* user callback entry point */
  2686. ulReserved : LongInt; //* Reserved */
  2687. end;
  2688. TYPE PACB_NULISH = ^_ACB_NULISH;//* Ptr to an ACB */
  2689. //******************************************************
  2690. // * MTSH - MultiTrack Stream Handler Object ACB
  2691. // ******************************************************/
  2692. CONST
  2693. ACBTYPE_MTSH=$0008; //* MTSH object */
  2694. TYPE _ACB_MTSH = RECORD //* acbmtsh - MTSH Assoc. Control Block */
  2695. ulACBLen : LongInt; //* length of structure */
  2696. ulObjType : Longint; //* ACBTYPE_MTSH */
  2697. hmmio : HMMIO; //* Handle of media element mgr obj */
  2698. mmtrackinfo : _MMTRACKINFO; //* track for this stream */
  2699. ulFlags : LongInt; //* flags */
  2700. ulMaxBytesPerSec : LongInt; //* Max bytes per second */
  2701. ulAvgBytesPerSec : Longint; //* Avg bytes per second */
  2702. mmtimePerFrame : MMTIME; //* frame display time or 0L */
  2703. ulTotalFrames : LongInt; //* total number of video frames */
  2704. end;
  2705. TYPE PACB_MTSH = ^_ACB_MTSH; //* Ptr to an ACB */
  2706. //* ulFlags defines: */
  2707. CONST
  2708. TRACK_ACTIVATE =$0000; //* Activate track in stream handler */
  2709. TRACK_DEACTIVATE =$0001; //* Deactivate track in stream handler */
  2710. //******************************************************
  2711. // * CSH - CODEC stream handler Object ACB
  2712. // ******************************************************/
  2713. ACBTYPE_CODECSH=$0009; //* CODEC object */
  2714. TYPE _ACB_CODECSH = RECORD //* acbcodecsh - CODEC SH acb */
  2715. ulACBLen : Longint; //* length of structure */
  2716. ulObjType : Longint; //* ACBTYPE_CODECSH */
  2717. hstreamToPair : LongInt;//* 2nd stream of pair */
  2718. pMmioInfo : Longint; //* info for IO Proc */
  2719. ulInfoLength : Longint; //* length of MmioInfo */
  2720. pCodecControl : Longint;//* CODEC control info */
  2721. ulControlLength : Longint;//* length of CodecControl */
  2722. end;
  2723. TYPE PACB_CODECSH = ^_ACB_CODECSH;//* Ptr to associate control block */
  2724. Implementation
  2725. Function mmioFOURCC(ch0,ch1,ch2,ch3:Char): Cardinal;
  2726. begin
  2727. mmioFOURCC:=Cardinal(ord(ch0)) or (Cardinal(ord(ch1)) shl 8) or
  2728. (Cardinal(ord(ch2)) shl 16) or (Cardinal(ord(ch3)) shl 24);
  2729. end;
  2730. Begin
  2731. FOURCC_R565:=mmioFOURCC( 'R', '5', '6', '5' );
  2732. FOURCC_R555:=mmioFOURCC( 'R', '5', '5', '5' );
  2733. FOURCC_R664:=mmioFOURCC( 'R', '6', '6', '4' );
  2734. FOURCC_RGB3:=mmioFOURCC( 'R', 'G', 'B', '3' );
  2735. FOURCC_BGR3:=mmioFOURCC( 'B', 'G', 'R', '3' );
  2736. FOURCC_RGB4:=mmioFOURCC( 'R', 'G', 'B', '4' );
  2737. FOURCC_BGR4:=mmioFOURCC( 'B', 'G', 'R', '4' );
  2738. FOURCC_LUT8:=mmioFOURCC( 'L', 'U', 'T', '8' );
  2739. FOURCC_LT12:=mmioFOURCC( 'L', 'T', '1', '2' );
  2740. FOURCC_GREY:=mmioFOURCC( 'G', 'R', 'E', 'Y' );
  2741. FOURCC_GY16:=mmioFOURCC( 'G', 'Y', '1', '6' );
  2742. FOURCC_Y888:=mmioFOURCC( 'Y', '8', '8', '8' );
  2743. FOURCC_Y2X2:=mmioFOURCC( 'Y', '2', 'X', '2' );
  2744. FOURCC_Y4X4:=mmioFOURCC( 'Y', '4', 'X', '4' );
  2745. FOURCC_YUV9:=mmioFOURCC( 'Y', 'U', 'V', '9' );
  2746. FOURCC_Y644:=mmioFOURCC( 'Y', '6', '4', '4' );
  2747. FOURCC_MONO:=mmioFOURCC( 'M', 'O', 'N', 'O' );
  2748. FOURCC_Y422:=mmioFOURCC( 'Y', '4', '2', '2' );
  2749. FOURCC_Y42B:=mmioFOURCC( 'Y', '4', '2', 'B' );
  2750. FOURCC_Y42D:=mmioFOURCC( 'Y', '4', '2', 'D' );
  2751. FOURCC_Y411:=mmioFOURCC( 'Y', '4', '1', '1' );
  2752. FOURCC_VGA :=mmioFOURCC( 'V', 'G', 'A', ' ' );
  2753. FOURCC_ULTI:=mmioFOURCC('U', 'L', 'T', 'I');
  2754. FOURCC_RT21:=mmioFOURCC('R', 'T', '2', '1');
  2755. FOURCC_DIB :=mmioFOURCC('D', 'I', 'B', ' ');
  2756. FOURCC_RIFF:=mmioFOURCC( 'R', 'I', 'F', 'F' );
  2757. FOURCC_LIST:=mmioFOURCC( 'L', 'I', 'S', 'T' );
  2758. FOURCC_MEM :=mmioFOURCC( 'M', 'E', 'M', ' ' );
  2759. FOURCC_DOS :=mmioFOURCC( 'D', 'O', 'S', ' ' );
  2760. FOURCC_BND :=mmioFOURCC( 'B', 'N', 'D', ' ' );
  2761. FOURCC_FREE:=mmioFOURCC( 'F', 'R', 'E', 'E' );
  2762. FOURCC_DEL :=mmioFOURCC( 'D', 'E', 'L', ' ' );
  2763. FOURCC_CTOC:=mmioFOURCC( 'C', 'T', 'O', 'C' );
  2764. FOURCC_CGRP:=mmioFOURCC( 'C', 'G', 'R', 'P' );
  2765. FOURCC_CF :=mmioFOURCC( 'C', 'F', ' ', ' ' );
  2766. End.