OpenSLES.h 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774
  1. /*
  2. * Copyright (c) 2007-2009 The Khronos Group Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  5. * this software and /or associated documentation files (the "Materials "), to
  6. * deal in the Materials without restriction, including without limitation the
  7. * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. * sell copies of the Materials, and to permit persons to whom the Materials are
  9. * furnished to do so, subject to
  10. * the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included
  13. * in all copies or substantial portions of the Materials.
  14. *
  15. * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE
  21. * MATERIALS.
  22. *
  23. * OpenSLES.h - OpenSL ES version 1.0.1
  24. *
  25. */
  26. /****************************************************************************/
  27. /* NOTE: This file is a standard OpenSL ES header file and should not be */
  28. /* modified in any way. */
  29. /****************************************************************************/
  30. #ifndef OPENSL_ES_H_
  31. #define OPENSL_ES_H_
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. #include "OpenSLES_Platform.h"
  36. /*****************************************************************************/
  37. /* Common types, structures, and defines */
  38. /*****************************************************************************/
  39. #ifndef _KHRONOS_KEYS_
  40. #define _KHRONOS_KEYS_
  41. #define KHRONOS_TITLE "KhronosTitle"
  42. #define KHRONOS_ALBUM "KhronosAlbum"
  43. #define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
  44. #define KHRONOS_ARTIST "KhronosArtist"
  45. #define KHRONOS_GENRE "KhronosGenre"
  46. #define KHRONOS_YEAR "KhronosYear"
  47. #define KHRONOS_COMMENT "KhronosComment"
  48. #define KHRONOS_ARTIST_URL "KhronosArtistURL"
  49. #define KHRONOS_CONTENT_URL "KhronosContentURL"
  50. #define KHRONOS_RATING "KhronosRating"
  51. #define KHRONOS_ALBUM_ART "KhronosAlbumArt"
  52. #define KHRONOS_COPYRIGHT "KhronosCopyright"
  53. #endif
  54. /* remap common types to SL types for clarity */
  55. typedef sl_int8_t SLint8; /* 8 bit signed integer */
  56. typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */
  57. typedef sl_int16_t SLint16; /* 16 bit signed integer */
  58. typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */
  59. typedef sl_int32_t SLint32; /* 32 bit signed integer */
  60. typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */
  61. typedef SLuint32 SLboolean;
  62. #define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000)
  63. #define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001)
  64. typedef SLuint8 SLchar; /* UTF-8 is to be used */
  65. typedef SLint16 SLmillibel;
  66. typedef SLuint32 SLmillisecond;
  67. typedef SLuint32 SLmilliHertz;
  68. typedef SLint32 SLmillimeter;
  69. typedef SLint32 SLmillidegree;
  70. typedef SLint16 SLpermille;
  71. typedef SLuint32 SLmicrosecond;
  72. typedef SLuint32 SLresult;
  73. #define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
  74. #define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))
  75. #define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF)
  76. #define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF)
  77. /** Interface ID defined as a UUID */
  78. typedef const struct SLInterfaceID_ {
  79. SLuint32 time_low;
  80. SLuint16 time_mid;
  81. SLuint16 time_hi_and_version;
  82. SLuint16 clock_seq;
  83. SLuint8 node[6];
  84. } * SLInterfaceID;
  85. /* Forward declaration for the object interface */
  86. struct SLObjectItf_;
  87. typedef const struct SLObjectItf_ * const * SLObjectItf;
  88. /* Objects ID's */
  89. #define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001)
  90. #define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002)
  91. #define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003)
  92. #define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004)
  93. #define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005)
  94. #define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006)
  95. #define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007)
  96. #define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008)
  97. #define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009)
  98. #define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A)
  99. /* SL Profiles */
  100. #define SL_PROFILES_PHONE ((SLuint16) 0x0001)
  101. #define SL_PROFILES_MUSIC ((SLuint16) 0x0002)
  102. #define SL_PROFILES_GAME ((SLuint16) 0x0004)
  103. /* Types of voices supported by the system */
  104. #define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001)
  105. #define SL_VOICETYPE_MIDI ((SLuint16) 0x0002)
  106. #define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004)
  107. #define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008)
  108. /* Convenient macros representing various different priority levels, for use with the SetPriority method */
  109. #define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1))
  110. #define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000)
  111. #define SL_PRIORITY_LOW ((SLint32) -0x40000000)
  112. #define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000)
  113. #define SL_PRIORITY_NORMAL ((SLint32) 0x00000000)
  114. #define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000)
  115. #define SL_PRIORITY_HIGH ((SLint32) 0x40000000)
  116. #define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000)
  117. #define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF)
  118. /** These macros list the various sample formats that are possible on audio input and output devices. */
  119. #define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008)
  120. #define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010)
  121. #define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014)
  122. #define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018)
  123. #define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C)
  124. #define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020)
  125. /** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */
  126. #define SL_SAMPLINGRATE_8 ((SLuint32) 8000000)
  127. #define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000)
  128. #define SL_SAMPLINGRATE_12 ((SLuint32) 12000000)
  129. #define SL_SAMPLINGRATE_16 ((SLuint32) 16000000)
  130. #define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000)
  131. #define SL_SAMPLINGRATE_24 ((SLuint32) 24000000)
  132. #define SL_SAMPLINGRATE_32 ((SLuint32) 32000000)
  133. #define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000)
  134. #define SL_SAMPLINGRATE_48 ((SLuint32) 48000000)
  135. #define SL_SAMPLINGRATE_64 ((SLuint32) 64000000)
  136. #define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000)
  137. #define SL_SAMPLINGRATE_96 ((SLuint32) 96000000)
  138. #define SL_SAMPLINGRATE_192 ((SLuint32) 192000000)
  139. #define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
  140. #define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
  141. #define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
  142. #define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
  143. #define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
  144. #define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
  145. #define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
  146. #define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
  147. #define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
  148. #define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
  149. #define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
  150. #define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
  151. #define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
  152. #define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
  153. #define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
  154. #define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
  155. #define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
  156. #define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000)
  157. /*****************************************************************************/
  158. /* Errors */
  159. /* */
  160. /*****************************************************************************/
  161. #define SL_RESULT_SUCCESS ((SLuint32) 0x00000000)
  162. #define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001)
  163. #define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002)
  164. #define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003)
  165. #define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004)
  166. #define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005)
  167. #define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006)
  168. #define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007)
  169. #define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008)
  170. #define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009)
  171. #define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A)
  172. #define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B)
  173. #define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C)
  174. #define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D)
  175. #define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E)
  176. #define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F)
  177. #define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010)
  178. /* Object state definitions */
  179. #define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001)
  180. #define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002)
  181. #define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003)
  182. /* Object event definitions */
  183. #define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
  184. #define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
  185. #define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
  186. #define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004)
  187. #define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005)
  188. #define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006)
  189. #define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007)
  190. /*****************************************************************************/
  191. /* Interface definitions */
  192. /*****************************************************************************/
  193. /** NULL Interface */
  194. extern const SLInterfaceID SL_IID_NULL;
  195. /*---------------------------------------------------------------------------*/
  196. /* Data Source and Data Sink Structures */
  197. /*---------------------------------------------------------------------------*/
  198. /** Data locator macros */
  199. #define SL_DATALOCATOR_URI ((SLuint32) 0x00000001)
  200. #define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002)
  201. #define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003)
  202. #define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004)
  203. #define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005)
  204. #define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006)
  205. #define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007)
  206. #define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008)
  207. /** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/
  208. typedef struct SLDataLocator_URI_ {
  209. SLuint32 locatorType;
  210. SLchar * URI;
  211. } SLDataLocator_URI;
  212. /** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/
  213. typedef struct SLDataLocator_Address_ {
  214. SLuint32 locatorType;
  215. void *pAddress;
  216. SLuint32 length;
  217. } SLDataLocator_Address;
  218. /** IODevice-types */
  219. #define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001)
  220. #define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002)
  221. #define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003)
  222. #define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004)
  223. #define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005)
  224. /** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/
  225. typedef struct SLDataLocator_IODevice_ {
  226. SLuint32 locatorType;
  227. SLuint32 deviceType;
  228. SLuint32 deviceID;
  229. SLObjectItf device;
  230. } SLDataLocator_IODevice;
  231. /** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/
  232. typedef struct SLDataLocator_OutputMix {
  233. SLuint32 locatorType;
  234. SLObjectItf outputMix;
  235. } SLDataLocator_OutputMix;
  236. /** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/
  237. typedef struct SLDataLocator_BufferQueue {
  238. SLuint32 locatorType;
  239. SLuint32 numBuffers;
  240. } SLDataLocator_BufferQueue;
  241. /** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/
  242. typedef struct SLDataLocator_MIDIBufferQueue {
  243. SLuint32 locatorType;
  244. SLuint32 tpqn;
  245. SLuint32 numBuffers;
  246. } SLDataLocator_MIDIBufferQueue;
  247. /** Data format defines */
  248. #define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001)
  249. #define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002)
  250. #define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003)
  251. /** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/
  252. typedef struct SLDataFormat_MIME_ {
  253. SLuint32 formatType;
  254. SLchar * mimeType;
  255. SLuint32 containerType;
  256. } SLDataFormat_MIME;
  257. /* Byte order of a block of 16- or 32-bit data */
  258. #define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001)
  259. #define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002)
  260. /* Container type */
  261. #define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001)
  262. #define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002)
  263. #define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003)
  264. #define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004)
  265. #define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005)
  266. #define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006)
  267. #define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007)
  268. #define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008)
  269. #define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009)
  270. #define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A)
  271. #define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B)
  272. #define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C)
  273. #define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D)
  274. #define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E)
  275. #define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F)
  276. #define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010)
  277. #define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011)
  278. #define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012)
  279. #define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013)
  280. #define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014)
  281. #define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015)
  282. #define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016)
  283. #define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017)
  284. #define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018)
  285. #define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019)
  286. #define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A)
  287. #define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B)
  288. #define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C)
  289. #define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D)
  290. /** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/
  291. typedef struct SLDataFormat_PCM_ {
  292. SLuint32 formatType;
  293. SLuint32 numChannels;
  294. SLuint32 samplesPerSec;
  295. SLuint32 bitsPerSample;
  296. SLuint32 containerSize;
  297. SLuint32 channelMask;
  298. SLuint32 endianness;
  299. } SLDataFormat_PCM;
  300. typedef struct SLDataSource_ {
  301. void *pLocator;
  302. void *pFormat;
  303. } SLDataSource;
  304. typedef struct SLDataSink_ {
  305. void *pLocator;
  306. void *pFormat;
  307. } SLDataSink;
  308. /*---------------------------------------------------------------------------*/
  309. /* Standard Object Interface */
  310. /*---------------------------------------------------------------------------*/
  311. extern const SLInterfaceID SL_IID_OBJECT;
  312. /** Object callback */
  313. typedef void (SLAPIENTRY *slObjectCallback) (
  314. SLObjectItf caller,
  315. const void * pContext,
  316. SLuint32 event,
  317. SLresult result,
  318. SLuint32 param,
  319. void *pInterface
  320. );
  321. struct SLObjectItf_ {
  322. SLresult (*Realize) (
  323. SLObjectItf self,
  324. SLboolean async
  325. );
  326. SLresult (*Resume) (
  327. SLObjectItf self,
  328. SLboolean async
  329. );
  330. SLresult (*GetState) (
  331. SLObjectItf self,
  332. SLuint32 * pState
  333. );
  334. SLresult (*GetInterface) (
  335. SLObjectItf self,
  336. const SLInterfaceID iid,
  337. void * pInterface
  338. );
  339. SLresult (*RegisterCallback) (
  340. SLObjectItf self,
  341. slObjectCallback callback,
  342. void * pContext
  343. );
  344. void (*AbortAsyncOperation) (
  345. SLObjectItf self
  346. );
  347. void (*Destroy) (
  348. SLObjectItf self
  349. );
  350. SLresult (*SetPriority) (
  351. SLObjectItf self,
  352. SLint32 priority,
  353. SLboolean preemptable
  354. );
  355. SLresult (*GetPriority) (
  356. SLObjectItf self,
  357. SLint32 *pPriority,
  358. SLboolean *pPreemptable
  359. );
  360. SLresult (*SetLossOfControlInterfaces) (
  361. SLObjectItf self,
  362. SLint16 numInterfaces,
  363. SLInterfaceID * pInterfaceIDs,
  364. SLboolean enabled
  365. );
  366. };
  367. /*---------------------------------------------------------------------------*/
  368. /* Audio IO Device capabilities interface */
  369. /*---------------------------------------------------------------------------*/
  370. #define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF)
  371. #define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE)
  372. #define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD)
  373. #define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC)
  374. #define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB)
  375. #define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001)
  376. #define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100)
  377. #define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200)
  378. #define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400)
  379. #define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001)
  380. #define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002)
  381. #define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003)
  382. #define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004)
  383. #define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005)
  384. /* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */
  385. #define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005)
  386. #define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001)
  387. #define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002)
  388. #define SL_DEVSCOPE_USER ((SLuint16) 0x0003)
  389. typedef struct SLAudioInputDescriptor_ {
  390. SLchar *deviceName;
  391. SLint16 deviceConnection;
  392. SLint16 deviceScope;
  393. SLint16 deviceLocation;
  394. SLboolean isForTelephony;
  395. SLmilliHertz minSampleRate;
  396. SLmilliHertz maxSampleRate;
  397. SLboolean isFreqRangeContinuous;
  398. SLmilliHertz *samplingRatesSupported;
  399. SLint16 numOfSamplingRatesSupported;
  400. SLint16 maxChannels;
  401. } SLAudioInputDescriptor;
  402. typedef struct SLAudioOutputDescriptor_ {
  403. SLchar *pDeviceName;
  404. SLint16 deviceConnection;
  405. SLint16 deviceScope;
  406. SLint16 deviceLocation;
  407. SLboolean isForTelephony;
  408. SLmilliHertz minSampleRate;
  409. SLmilliHertz maxSampleRate;
  410. SLboolean isFreqRangeContinuous;
  411. SLmilliHertz *samplingRatesSupported;
  412. SLint16 numOfSamplingRatesSupported;
  413. SLint16 maxChannels;
  414. } SLAudioOutputDescriptor;
  415. extern const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES;
  416. struct SLAudioIODeviceCapabilitiesItf_;
  417. typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf;
  418. typedef void (SLAPIENTRY *slAvailableAudioInputsChangedCallback) (
  419. SLAudioIODeviceCapabilitiesItf caller,
  420. void *pContext,
  421. SLuint32 deviceID,
  422. SLint32 numInputs,
  423. SLboolean isNew
  424. );
  425. typedef void (SLAPIENTRY *slAvailableAudioOutputsChangedCallback) (
  426. SLAudioIODeviceCapabilitiesItf caller,
  427. void *pContext,
  428. SLuint32 deviceID,
  429. SLint32 numOutputs,
  430. SLboolean isNew
  431. );
  432. typedef void (SLAPIENTRY *slDefaultDeviceIDMapChangedCallback) (
  433. SLAudioIODeviceCapabilitiesItf caller,
  434. void *pContext,
  435. SLboolean isOutput,
  436. SLint32 numDevices
  437. );
  438. struct SLAudioIODeviceCapabilitiesItf_ {
  439. SLresult (*GetAvailableAudioInputs)(
  440. SLAudioIODeviceCapabilitiesItf self,
  441. SLint32 *pNumInputs,
  442. SLuint32 *pInputDeviceIDs
  443. );
  444. SLresult (*QueryAudioInputCapabilities)(
  445. SLAudioIODeviceCapabilitiesItf self,
  446. SLuint32 deviceId,
  447. SLAudioInputDescriptor *pDescriptor
  448. );
  449. SLresult (*RegisterAvailableAudioInputsChangedCallback) (
  450. SLAudioIODeviceCapabilitiesItf self,
  451. slAvailableAudioInputsChangedCallback callback,
  452. void *pContext
  453. );
  454. SLresult (*GetAvailableAudioOutputs)(
  455. SLAudioIODeviceCapabilitiesItf self,
  456. SLint32 *pNumOutputs,
  457. SLuint32 *pOutputDeviceIDs
  458. );
  459. SLresult (*QueryAudioOutputCapabilities)(
  460. SLAudioIODeviceCapabilitiesItf self,
  461. SLuint32 deviceId,
  462. SLAudioOutputDescriptor *pDescriptor
  463. );
  464. SLresult (*RegisterAvailableAudioOutputsChangedCallback) (
  465. SLAudioIODeviceCapabilitiesItf self,
  466. slAvailableAudioOutputsChangedCallback callback,
  467. void *pContext
  468. );
  469. SLresult (*RegisterDefaultDeviceIDMapChangedCallback) (
  470. SLAudioIODeviceCapabilitiesItf self,
  471. slDefaultDeviceIDMapChangedCallback callback,
  472. void *pContext
  473. );
  474. SLresult (*GetAssociatedAudioInputs) (
  475. SLAudioIODeviceCapabilitiesItf self,
  476. SLuint32 deviceId,
  477. SLint32 *pNumAudioInputs,
  478. SLuint32 *pAudioInputDeviceIDs
  479. );
  480. SLresult (*GetAssociatedAudioOutputs) (
  481. SLAudioIODeviceCapabilitiesItf self,
  482. SLuint32 deviceId,
  483. SLint32 *pNumAudioOutputs,
  484. SLuint32 *pAudioOutputDeviceIDs
  485. );
  486. SLresult (*GetDefaultAudioDevices) (
  487. SLAudioIODeviceCapabilitiesItf self,
  488. SLuint32 defaultDeviceID,
  489. SLint32 *pNumAudioDevices,
  490. SLuint32 *pAudioDeviceIDs
  491. );
  492. SLresult (*QuerySampleFormatsSupported)(
  493. SLAudioIODeviceCapabilitiesItf self,
  494. SLuint32 deviceId,
  495. SLmilliHertz samplingRate,
  496. SLint32 *pSampleFormats,
  497. SLint32 *pNumOfSampleFormats
  498. );
  499. };
  500. /*---------------------------------------------------------------------------*/
  501. /* Capabilities of the LED array IODevice */
  502. /*---------------------------------------------------------------------------*/
  503. typedef struct SLLEDDescriptor_ {
  504. SLuint8 ledCount;
  505. SLuint8 primaryLED;
  506. SLuint32 colorMask;
  507. } SLLEDDescriptor;
  508. /*---------------------------------------------------------------------------*/
  509. /* LED Array interface */
  510. /*---------------------------------------------------------------------------*/
  511. typedef struct SLHSL_ {
  512. SLmillidegree hue;
  513. SLpermille saturation;
  514. SLpermille lightness;
  515. } SLHSL;
  516. extern const SLInterfaceID SL_IID_LED;
  517. struct SLLEDArrayItf_;
  518. typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf;
  519. struct SLLEDArrayItf_ {
  520. SLresult (*ActivateLEDArray) (
  521. SLLEDArrayItf self,
  522. SLuint32 lightMask
  523. );
  524. SLresult (*IsLEDArrayActivated) (
  525. SLLEDArrayItf self,
  526. SLuint32 *lightMask
  527. );
  528. SLresult (*SetColor) (
  529. SLLEDArrayItf self,
  530. SLuint8 index,
  531. const SLHSL *color
  532. );
  533. SLresult (*GetColor) (
  534. SLLEDArrayItf self,
  535. SLuint8 index,
  536. SLHSL *color
  537. );
  538. };
  539. /*---------------------------------------------------------------------------*/
  540. /* Capabilities of the Vibra IODevice */
  541. /*---------------------------------------------------------------------------*/
  542. typedef struct SLVibraDescriptor_ {
  543. SLboolean supportsFrequency;
  544. SLboolean supportsIntensity;
  545. SLmilliHertz minFrequency;
  546. SLmilliHertz maxFrequency;
  547. } SLVibraDescriptor;
  548. /*---------------------------------------------------------------------------*/
  549. /* Vibra interface */
  550. /*---------------------------------------------------------------------------*/
  551. extern const SLInterfaceID SL_IID_VIBRA;
  552. struct SLVibraItf_;
  553. typedef const struct SLVibraItf_ * const * SLVibraItf;
  554. struct SLVibraItf_ {
  555. SLresult (*Vibrate) (
  556. SLVibraItf self,
  557. SLboolean vibrate
  558. );
  559. SLresult (*IsVibrating) (
  560. SLVibraItf self,
  561. SLboolean *pVibrating
  562. );
  563. SLresult (*SetFrequency) (
  564. SLVibraItf self,
  565. SLmilliHertz frequency
  566. );
  567. SLresult (*GetFrequency) (
  568. SLVibraItf self,
  569. SLmilliHertz *pFrequency
  570. );
  571. SLresult (*SetIntensity) (
  572. SLVibraItf self,
  573. SLpermille intensity
  574. );
  575. SLresult (*GetIntensity) (
  576. SLVibraItf self,
  577. SLpermille *pIntensity
  578. );
  579. };
  580. /*---------------------------------------------------------------------------*/
  581. /* Meta data extraction related types and interface */
  582. /*---------------------------------------------------------------------------*/
  583. #define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000)
  584. #define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001)
  585. #define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002)
  586. #define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003)
  587. #define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004)
  588. #define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005)
  589. #define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006)
  590. #define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007)
  591. #define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008)
  592. #define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009)
  593. #define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A)
  594. #define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B)
  595. #define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B)
  596. #define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C)
  597. #define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D)
  598. #define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E)
  599. #define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F)
  600. #define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010)
  601. #define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011)
  602. #define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012)
  603. #define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013)
  604. #define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014)
  605. #define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015)
  606. #define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016)
  607. #define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017)
  608. #define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018)
  609. #define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019)
  610. #define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A)
  611. #define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B)
  612. #define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C)
  613. #define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D)
  614. #define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E)
  615. #define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F)
  616. #define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020)
  617. #define SL_METADATA_FILTER_KEY ((SLuint8) 0x01)
  618. #define SL_METADATA_FILTER_LANG ((SLuint8) 0x02)
  619. #define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04)
  620. typedef struct SLMetadataInfo_ {
  621. SLuint32 size;
  622. SLuint32 encoding;
  623. SLchar langCountry[16];
  624. SLuint8 data[1];
  625. } SLMetadataInfo;
  626. extern const SLInterfaceID SL_IID_METADATAEXTRACTION;
  627. struct SLMetadataExtractionItf_;
  628. typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf;
  629. struct SLMetadataExtractionItf_ {
  630. SLresult (*GetItemCount) (
  631. SLMetadataExtractionItf self,
  632. SLuint32 *pItemCount
  633. );
  634. SLresult (*GetKeySize) (
  635. SLMetadataExtractionItf self,
  636. SLuint32 index,
  637. SLuint32 *pKeySize
  638. );
  639. SLresult (*GetKey) (
  640. SLMetadataExtractionItf self,
  641. SLuint32 index,
  642. SLuint32 keySize,
  643. SLMetadataInfo *pKey
  644. );
  645. SLresult (*GetValueSize) (
  646. SLMetadataExtractionItf self,
  647. SLuint32 index,
  648. SLuint32 *pValueSize
  649. );
  650. SLresult (*GetValue) (
  651. SLMetadataExtractionItf self,
  652. SLuint32 index,
  653. SLuint32 valueSize,
  654. SLMetadataInfo *pValue
  655. );
  656. SLresult (*AddKeyFilter) (
  657. SLMetadataExtractionItf self,
  658. SLuint32 keySize,
  659. const void *pKey,
  660. SLuint32 keyEncoding,
  661. const SLchar *pValueLangCountry,
  662. SLuint32 valueEncoding,
  663. SLuint8 filterMask
  664. );
  665. SLresult (*ClearKeyFilter) (
  666. SLMetadataExtractionItf self
  667. );
  668. };
  669. /*---------------------------------------------------------------------------*/
  670. /* Meta data traversal related types and interface */
  671. /*---------------------------------------------------------------------------*/
  672. #define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001)
  673. #define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002)
  674. #define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001)
  675. #define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002)
  676. #define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003)
  677. #define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004)
  678. #define SL_NODE_PARENT 0xFFFFFFFF
  679. extern const SLInterfaceID SL_IID_METADATATRAVERSAL;
  680. struct SLMetadataTraversalItf_;
  681. typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf;
  682. struct SLMetadataTraversalItf_ {
  683. SLresult (*SetMode) (
  684. SLMetadataTraversalItf self,
  685. SLuint32 mode
  686. );
  687. SLresult (*GetChildCount) (
  688. SLMetadataTraversalItf self,
  689. SLuint32 *pCount
  690. );
  691. SLresult (*GetChildMIMETypeSize) (
  692. SLMetadataTraversalItf self,
  693. SLuint32 index,
  694. SLuint32 *pSize
  695. );
  696. SLresult (*GetChildInfo) (
  697. SLMetadataTraversalItf self,
  698. SLuint32 index,
  699. SLint32 *pNodeID,
  700. SLuint32 *pType,
  701. SLuint32 size,
  702. SLchar *pMimeType
  703. );
  704. SLresult (*SetActiveNode) (
  705. SLMetadataTraversalItf self,
  706. SLuint32 index
  707. );
  708. };
  709. /*---------------------------------------------------------------------------*/
  710. /* Dynamic Source types and interface */
  711. /*---------------------------------------------------------------------------*/
  712. extern const SLInterfaceID SL_IID_DYNAMICSOURCE;
  713. struct SLDynamicSourceItf_;
  714. typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf;
  715. struct SLDynamicSourceItf_ {
  716. SLresult (*SetSource) (
  717. SLDynamicSourceItf self,
  718. SLDataSource *pDataSource
  719. );
  720. };
  721. /*---------------------------------------------------------------------------*/
  722. /* Output Mix interface */
  723. /*---------------------------------------------------------------------------*/
  724. extern const SLInterfaceID SL_IID_OUTPUTMIX;
  725. struct SLOutputMixItf_;
  726. typedef const struct SLOutputMixItf_ * const * SLOutputMixItf;
  727. typedef void (SLAPIENTRY *slMixDeviceChangeCallback) (
  728. SLOutputMixItf caller,
  729. void *pContext
  730. );
  731. struct SLOutputMixItf_ {
  732. SLresult (*GetDestinationOutputDeviceIDs) (
  733. SLOutputMixItf self,
  734. SLint32 *pNumDevices,
  735. SLuint32 *pDeviceIDs
  736. );
  737. SLresult (*RegisterDeviceChangeCallback) (
  738. SLOutputMixItf self,
  739. slMixDeviceChangeCallback callback,
  740. void *pContext
  741. );
  742. SLresult (*ReRoute)(
  743. SLOutputMixItf self,
  744. SLint32 numOutputDevices,
  745. SLuint32 *pOutputDeviceIDs
  746. );
  747. };
  748. /*---------------------------------------------------------------------------*/
  749. /* Playback interface */
  750. /*---------------------------------------------------------------------------*/
  751. /** Playback states */
  752. #define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001)
  753. #define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002)
  754. #define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003)
  755. /** Play events **/
  756. #define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001)
  757. #define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002)
  758. #define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
  759. #define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008)
  760. #define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010)
  761. #define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF)
  762. extern const SLInterfaceID SL_IID_PLAY;
  763. /** Playback interface methods */
  764. struct SLPlayItf_;
  765. typedef const struct SLPlayItf_ * const * SLPlayItf;
  766. typedef void (SLAPIENTRY *slPlayCallback) (
  767. SLPlayItf caller,
  768. void *pContext,
  769. SLuint32 event
  770. );
  771. struct SLPlayItf_ {
  772. SLresult (*SetPlayState) (
  773. SLPlayItf self,
  774. SLuint32 state
  775. );
  776. SLresult (*GetPlayState) (
  777. SLPlayItf self,
  778. SLuint32 *pState
  779. );
  780. SLresult (*GetDuration) (
  781. SLPlayItf self,
  782. SLmillisecond *pMsec
  783. );
  784. SLresult (*GetPosition) (
  785. SLPlayItf self,
  786. SLmillisecond *pMsec
  787. );
  788. SLresult (*RegisterCallback) (
  789. SLPlayItf self,
  790. slPlayCallback callback,
  791. void *pContext
  792. );
  793. SLresult (*SetCallbackEventsMask) (
  794. SLPlayItf self,
  795. SLuint32 eventFlags
  796. );
  797. SLresult (*GetCallbackEventsMask) (
  798. SLPlayItf self,
  799. SLuint32 *pEventFlags
  800. );
  801. SLresult (*SetMarkerPosition) (
  802. SLPlayItf self,
  803. SLmillisecond mSec
  804. );
  805. SLresult (*ClearMarkerPosition) (
  806. SLPlayItf self
  807. );
  808. SLresult (*GetMarkerPosition) (
  809. SLPlayItf self,
  810. SLmillisecond *pMsec
  811. );
  812. SLresult (*SetPositionUpdatePeriod) (
  813. SLPlayItf self,
  814. SLmillisecond mSec
  815. );
  816. SLresult (*GetPositionUpdatePeriod) (
  817. SLPlayItf self,
  818. SLmillisecond *pMsec
  819. );
  820. };
  821. /*---------------------------------------------------------------------------*/
  822. /* Prefetch status interface */
  823. /*---------------------------------------------------------------------------*/
  824. #define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001)
  825. #define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002)
  826. #define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001)
  827. #define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002)
  828. #define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003)
  829. extern const SLInterfaceID SL_IID_PREFETCHSTATUS;
  830. /** Prefetch status interface methods */
  831. struct SLPrefetchStatusItf_;
  832. typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf;
  833. typedef void (SLAPIENTRY *slPrefetchCallback) (
  834. SLPrefetchStatusItf caller,
  835. void *pContext,
  836. SLuint32 event
  837. );
  838. struct SLPrefetchStatusItf_ {
  839. SLresult (*GetPrefetchStatus) (
  840. SLPrefetchStatusItf self,
  841. SLuint32 *pStatus
  842. );
  843. SLresult (*GetFillLevel) (
  844. SLPrefetchStatusItf self,
  845. SLpermille *pLevel
  846. );
  847. SLresult (*RegisterCallback) (
  848. SLPrefetchStatusItf self,
  849. slPrefetchCallback callback,
  850. void *pContext
  851. );
  852. SLresult (*SetCallbackEventsMask) (
  853. SLPrefetchStatusItf self,
  854. SLuint32 eventFlags
  855. );
  856. SLresult (*GetCallbackEventsMask) (
  857. SLPrefetchStatusItf self,
  858. SLuint32 *pEventFlags
  859. );
  860. SLresult (*SetFillUpdatePeriod) (
  861. SLPrefetchStatusItf self,
  862. SLpermille period
  863. );
  864. SLresult (*GetFillUpdatePeriod) (
  865. SLPrefetchStatusItf self,
  866. SLpermille *pPeriod
  867. );
  868. };
  869. /*---------------------------------------------------------------------------*/
  870. /* Playback Rate interface */
  871. /*---------------------------------------------------------------------------*/
  872. #define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001)
  873. #define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002)
  874. #define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100)
  875. #define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200)
  876. #define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400)
  877. #define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800)
  878. extern const SLInterfaceID SL_IID_PLAYBACKRATE;
  879. struct SLPlaybackRateItf_;
  880. typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf;
  881. struct SLPlaybackRateItf_ {
  882. SLresult (*SetRate)(
  883. SLPlaybackRateItf self,
  884. SLpermille rate
  885. );
  886. SLresult (*GetRate)(
  887. SLPlaybackRateItf self,
  888. SLpermille *pRate
  889. );
  890. SLresult (*SetPropertyConstraints)(
  891. SLPlaybackRateItf self,
  892. SLuint32 constraints
  893. );
  894. SLresult (*GetProperties)(
  895. SLPlaybackRateItf self,
  896. SLuint32 *pProperties
  897. );
  898. SLresult (*GetCapabilitiesOfRate)(
  899. SLPlaybackRateItf self,
  900. SLpermille rate,
  901. SLuint32 *pCapabilities
  902. );
  903. SLresult (*GetRateRange) (
  904. SLPlaybackRateItf self,
  905. SLuint8 index,
  906. SLpermille *pMinRate,
  907. SLpermille *pMaxRate,
  908. SLpermille *pStepSize,
  909. SLuint32 *pCapabilities
  910. );
  911. };
  912. /*---------------------------------------------------------------------------*/
  913. /* Seek Interface */
  914. /*---------------------------------------------------------------------------*/
  915. #define SL_SEEKMODE_FAST ((SLuint32) 0x0001)
  916. #define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002)
  917. extern const SLInterfaceID SL_IID_SEEK;
  918. struct SLSeekItf_;
  919. typedef const struct SLSeekItf_ * const * SLSeekItf;
  920. struct SLSeekItf_ {
  921. SLresult (*SetPosition)(
  922. SLSeekItf self,
  923. SLmillisecond pos,
  924. SLuint32 seekMode
  925. );
  926. SLresult (*SetLoop)(
  927. SLSeekItf self,
  928. SLboolean loopEnable,
  929. SLmillisecond startPos,
  930. SLmillisecond endPos
  931. );
  932. SLresult (*GetLoop)(
  933. SLSeekItf self,
  934. SLboolean *pLoopEnabled,
  935. SLmillisecond *pStartPos,
  936. SLmillisecond *pEndPos
  937. );
  938. };
  939. /*---------------------------------------------------------------------------*/
  940. /* Standard Recording Interface */
  941. /*---------------------------------------------------------------------------*/
  942. /** Recording states */
  943. #define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001)
  944. #define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002)
  945. #define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003)
  946. /** Record event **/
  947. #define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001)
  948. #define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002)
  949. #define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
  950. #define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008)
  951. #define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010)
  952. /* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */
  953. #define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020)
  954. #define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020)
  955. extern const SLInterfaceID SL_IID_RECORD;
  956. struct SLRecordItf_;
  957. typedef const struct SLRecordItf_ * const * SLRecordItf;
  958. typedef void (SLAPIENTRY *slRecordCallback) (
  959. SLRecordItf caller,
  960. void *pContext,
  961. SLuint32 event
  962. );
  963. /** Recording interface methods */
  964. struct SLRecordItf_ {
  965. SLresult (*SetRecordState) (
  966. SLRecordItf self,
  967. SLuint32 state
  968. );
  969. SLresult (*GetRecordState) (
  970. SLRecordItf self,
  971. SLuint32 *pState
  972. );
  973. SLresult (*SetDurationLimit) (
  974. SLRecordItf self,
  975. SLmillisecond msec
  976. );
  977. SLresult (*GetPosition) (
  978. SLRecordItf self,
  979. SLmillisecond *pMsec
  980. );
  981. SLresult (*RegisterCallback) (
  982. SLRecordItf self,
  983. slRecordCallback callback,
  984. void *pContext
  985. );
  986. SLresult (*SetCallbackEventsMask) (
  987. SLRecordItf self,
  988. SLuint32 eventFlags
  989. );
  990. SLresult (*GetCallbackEventsMask) (
  991. SLRecordItf self,
  992. SLuint32 *pEventFlags
  993. );
  994. SLresult (*SetMarkerPosition) (
  995. SLRecordItf self,
  996. SLmillisecond mSec
  997. );
  998. SLresult (*ClearMarkerPosition) (
  999. SLRecordItf self
  1000. );
  1001. SLresult (*GetMarkerPosition) (
  1002. SLRecordItf self,
  1003. SLmillisecond *pMsec
  1004. );
  1005. SLresult (*SetPositionUpdatePeriod) (
  1006. SLRecordItf self,
  1007. SLmillisecond mSec
  1008. );
  1009. SLresult (*GetPositionUpdatePeriod) (
  1010. SLRecordItf self,
  1011. SLmillisecond *pMsec
  1012. );
  1013. };
  1014. /*---------------------------------------------------------------------------*/
  1015. /* Equalizer interface */
  1016. /*---------------------------------------------------------------------------*/
  1017. #define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF)
  1018. extern const SLInterfaceID SL_IID_EQUALIZER;
  1019. struct SLEqualizerItf_;
  1020. typedef const struct SLEqualizerItf_ * const * SLEqualizerItf;
  1021. struct SLEqualizerItf_ {
  1022. SLresult (*SetEnabled)(
  1023. SLEqualizerItf self,
  1024. SLboolean enabled
  1025. );
  1026. SLresult (*IsEnabled)(
  1027. SLEqualizerItf self,
  1028. SLboolean *pEnabled
  1029. );
  1030. SLresult (*GetNumberOfBands)(
  1031. SLEqualizerItf self,
  1032. SLuint16 *pAmount
  1033. );
  1034. SLresult (*GetBandLevelRange)(
  1035. SLEqualizerItf self,
  1036. SLmillibel *pMin,
  1037. SLmillibel *pMax
  1038. );
  1039. SLresult (*SetBandLevel)(
  1040. SLEqualizerItf self,
  1041. SLuint16 band,
  1042. SLmillibel level
  1043. );
  1044. SLresult (*GetBandLevel)(
  1045. SLEqualizerItf self,
  1046. SLuint16 band,
  1047. SLmillibel *pLevel
  1048. );
  1049. SLresult (*GetCenterFreq)(
  1050. SLEqualizerItf self,
  1051. SLuint16 band,
  1052. SLmilliHertz *pCenter
  1053. );
  1054. SLresult (*GetBandFreqRange)(
  1055. SLEqualizerItf self,
  1056. SLuint16 band,
  1057. SLmilliHertz *pMin,
  1058. SLmilliHertz *pMax
  1059. );
  1060. SLresult (*GetBand)(
  1061. SLEqualizerItf self,
  1062. SLmilliHertz frequency,
  1063. SLuint16 *pBand
  1064. );
  1065. SLresult (*GetCurrentPreset)(
  1066. SLEqualizerItf self,
  1067. SLuint16 *pPreset
  1068. );
  1069. SLresult (*UsePreset)(
  1070. SLEqualizerItf self,
  1071. SLuint16 index
  1072. );
  1073. SLresult (*GetNumberOfPresets)(
  1074. SLEqualizerItf self,
  1075. SLuint16 *pNumPresets
  1076. );
  1077. SLresult (*GetPresetName)(
  1078. SLEqualizerItf self,
  1079. SLuint16 index,
  1080. const SLchar ** ppName
  1081. );
  1082. };
  1083. /*---------------------------------------------------------------------------*/
  1084. /* Volume Interface */
  1085. /* --------------------------------------------------------------------------*/
  1086. extern const SLInterfaceID SL_IID_VOLUME;
  1087. struct SLVolumeItf_;
  1088. typedef const struct SLVolumeItf_ * const * SLVolumeItf;
  1089. struct SLVolumeItf_ {
  1090. SLresult (*SetVolumeLevel) (
  1091. SLVolumeItf self,
  1092. SLmillibel level
  1093. );
  1094. SLresult (*GetVolumeLevel) (
  1095. SLVolumeItf self,
  1096. SLmillibel *pLevel
  1097. );
  1098. SLresult (*GetMaxVolumeLevel) (
  1099. SLVolumeItf self,
  1100. SLmillibel *pMaxLevel
  1101. );
  1102. SLresult (*SetMute) (
  1103. SLVolumeItf self,
  1104. SLboolean mute
  1105. );
  1106. SLresult (*GetMute) (
  1107. SLVolumeItf self,
  1108. SLboolean *pMute
  1109. );
  1110. SLresult (*EnableStereoPosition) (
  1111. SLVolumeItf self,
  1112. SLboolean enable
  1113. );
  1114. SLresult (*IsEnabledStereoPosition) (
  1115. SLVolumeItf self,
  1116. SLboolean *pEnable
  1117. );
  1118. SLresult (*SetStereoPosition) (
  1119. SLVolumeItf self,
  1120. SLpermille stereoPosition
  1121. );
  1122. SLresult (*GetStereoPosition) (
  1123. SLVolumeItf self,
  1124. SLpermille *pStereoPosition
  1125. );
  1126. };
  1127. /*---------------------------------------------------------------------------*/
  1128. /* Device Volume Interface */
  1129. /* --------------------------------------------------------------------------*/
  1130. extern const SLInterfaceID SL_IID_DEVICEVOLUME;
  1131. struct SLDeviceVolumeItf_;
  1132. typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf;
  1133. struct SLDeviceVolumeItf_ {
  1134. SLresult (*GetVolumeScale) (
  1135. SLDeviceVolumeItf self,
  1136. SLuint32 deviceID,
  1137. SLint32 *pMinValue,
  1138. SLint32 *pMaxValue,
  1139. SLboolean *pIsMillibelScale
  1140. );
  1141. SLresult (*SetVolume) (
  1142. SLDeviceVolumeItf self,
  1143. SLuint32 deviceID,
  1144. SLint32 volume
  1145. );
  1146. SLresult (*GetVolume) (
  1147. SLDeviceVolumeItf self,
  1148. SLuint32 deviceID,
  1149. SLint32 *pVolume
  1150. );
  1151. };
  1152. /*---------------------------------------------------------------------------*/
  1153. /* Buffer Queue Interface */
  1154. /*---------------------------------------------------------------------------*/
  1155. extern const SLInterfaceID SL_IID_BUFFERQUEUE;
  1156. struct SLBufferQueueItf_;
  1157. typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf;
  1158. typedef void (SLAPIENTRY *slBufferQueueCallback)(
  1159. SLBufferQueueItf caller,
  1160. void *pContext
  1161. );
  1162. /** Buffer queue state **/
  1163. typedef struct SLBufferQueueState_ {
  1164. SLuint32 count;
  1165. SLuint32 playIndex;
  1166. } SLBufferQueueState;
  1167. struct SLBufferQueueItf_ {
  1168. SLresult (*Enqueue) (
  1169. SLBufferQueueItf self,
  1170. const void *pBuffer,
  1171. SLuint32 size
  1172. );
  1173. SLresult (*Clear) (
  1174. SLBufferQueueItf self
  1175. );
  1176. SLresult (*GetState) (
  1177. SLBufferQueueItf self,
  1178. SLBufferQueueState *pState
  1179. );
  1180. SLresult (*RegisterCallback) (
  1181. SLBufferQueueItf self,
  1182. slBufferQueueCallback callback,
  1183. void* pContext
  1184. );
  1185. };
  1186. /*---------------------------------------------------------------------------*/
  1187. /* PresetReverb */
  1188. /*---------------------------------------------------------------------------*/
  1189. #define SL_REVERBPRESET_NONE ((SLuint16) 0x0000)
  1190. #define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001)
  1191. #define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002)
  1192. #define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003)
  1193. #define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004)
  1194. #define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005)
  1195. #define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006)
  1196. extern const SLInterfaceID SL_IID_PRESETREVERB;
  1197. struct SLPresetReverbItf_;
  1198. typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf;
  1199. struct SLPresetReverbItf_ {
  1200. SLresult (*SetPreset) (
  1201. SLPresetReverbItf self,
  1202. SLuint16 preset
  1203. );
  1204. SLresult (*GetPreset) (
  1205. SLPresetReverbItf self,
  1206. SLuint16 *pPreset
  1207. );
  1208. };
  1209. /*---------------------------------------------------------------------------*/
  1210. /* EnvironmentalReverb */
  1211. /*---------------------------------------------------------------------------*/
  1212. #define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \
  1213. { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 }
  1214. #define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \
  1215. { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 }
  1216. #define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
  1217. { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 }
  1218. #define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \
  1219. { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 }
  1220. #define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \
  1221. { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 }
  1222. #define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
  1223. { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 }
  1224. #define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \
  1225. { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 }
  1226. #define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
  1227. { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 }
  1228. #define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
  1229. { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 }
  1230. #define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \
  1231. { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 }
  1232. #define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \
  1233. { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 }
  1234. #define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \
  1235. { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 }
  1236. #define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
  1237. { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 }
  1238. #define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \
  1239. { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 }
  1240. #define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
  1241. { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 }
  1242. #define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \
  1243. { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 }
  1244. #define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \
  1245. { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 }
  1246. #define SL_I3DL2_ENVIRONMENT_PRESET_CITY \
  1247. { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 }
  1248. #define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
  1249. { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 }
  1250. #define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \
  1251. { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 }
  1252. #define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \
  1253. { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 }
  1254. #define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
  1255. { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 }
  1256. #define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
  1257. { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 }
  1258. #define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
  1259. { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 }
  1260. #define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
  1261. { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 }
  1262. #define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
  1263. { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 }
  1264. #define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
  1265. { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 }
  1266. #define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
  1267. { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 }
  1268. #define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
  1269. { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 }
  1270. #define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \
  1271. { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 }
  1272. typedef struct SLEnvironmentalReverbSettings_ {
  1273. SLmillibel roomLevel;
  1274. SLmillibel roomHFLevel;
  1275. SLmillisecond decayTime;
  1276. SLpermille decayHFRatio;
  1277. SLmillibel reflectionsLevel;
  1278. SLmillisecond reflectionsDelay;
  1279. SLmillibel reverbLevel;
  1280. SLmillisecond reverbDelay;
  1281. SLpermille diffusion;
  1282. SLpermille density;
  1283. } SLEnvironmentalReverbSettings;
  1284. extern const SLInterfaceID SL_IID_ENVIRONMENTALREVERB;
  1285. struct SLEnvironmentalReverbItf_;
  1286. typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf;
  1287. struct SLEnvironmentalReverbItf_ {
  1288. SLresult (*SetRoomLevel) (
  1289. SLEnvironmentalReverbItf self,
  1290. SLmillibel room
  1291. );
  1292. SLresult (*GetRoomLevel) (
  1293. SLEnvironmentalReverbItf self,
  1294. SLmillibel *pRoom
  1295. );
  1296. SLresult (*SetRoomHFLevel) (
  1297. SLEnvironmentalReverbItf self,
  1298. SLmillibel roomHF
  1299. );
  1300. SLresult (*GetRoomHFLevel) (
  1301. SLEnvironmentalReverbItf self,
  1302. SLmillibel *pRoomHF
  1303. );
  1304. SLresult (*SetDecayTime) (
  1305. SLEnvironmentalReverbItf self,
  1306. SLmillisecond decayTime
  1307. );
  1308. SLresult (*GetDecayTime) (
  1309. SLEnvironmentalReverbItf self,
  1310. SLmillisecond *pDecayTime
  1311. );
  1312. SLresult (*SetDecayHFRatio) (
  1313. SLEnvironmentalReverbItf self,
  1314. SLpermille decayHFRatio
  1315. );
  1316. SLresult (*GetDecayHFRatio) (
  1317. SLEnvironmentalReverbItf self,
  1318. SLpermille *pDecayHFRatio
  1319. );
  1320. SLresult (*SetReflectionsLevel) (
  1321. SLEnvironmentalReverbItf self,
  1322. SLmillibel reflectionsLevel
  1323. );
  1324. SLresult (*GetReflectionsLevel) (
  1325. SLEnvironmentalReverbItf self,
  1326. SLmillibel *pReflectionsLevel
  1327. );
  1328. SLresult (*SetReflectionsDelay) (
  1329. SLEnvironmentalReverbItf self,
  1330. SLmillisecond reflectionsDelay
  1331. );
  1332. SLresult (*GetReflectionsDelay) (
  1333. SLEnvironmentalReverbItf self,
  1334. SLmillisecond *pReflectionsDelay
  1335. );
  1336. SLresult (*SetReverbLevel) (
  1337. SLEnvironmentalReverbItf self,
  1338. SLmillibel reverbLevel
  1339. );
  1340. SLresult (*GetReverbLevel) (
  1341. SLEnvironmentalReverbItf self,
  1342. SLmillibel *pReverbLevel
  1343. );
  1344. SLresult (*SetReverbDelay) (
  1345. SLEnvironmentalReverbItf self,
  1346. SLmillisecond reverbDelay
  1347. );
  1348. SLresult (*GetReverbDelay) (
  1349. SLEnvironmentalReverbItf self,
  1350. SLmillisecond *pReverbDelay
  1351. );
  1352. SLresult (*SetDiffusion) (
  1353. SLEnvironmentalReverbItf self,
  1354. SLpermille diffusion
  1355. );
  1356. SLresult (*GetDiffusion) (
  1357. SLEnvironmentalReverbItf self,
  1358. SLpermille *pDiffusion
  1359. );
  1360. SLresult (*SetDensity) (
  1361. SLEnvironmentalReverbItf self,
  1362. SLpermille density
  1363. );
  1364. SLresult (*GetDensity) (
  1365. SLEnvironmentalReverbItf self,
  1366. SLpermille *pDensity
  1367. );
  1368. SLresult (*SetEnvironmentalReverbProperties) (
  1369. SLEnvironmentalReverbItf self,
  1370. const SLEnvironmentalReverbSettings *pProperties
  1371. );
  1372. SLresult (*GetEnvironmentalReverbProperties) (
  1373. SLEnvironmentalReverbItf self,
  1374. SLEnvironmentalReverbSettings *pProperties
  1375. );
  1376. };
  1377. /*---------------------------------------------------------------------------*/
  1378. /* Effects Send Interface */
  1379. /*---------------------------------------------------------------------------*/
  1380. extern const SLInterfaceID SL_IID_EFFECTSEND;
  1381. struct SLEffectSendItf_;
  1382. typedef const struct SLEffectSendItf_ * const * SLEffectSendItf;
  1383. struct SLEffectSendItf_ {
  1384. SLresult (*EnableEffectSend) (
  1385. SLEffectSendItf self,
  1386. const void *pAuxEffect,
  1387. SLboolean enable,
  1388. SLmillibel initialLevel
  1389. );
  1390. SLresult (*IsEnabled) (
  1391. SLEffectSendItf self,
  1392. const void * pAuxEffect,
  1393. SLboolean *pEnable
  1394. );
  1395. SLresult (*SetDirectLevel) (
  1396. SLEffectSendItf self,
  1397. SLmillibel directLevel
  1398. );
  1399. SLresult (*GetDirectLevel) (
  1400. SLEffectSendItf self,
  1401. SLmillibel *pDirectLevel
  1402. );
  1403. SLresult (*SetSendLevel) (
  1404. SLEffectSendItf self,
  1405. const void *pAuxEffect,
  1406. SLmillibel sendLevel
  1407. );
  1408. SLresult (*GetSendLevel)(
  1409. SLEffectSendItf self,
  1410. const void *pAuxEffect,
  1411. SLmillibel *pSendLevel
  1412. );
  1413. };
  1414. /*---------------------------------------------------------------------------*/
  1415. /* 3D Grouping Interface */
  1416. /*---------------------------------------------------------------------------*/
  1417. extern const SLInterfaceID SL_IID_3DGROUPING;
  1418. struct SL3DGroupingItf_ ;
  1419. typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf;
  1420. struct SL3DGroupingItf_ {
  1421. SLresult (*Set3DGroup) (
  1422. SL3DGroupingItf self,
  1423. SLObjectItf group
  1424. );
  1425. SLresult (*Get3DGroup) (
  1426. SL3DGroupingItf self,
  1427. SLObjectItf *pGroup
  1428. );
  1429. };
  1430. /*---------------------------------------------------------------------------*/
  1431. /* 3D Commit Interface */
  1432. /*---------------------------------------------------------------------------*/
  1433. extern const SLInterfaceID SL_IID_3DCOMMIT;
  1434. struct SL3DCommitItf_;
  1435. typedef const struct SL3DCommitItf_* const * SL3DCommitItf;
  1436. struct SL3DCommitItf_ {
  1437. SLresult (*Commit) (
  1438. SL3DCommitItf self
  1439. );
  1440. SLresult (*SetDeferred) (
  1441. SL3DCommitItf self,
  1442. SLboolean deferred
  1443. );
  1444. };
  1445. /*---------------------------------------------------------------------------*/
  1446. /* 3D Location Interface */
  1447. /*---------------------------------------------------------------------------*/
  1448. typedef struct SLVec3D_ {
  1449. SLint32 x;
  1450. SLint32 y;
  1451. SLint32 z;
  1452. } SLVec3D;
  1453. extern const SLInterfaceID SL_IID_3DLOCATION;
  1454. struct SL3DLocationItf_;
  1455. typedef const struct SL3DLocationItf_ * const * SL3DLocationItf;
  1456. struct SL3DLocationItf_ {
  1457. SLresult (*SetLocationCartesian) (
  1458. SL3DLocationItf self,
  1459. const SLVec3D *pLocation
  1460. );
  1461. SLresult (*SetLocationSpherical) (
  1462. SL3DLocationItf self,
  1463. SLmillidegree azimuth,
  1464. SLmillidegree elevation,
  1465. SLmillimeter distance
  1466. );
  1467. SLresult (*Move) (
  1468. SL3DLocationItf self,
  1469. const SLVec3D *pMovement
  1470. );
  1471. SLresult (*GetLocationCartesian) (
  1472. SL3DLocationItf self,
  1473. SLVec3D *pLocation
  1474. );
  1475. SLresult (*SetOrientationVectors) (
  1476. SL3DLocationItf self,
  1477. const SLVec3D *pFront,
  1478. const SLVec3D *pAbove
  1479. );
  1480. SLresult (*SetOrientationAngles) (
  1481. SL3DLocationItf self,
  1482. SLmillidegree heading,
  1483. SLmillidegree pitch,
  1484. SLmillidegree roll
  1485. );
  1486. SLresult (*Rotate) (
  1487. SL3DLocationItf self,
  1488. SLmillidegree theta,
  1489. const SLVec3D *pAxis
  1490. );
  1491. SLresult (*GetOrientationVectors) (
  1492. SL3DLocationItf self,
  1493. SLVec3D *pFront,
  1494. SLVec3D *pUp
  1495. );
  1496. };
  1497. /*---------------------------------------------------------------------------*/
  1498. /* 3D Doppler Interface */
  1499. /*---------------------------------------------------------------------------*/
  1500. extern const SLInterfaceID SL_IID_3DDOPPLER;
  1501. struct SL3DDopplerItf_;
  1502. typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf;
  1503. struct SL3DDopplerItf_ {
  1504. SLresult (*SetVelocityCartesian) (
  1505. SL3DDopplerItf self,
  1506. const SLVec3D *pVelocity
  1507. );
  1508. SLresult (*SetVelocitySpherical) (
  1509. SL3DDopplerItf self,
  1510. SLmillidegree azimuth,
  1511. SLmillidegree elevation,
  1512. SLmillimeter speed
  1513. );
  1514. SLresult (*GetVelocityCartesian) (
  1515. SL3DDopplerItf self,
  1516. SLVec3D *pVelocity
  1517. );
  1518. SLresult (*SetDopplerFactor) (
  1519. SL3DDopplerItf self,
  1520. SLpermille dopplerFactor
  1521. );
  1522. SLresult (*GetDopplerFactor) (
  1523. SL3DDopplerItf self,
  1524. SLpermille *pDopplerFactor
  1525. );
  1526. };
  1527. /*---------------------------------------------------------------------------*/
  1528. /* 3D Source Interface and associated defines */
  1529. /* --------------------------------------------------------------------------*/
  1530. #define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000)
  1531. #define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001)
  1532. extern const SLInterfaceID SL_IID_3DSOURCE;
  1533. struct SL3DSourceItf_;
  1534. typedef const struct SL3DSourceItf_ * const * SL3DSourceItf;
  1535. struct SL3DSourceItf_ {
  1536. SLresult (*SetHeadRelative) (
  1537. SL3DSourceItf self,
  1538. SLboolean headRelative
  1539. );
  1540. SLresult (*GetHeadRelative) (
  1541. SL3DSourceItf self,
  1542. SLboolean *pHeadRelative
  1543. );
  1544. SLresult (*SetRolloffDistances) (
  1545. SL3DSourceItf self,
  1546. SLmillimeter minDistance,
  1547. SLmillimeter maxDistance
  1548. );
  1549. SLresult (*GetRolloffDistances) (
  1550. SL3DSourceItf self,
  1551. SLmillimeter *pMinDistance,
  1552. SLmillimeter *pMaxDistance
  1553. );
  1554. SLresult (*SetRolloffMaxDistanceMute) (
  1555. SL3DSourceItf self,
  1556. SLboolean mute
  1557. );
  1558. SLresult (*GetRolloffMaxDistanceMute) (
  1559. SL3DSourceItf self,
  1560. SLboolean *pMute
  1561. );
  1562. SLresult (*SetRolloffFactor) (
  1563. SL3DSourceItf self,
  1564. SLpermille rolloffFactor
  1565. );
  1566. SLresult (*GetRolloffFactor) (
  1567. SL3DSourceItf self,
  1568. SLpermille *pRolloffFactor
  1569. );
  1570. SLresult (*SetRoomRolloffFactor) (
  1571. SL3DSourceItf self,
  1572. SLpermille roomRolloffFactor
  1573. );
  1574. SLresult (*GetRoomRolloffFactor) (
  1575. SL3DSourceItf self,
  1576. SLpermille *pRoomRolloffFactor
  1577. );
  1578. SLresult (*SetRolloffModel) (
  1579. SL3DSourceItf self,
  1580. SLuint8 model
  1581. );
  1582. SLresult (*GetRolloffModel) (
  1583. SL3DSourceItf self,
  1584. SLuint8 *pModel
  1585. );
  1586. SLresult (*SetCone) (
  1587. SL3DSourceItf self,
  1588. SLmillidegree innerAngle,
  1589. SLmillidegree outerAngle,
  1590. SLmillibel outerLevel
  1591. );
  1592. SLresult (*GetCone) (
  1593. SL3DSourceItf self,
  1594. SLmillidegree *pInnerAngle,
  1595. SLmillidegree *pOuterAngle,
  1596. SLmillibel *pOuterLevel
  1597. );
  1598. };
  1599. /*---------------------------------------------------------------------------*/
  1600. /* 3D Macroscopic Interface */
  1601. /* --------------------------------------------------------------------------*/
  1602. extern const SLInterfaceID SL_IID_3DMACROSCOPIC;
  1603. struct SL3DMacroscopicItf_;
  1604. typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf;
  1605. struct SL3DMacroscopicItf_ {
  1606. SLresult (*SetSize) (
  1607. SL3DMacroscopicItf self,
  1608. SLmillimeter width,
  1609. SLmillimeter height,
  1610. SLmillimeter depth
  1611. );
  1612. SLresult (*GetSize) (
  1613. SL3DMacroscopicItf self,
  1614. SLmillimeter *pWidth,
  1615. SLmillimeter *pHeight,
  1616. SLmillimeter *pDepth
  1617. );
  1618. SLresult (*SetOrientationAngles) (
  1619. SL3DMacroscopicItf self,
  1620. SLmillidegree heading,
  1621. SLmillidegree pitch,
  1622. SLmillidegree roll
  1623. );
  1624. SLresult (*SetOrientationVectors) (
  1625. SL3DMacroscopicItf self,
  1626. const SLVec3D *pFront,
  1627. const SLVec3D *pAbove
  1628. );
  1629. SLresult (*Rotate) (
  1630. SL3DMacroscopicItf self,
  1631. SLmillidegree theta,
  1632. const SLVec3D *pAxis
  1633. );
  1634. SLresult (*GetOrientationVectors) (
  1635. SL3DMacroscopicItf self,
  1636. SLVec3D *pFront,
  1637. SLVec3D *pUp
  1638. );
  1639. };
  1640. /*---------------------------------------------------------------------------*/
  1641. /* Mute Solo Interface */
  1642. /* --------------------------------------------------------------------------*/
  1643. extern const SLInterfaceID SL_IID_MUTESOLO;
  1644. struct SLMuteSoloItf_;
  1645. typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf;
  1646. struct SLMuteSoloItf_ {
  1647. SLresult (*SetChannelMute) (
  1648. SLMuteSoloItf self,
  1649. SLuint8 chan,
  1650. SLboolean mute
  1651. );
  1652. SLresult (*GetChannelMute) (
  1653. SLMuteSoloItf self,
  1654. SLuint8 chan,
  1655. SLboolean *pMute
  1656. );
  1657. SLresult (*SetChannelSolo) (
  1658. SLMuteSoloItf self,
  1659. SLuint8 chan,
  1660. SLboolean solo
  1661. );
  1662. SLresult (*GetChannelSolo) (
  1663. SLMuteSoloItf self,
  1664. SLuint8 chan,
  1665. SLboolean *pSolo
  1666. );
  1667. SLresult (*GetNumChannels) (
  1668. SLMuteSoloItf self,
  1669. SLuint8 *pNumChannels
  1670. );
  1671. };
  1672. /*---------------------------------------------------------------------------*/
  1673. /* Dynamic Interface Management Interface and associated types and macros */
  1674. /* --------------------------------------------------------------------------*/
  1675. #define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
  1676. #define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
  1677. #define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
  1678. #define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004)
  1679. #define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005)
  1680. extern const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT;
  1681. struct SLDynamicInterfaceManagementItf_;
  1682. typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf;
  1683. typedef void (SLAPIENTRY *slDynamicInterfaceManagementCallback) (
  1684. SLDynamicInterfaceManagementItf caller,
  1685. void * pContext,
  1686. SLuint32 event,
  1687. SLresult result,
  1688. const SLInterfaceID iid
  1689. );
  1690. struct SLDynamicInterfaceManagementItf_ {
  1691. SLresult (*AddInterface) (
  1692. SLDynamicInterfaceManagementItf self,
  1693. const SLInterfaceID iid,
  1694. SLboolean async
  1695. );
  1696. SLresult (*RemoveInterface) (
  1697. SLDynamicInterfaceManagementItf self,
  1698. const SLInterfaceID iid
  1699. );
  1700. SLresult (*ResumeInterface) (
  1701. SLDynamicInterfaceManagementItf self,
  1702. const SLInterfaceID iid,
  1703. SLboolean async
  1704. );
  1705. SLresult (*RegisterCallback) (
  1706. SLDynamicInterfaceManagementItf self,
  1707. slDynamicInterfaceManagementCallback callback,
  1708. void * pContext
  1709. );
  1710. };
  1711. /*---------------------------------------------------------------------------*/
  1712. /* Midi Message Interface and associated types */
  1713. /* --------------------------------------------------------------------------*/
  1714. #define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001)
  1715. #define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002)
  1716. #define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003)
  1717. #define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004)
  1718. #define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005)
  1719. #define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006)
  1720. #define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007)
  1721. extern const SLInterfaceID SL_IID_MIDIMESSAGE;
  1722. struct SLMIDIMessageItf_;
  1723. typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf;
  1724. typedef void (SLAPIENTRY *slMetaEventCallback) (
  1725. SLMIDIMessageItf caller,
  1726. void *pContext,
  1727. SLuint8 type,
  1728. SLuint32 length,
  1729. const SLuint8 *pData,
  1730. SLuint32 tick,
  1731. SLuint16 track
  1732. );
  1733. typedef void (SLAPIENTRY *slMIDIMessageCallback) (
  1734. SLMIDIMessageItf caller,
  1735. void *pContext,
  1736. SLuint8 statusByte,
  1737. SLuint32 length,
  1738. const SLuint8 *pData,
  1739. SLuint32 tick,
  1740. SLuint16 track
  1741. );
  1742. struct SLMIDIMessageItf_ {
  1743. SLresult (*SendMessage) (
  1744. SLMIDIMessageItf self,
  1745. const SLuint8 *data,
  1746. SLuint32 length
  1747. );
  1748. SLresult (*RegisterMetaEventCallback) (
  1749. SLMIDIMessageItf self,
  1750. slMetaEventCallback callback,
  1751. void *pContext
  1752. );
  1753. SLresult (*RegisterMIDIMessageCallback) (
  1754. SLMIDIMessageItf self,
  1755. slMIDIMessageCallback callback,
  1756. void *pContext
  1757. );
  1758. SLresult (*AddMIDIMessageCallbackFilter) (
  1759. SLMIDIMessageItf self,
  1760. SLuint32 messageType
  1761. );
  1762. SLresult (*ClearMIDIMessageCallbackFilter) (
  1763. SLMIDIMessageItf self
  1764. );
  1765. };
  1766. /*---------------------------------------------------------------------------*/
  1767. /* Midi Mute Solo interface */
  1768. /* --------------------------------------------------------------------------*/
  1769. extern const SLInterfaceID SL_IID_MIDIMUTESOLO;
  1770. struct SLMIDIMuteSoloItf_;
  1771. typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf;
  1772. struct SLMIDIMuteSoloItf_ {
  1773. SLresult (*SetChannelMute) (
  1774. SLMIDIMuteSoloItf self,
  1775. SLuint8 channel,
  1776. SLboolean mute
  1777. );
  1778. SLresult (*GetChannelMute) (
  1779. SLMIDIMuteSoloItf self,
  1780. SLuint8 channel,
  1781. SLboolean *pMute
  1782. );
  1783. SLresult (*SetChannelSolo) (
  1784. SLMIDIMuteSoloItf self,
  1785. SLuint8 channel,
  1786. SLboolean solo
  1787. );
  1788. SLresult (*GetChannelSolo) (
  1789. SLMIDIMuteSoloItf self,
  1790. SLuint8 channel,
  1791. SLboolean *pSolo
  1792. );
  1793. SLresult (*GetTrackCount) (
  1794. SLMIDIMuteSoloItf self,
  1795. SLuint16 *pCount
  1796. );
  1797. SLresult (*SetTrackMute) (
  1798. SLMIDIMuteSoloItf self,
  1799. SLuint16 track,
  1800. SLboolean mute
  1801. );
  1802. SLresult (*GetTrackMute) (
  1803. SLMIDIMuteSoloItf self,
  1804. SLuint16 track,
  1805. SLboolean *pMute
  1806. );
  1807. SLresult (*SetTrackSolo) (
  1808. SLMIDIMuteSoloItf self,
  1809. SLuint16 track,
  1810. SLboolean solo
  1811. );
  1812. SLresult (*GetTrackSolo) (
  1813. SLMIDIMuteSoloItf self,
  1814. SLuint16 track,
  1815. SLboolean *pSolo
  1816. );
  1817. };
  1818. /*---------------------------------------------------------------------------*/
  1819. /* Midi Tempo interface */
  1820. /* --------------------------------------------------------------------------*/
  1821. extern const SLInterfaceID SL_IID_MIDITEMPO;
  1822. struct SLMIDITempoItf_;
  1823. typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf;
  1824. struct SLMIDITempoItf_ {
  1825. SLresult (*SetTicksPerQuarterNote) (
  1826. SLMIDITempoItf self,
  1827. SLuint32 tpqn
  1828. );
  1829. SLresult (*GetTicksPerQuarterNote) (
  1830. SLMIDITempoItf self,
  1831. SLuint32 *pTpqn
  1832. );
  1833. SLresult (*SetMicrosecondsPerQuarterNote) (
  1834. SLMIDITempoItf self,
  1835. SLmicrosecond uspqn
  1836. );
  1837. SLresult (*GetMicrosecondsPerQuarterNote) (
  1838. SLMIDITempoItf self,
  1839. SLmicrosecond *uspqn
  1840. );
  1841. };
  1842. /*---------------------------------------------------------------------------*/
  1843. /* Midi Time interface */
  1844. /* --------------------------------------------------------------------------*/
  1845. extern const SLInterfaceID SL_IID_MIDITIME;
  1846. struct SLMIDITimeItf_;
  1847. typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf;
  1848. struct SLMIDITimeItf_ {
  1849. SLresult (*GetDuration) (
  1850. SLMIDITimeItf self,
  1851. SLuint32 *pDuration
  1852. );
  1853. SLresult (*SetPosition) (
  1854. SLMIDITimeItf self,
  1855. SLuint32 position
  1856. );
  1857. SLresult (*GetPosition) (
  1858. SLMIDITimeItf self,
  1859. SLuint32 *pPosition
  1860. );
  1861. SLresult (*SetLoopPoints) (
  1862. SLMIDITimeItf self,
  1863. SLuint32 startTick,
  1864. SLuint32 numTicks
  1865. );
  1866. SLresult (*GetLoopPoints) (
  1867. SLMIDITimeItf self,
  1868. SLuint32 *pStartTick,
  1869. SLuint32 *pNumTicks
  1870. );
  1871. };
  1872. /*---------------------------------------------------------------------------*/
  1873. /* Audio Decoder Capabilities Interface */
  1874. /* --------------------------------------------------------------------------*/
  1875. /*Audio Codec related defines*/
  1876. #define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001)
  1877. #define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002)
  1878. #define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001)
  1879. #define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002)
  1880. #define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003)
  1881. #define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004)
  1882. #define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005)
  1883. #define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006)
  1884. #define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007)
  1885. #define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008)
  1886. #define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001)
  1887. #define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001)
  1888. #define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002)
  1889. #define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003)
  1890. #define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001)
  1891. #define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002)
  1892. #define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003)
  1893. #define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004)
  1894. #define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001)
  1895. #define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001)
  1896. #define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002)
  1897. #define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003)
  1898. #define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004)
  1899. #define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005)
  1900. #define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006)
  1901. #define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001)
  1902. #define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001)
  1903. #define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001)
  1904. #define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001)
  1905. #define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002)
  1906. #define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003)
  1907. #define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004)
  1908. #define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005)
  1909. #define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006)
  1910. #define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007)
  1911. #define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008)
  1912. #define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009)
  1913. #define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A)
  1914. #define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001)
  1915. #define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002)
  1916. #define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003)
  1917. #define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004)
  1918. #define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005)
  1919. #define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006)
  1920. #define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007)
  1921. #define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001)
  1922. #define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002)
  1923. #define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003)
  1924. #define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004)
  1925. #define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001)
  1926. #define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002)
  1927. #define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003)
  1928. #define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004)
  1929. #define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005)
  1930. #define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006)
  1931. #define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007)
  1932. #define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008)
  1933. #define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001)
  1934. #define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001)
  1935. #define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002)
  1936. #define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003)
  1937. #define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004)
  1938. typedef struct SLAudioCodecDescriptor_ {
  1939. SLuint32 maxChannels;
  1940. SLuint32 minBitsPerSample;
  1941. SLuint32 maxBitsPerSample;
  1942. SLmilliHertz minSampleRate;
  1943. SLmilliHertz maxSampleRate;
  1944. SLboolean isFreqRangeContinuous;
  1945. SLmilliHertz *pSampleRatesSupported;
  1946. SLuint32 numSampleRatesSupported;
  1947. SLuint32 minBitRate;
  1948. SLuint32 maxBitRate;
  1949. SLboolean isBitrateRangeContinuous;
  1950. SLuint32 *pBitratesSupported;
  1951. SLuint32 numBitratesSupported;
  1952. SLuint32 profileSetting;
  1953. SLuint32 modeSetting;
  1954. } SLAudioCodecDescriptor;
  1955. /*Structure used to retrieve the profile and level settings supported by an audio encoder */
  1956. typedef struct SLAudioCodecProfileMode_ {
  1957. SLuint32 profileSetting;
  1958. SLuint32 modeSetting;
  1959. } SLAudioCodecProfileMode;
  1960. extern const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES;
  1961. struct SLAudioDecoderCapabilitiesItf_;
  1962. typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf;
  1963. struct SLAudioDecoderCapabilitiesItf_ {
  1964. SLresult (*GetAudioDecoders) (
  1965. SLAudioDecoderCapabilitiesItf self,
  1966. SLuint32 * pNumDecoders ,
  1967. SLuint32 *pDecoderIds
  1968. );
  1969. SLresult (*GetAudioDecoderCapabilities) (
  1970. SLAudioDecoderCapabilitiesItf self,
  1971. SLuint32 decoderId,
  1972. SLuint32 *pIndex,
  1973. SLAudioCodecDescriptor *pDescriptor
  1974. );
  1975. };
  1976. /*---------------------------------------------------------------------------*/
  1977. /* Audio Encoder Capabilities Interface */
  1978. /* --------------------------------------------------------------------------*/
  1979. /* Structure used when setting audio encoding parameters */
  1980. typedef struct SLAudioEncoderSettings_ {
  1981. SLuint32 encoderId;
  1982. SLuint32 channelsIn;
  1983. SLuint32 channelsOut;
  1984. SLmilliHertz sampleRate;
  1985. SLuint32 bitRate;
  1986. SLuint32 bitsPerSample;
  1987. SLuint32 rateControl;
  1988. SLuint32 profileSetting;
  1989. SLuint32 levelSetting;
  1990. SLuint32 channelMode;
  1991. SLuint32 streamFormat;
  1992. SLuint32 encodeOptions;
  1993. SLuint32 blockAlignment;
  1994. } SLAudioEncoderSettings;
  1995. extern const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES;
  1996. struct SLAudioEncoderCapabilitiesItf_;
  1997. typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf;
  1998. struct SLAudioEncoderCapabilitiesItf_ {
  1999. SLresult (*GetAudioEncoders) (
  2000. SLAudioEncoderCapabilitiesItf self,
  2001. SLuint32 *pNumEncoders ,
  2002. SLuint32 *pEncoderIds
  2003. );
  2004. SLresult (*GetAudioEncoderCapabilities) (
  2005. SLAudioEncoderCapabilitiesItf self,
  2006. SLuint32 encoderId,
  2007. SLuint32 *pIndex,
  2008. SLAudioCodecDescriptor * pDescriptor
  2009. );
  2010. };
  2011. /*---------------------------------------------------------------------------*/
  2012. /* Audio Encoder Interface */
  2013. /* --------------------------------------------------------------------------*/
  2014. extern const SLInterfaceID SL_IID_AUDIOENCODER;
  2015. struct SLAudioEncoderItf_;
  2016. typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf;
  2017. struct SLAudioEncoderItf_ {
  2018. SLresult (*SetEncoderSettings) (
  2019. SLAudioEncoderItf self,
  2020. SLAudioEncoderSettings *pSettings
  2021. );
  2022. SLresult (*GetEncoderSettings) (
  2023. SLAudioEncoderItf self,
  2024. SLAudioEncoderSettings *pSettings
  2025. );
  2026. };
  2027. /*---------------------------------------------------------------------------*/
  2028. /* Bass Boost Interface */
  2029. /* --------------------------------------------------------------------------*/
  2030. extern const SLInterfaceID SL_IID_BASSBOOST;
  2031. struct SLBassBoostItf_;
  2032. typedef const struct SLBassBoostItf_ * const * SLBassBoostItf;
  2033. struct SLBassBoostItf_ {
  2034. SLresult (*SetEnabled)(
  2035. SLBassBoostItf self,
  2036. SLboolean enabled
  2037. );
  2038. SLresult (*IsEnabled)(
  2039. SLBassBoostItf self,
  2040. SLboolean *pEnabled
  2041. );
  2042. SLresult (*SetStrength)(
  2043. SLBassBoostItf self,
  2044. SLpermille strength
  2045. );
  2046. SLresult (*GetRoundedStrength)(
  2047. SLBassBoostItf self,
  2048. SLpermille *pStrength
  2049. );
  2050. SLresult (*IsStrengthSupported)(
  2051. SLBassBoostItf self,
  2052. SLboolean *pSupported
  2053. );
  2054. };
  2055. /*---------------------------------------------------------------------------*/
  2056. /* Pitch Interface */
  2057. /* --------------------------------------------------------------------------*/
  2058. extern const SLInterfaceID SL_IID_PITCH;
  2059. struct SLPitchItf_;
  2060. typedef const struct SLPitchItf_ * const * SLPitchItf;
  2061. struct SLPitchItf_ {
  2062. SLresult (*SetPitch) (
  2063. SLPitchItf self,
  2064. SLpermille pitch
  2065. );
  2066. SLresult (*GetPitch) (
  2067. SLPitchItf self,
  2068. SLpermille *pPitch
  2069. );
  2070. SLresult (*GetPitchCapabilities) (
  2071. SLPitchItf self,
  2072. SLpermille *pMinPitch,
  2073. SLpermille *pMaxPitch
  2074. );
  2075. };
  2076. /*---------------------------------------------------------------------------*/
  2077. /* Rate Pitch Interface */
  2078. /* RatePitchItf is an interface for controlling the rate a sound is played */
  2079. /* back. A change in rate will cause a change in pitch. */
  2080. /* --------------------------------------------------------------------------*/
  2081. extern const SLInterfaceID SL_IID_RATEPITCH;
  2082. struct SLRatePitchItf_;
  2083. typedef const struct SLRatePitchItf_ * const * SLRatePitchItf;
  2084. struct SLRatePitchItf_ {
  2085. SLresult (*SetRate) (
  2086. SLRatePitchItf self,
  2087. SLpermille rate
  2088. );
  2089. SLresult (*GetRate) (
  2090. SLRatePitchItf self,
  2091. SLpermille *pRate
  2092. );
  2093. SLresult (*GetRatePitchCapabilities) (
  2094. SLRatePitchItf self,
  2095. SLpermille *pMinRate,
  2096. SLpermille *pMaxRate
  2097. );
  2098. };
  2099. /*---------------------------------------------------------------------------*/
  2100. /* Virtualizer Interface */
  2101. /* --------------------------------------------------------------------------*/
  2102. extern const SLInterfaceID SL_IID_VIRTUALIZER;
  2103. struct SLVirtualizerItf_;
  2104. typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf;
  2105. struct SLVirtualizerItf_ {
  2106. SLresult (*SetEnabled)(
  2107. SLVirtualizerItf self,
  2108. SLboolean enabled
  2109. );
  2110. SLresult (*IsEnabled)(
  2111. SLVirtualizerItf self,
  2112. SLboolean *pEnabled
  2113. );
  2114. SLresult (*SetStrength)(
  2115. SLVirtualizerItf self,
  2116. SLpermille strength
  2117. );
  2118. SLresult (*GetRoundedStrength)(
  2119. SLVirtualizerItf self,
  2120. SLpermille *pStrength
  2121. );
  2122. SLresult (*IsStrengthSupported)(
  2123. SLVirtualizerItf self,
  2124. SLboolean *pSupported
  2125. );
  2126. };
  2127. /*---------------------------------------------------------------------------*/
  2128. /* Visualization Interface */
  2129. /* --------------------------------------------------------------------------*/
  2130. extern const SLInterfaceID SL_IID_VISUALIZATION;
  2131. struct SLVisualizationItf_;
  2132. typedef const struct SLVisualizationItf_ * const * SLVisualizationItf;
  2133. typedef void (SLAPIENTRY *slVisualizationCallback) (
  2134. void *pContext,
  2135. const SLuint8 waveform[],
  2136. const SLuint8 fft[],
  2137. SLmilliHertz samplerate
  2138. );
  2139. struct SLVisualizationItf_{
  2140. SLresult (*RegisterVisualizationCallback)(
  2141. SLVisualizationItf self,
  2142. slVisualizationCallback callback,
  2143. void *pContext,
  2144. SLmilliHertz rate
  2145. );
  2146. SLresult (*GetMaxRate)(
  2147. SLVisualizationItf self,
  2148. SLmilliHertz* pRate
  2149. );
  2150. };
  2151. /*---------------------------------------------------------------------------*/
  2152. /* Engine Interface */
  2153. /* --------------------------------------------------------------------------*/
  2154. extern const SLInterfaceID SL_IID_ENGINE;
  2155. struct SLEngineItf_;
  2156. typedef const struct SLEngineItf_ * const * SLEngineItf;
  2157. struct SLEngineItf_ {
  2158. SLresult (*CreateLEDDevice) (
  2159. SLEngineItf self,
  2160. SLObjectItf * pDevice,
  2161. SLuint32 deviceID,
  2162. SLuint32 numInterfaces,
  2163. const SLInterfaceID * pInterfaceIds,
  2164. const SLboolean * pInterfaceRequired
  2165. );
  2166. SLresult (*CreateVibraDevice) (
  2167. SLEngineItf self,
  2168. SLObjectItf * pDevice,
  2169. SLuint32 deviceID,
  2170. SLuint32 numInterfaces,
  2171. const SLInterfaceID * pInterfaceIds,
  2172. const SLboolean * pInterfaceRequired
  2173. );
  2174. SLresult (*CreateAudioPlayer) (
  2175. SLEngineItf self,
  2176. SLObjectItf * pPlayer,
  2177. SLDataSource *pAudioSrc,
  2178. SLDataSink *pAudioSnk,
  2179. SLuint32 numInterfaces,
  2180. const SLInterfaceID * pInterfaceIds,
  2181. const SLboolean * pInterfaceRequired
  2182. );
  2183. SLresult (*CreateAudioRecorder) (
  2184. SLEngineItf self,
  2185. SLObjectItf * pRecorder,
  2186. SLDataSource *pAudioSrc,
  2187. SLDataSink *pAudioSnk,
  2188. SLuint32 numInterfaces,
  2189. const SLInterfaceID * pInterfaceIds,
  2190. const SLboolean * pInterfaceRequired
  2191. );
  2192. SLresult (*CreateMidiPlayer) (
  2193. SLEngineItf self,
  2194. SLObjectItf * pPlayer,
  2195. SLDataSource *pMIDISrc,
  2196. SLDataSource *pBankSrc,
  2197. SLDataSink *pAudioOutput,
  2198. SLDataSink *pVibra,
  2199. SLDataSink *pLEDArray,
  2200. SLuint32 numInterfaces,
  2201. const SLInterfaceID * pInterfaceIds,
  2202. const SLboolean * pInterfaceRequired
  2203. );
  2204. SLresult (*CreateListener) (
  2205. SLEngineItf self,
  2206. SLObjectItf * pListener,
  2207. SLuint32 numInterfaces,
  2208. const SLInterfaceID * pInterfaceIds,
  2209. const SLboolean * pInterfaceRequired
  2210. );
  2211. SLresult (*Create3DGroup) (
  2212. SLEngineItf self,
  2213. SLObjectItf * pGroup,
  2214. SLuint32 numInterfaces,
  2215. const SLInterfaceID * pInterfaceIds,
  2216. const SLboolean * pInterfaceRequired
  2217. );
  2218. SLresult (*CreateOutputMix) (
  2219. SLEngineItf self,
  2220. SLObjectItf * pMix,
  2221. SLuint32 numInterfaces,
  2222. const SLInterfaceID * pInterfaceIds,
  2223. const SLboolean * pInterfaceRequired
  2224. );
  2225. SLresult (*CreateMetadataExtractor) (
  2226. SLEngineItf self,
  2227. SLObjectItf * pMetadataExtractor,
  2228. SLDataSource * pDataSource,
  2229. SLuint32 numInterfaces,
  2230. const SLInterfaceID * pInterfaceIds,
  2231. const SLboolean * pInterfaceRequired
  2232. );
  2233. SLresult (*CreateExtensionObject) (
  2234. SLEngineItf self,
  2235. SLObjectItf * pObject,
  2236. void * pParameters,
  2237. SLuint32 objectID,
  2238. SLuint32 numInterfaces,
  2239. const SLInterfaceID * pInterfaceIds,
  2240. const SLboolean * pInterfaceRequired
  2241. );
  2242. SLresult (*QueryNumSupportedInterfaces) (
  2243. SLEngineItf self,
  2244. SLuint32 objectID,
  2245. SLuint32 * pNumSupportedInterfaces
  2246. );
  2247. SLresult (*QuerySupportedInterfaces) (
  2248. SLEngineItf self,
  2249. SLuint32 objectID,
  2250. SLuint32 index,
  2251. SLInterfaceID * pInterfaceId
  2252. );
  2253. SLresult (*QueryNumSupportedExtensions) (
  2254. SLEngineItf self,
  2255. SLuint32 * pNumExtensions
  2256. );
  2257. SLresult (*QuerySupportedExtension) (
  2258. SLEngineItf self,
  2259. SLuint32 index,
  2260. SLchar * pExtensionName,
  2261. SLint16 * pNameLength
  2262. );
  2263. SLresult (*IsExtensionSupported) (
  2264. SLEngineItf self,
  2265. const SLchar * pExtensionName,
  2266. SLboolean * pSupported
  2267. );
  2268. };
  2269. /*---------------------------------------------------------------------------*/
  2270. /* Engine Capabilities Interface */
  2271. /* --------------------------------------------------------------------------*/
  2272. extern const SLInterfaceID SL_IID_ENGINECAPABILITIES;
  2273. struct SLEngineCapabilitiesItf_;
  2274. typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf;
  2275. struct SLEngineCapabilitiesItf_ {
  2276. SLresult (*QuerySupportedProfiles) (
  2277. SLEngineCapabilitiesItf self,
  2278. SLuint16 *pProfilesSupported
  2279. );
  2280. SLresult (*QueryAvailableVoices) (
  2281. SLEngineCapabilitiesItf self,
  2282. SLuint16 voiceType,
  2283. SLint16 *pNumMaxVoices,
  2284. SLboolean *pIsAbsoluteMax,
  2285. SLint16 *pNumFreeVoices
  2286. );
  2287. SLresult (*QueryNumberOfMIDISynthesizers) (
  2288. SLEngineCapabilitiesItf self,
  2289. SLint16 *pNumMIDIsynthesizers
  2290. );
  2291. SLresult (*QueryAPIVersion) (
  2292. SLEngineCapabilitiesItf self,
  2293. SLint16 *pMajor,
  2294. SLint16 *pMinor,
  2295. SLint16 *pStep
  2296. );
  2297. SLresult (*QueryLEDCapabilities) (
  2298. SLEngineCapabilitiesItf self,
  2299. SLuint32 *pIndex,
  2300. SLuint32 *pLEDDeviceID,
  2301. SLLEDDescriptor *pDescriptor
  2302. );
  2303. SLresult (*QueryVibraCapabilities) (
  2304. SLEngineCapabilitiesItf self,
  2305. SLuint32 *pIndex,
  2306. SLuint32 *pVibraDeviceID,
  2307. SLVibraDescriptor *pDescriptor
  2308. );
  2309. SLresult (*IsThreadSafe) (
  2310. SLEngineCapabilitiesItf self,
  2311. SLboolean *pIsThreadSafe
  2312. );
  2313. };
  2314. /*---------------------------------------------------------------------------*/
  2315. /* Thread Sync Interface */
  2316. /* --------------------------------------------------------------------------*/
  2317. extern const SLInterfaceID SL_IID_THREADSYNC;
  2318. struct SLThreadSyncItf_;
  2319. typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf;
  2320. struct SLThreadSyncItf_ {
  2321. SLresult (*EnterCriticalSection) (
  2322. SLThreadSyncItf self
  2323. );
  2324. SLresult (*ExitCriticalSection) (
  2325. SLThreadSyncItf self
  2326. );
  2327. };
  2328. /*****************************************************************************/
  2329. /* SL engine constructor */
  2330. /*****************************************************************************/
  2331. #define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001)
  2332. #define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002)
  2333. typedef struct SLEngineOption_ {
  2334. SLuint32 feature;
  2335. SLuint32 data;
  2336. } SLEngineOption;
  2337. SLresult SLAPIENTRY slCreateEngine(
  2338. SLObjectItf *pEngine,
  2339. SLuint32 numOptions,
  2340. const SLEngineOption *pEngineOptions,
  2341. SLuint32 numInterfaces,
  2342. const SLInterfaceID *pInterfaceIds,
  2343. const SLboolean * pInterfaceRequired
  2344. );
  2345. SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces(
  2346. SLuint32 * pNumSupportedInterfaces
  2347. );
  2348. SLresult SLAPIENTRY slQuerySupportedEngineInterfaces(
  2349. SLuint32 index,
  2350. SLInterfaceID * pInterfaceId
  2351. );
  2352. #ifdef __cplusplus
  2353. } /* extern "C" */
  2354. #endif
  2355. #endif /* OPENSL_ES_H_ */