mmbase.pas 144 KB

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