| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774 |
- /*
- * Copyright (c) 2007-2009 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and /or associated documentation files (the "Materials "), to
- * deal in the Materials without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Materials, and to permit persons to whom the Materials are
- * furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE
- * MATERIALS.
- *
- * OpenSLES.h - OpenSL ES version 1.0.1
- *
- */
- /****************************************************************************/
- /* NOTE: This file is a standard OpenSL ES header file and should not be */
- /* modified in any way. */
- /****************************************************************************/
- #ifndef OPENSL_ES_H_
- #define OPENSL_ES_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "OpenSLES_Platform.h"
- /*****************************************************************************/
- /* Common types, structures, and defines */
- /*****************************************************************************/
- #ifndef _KHRONOS_KEYS_
- #define _KHRONOS_KEYS_
- #define KHRONOS_TITLE "KhronosTitle"
- #define KHRONOS_ALBUM "KhronosAlbum"
- #define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
- #define KHRONOS_ARTIST "KhronosArtist"
- #define KHRONOS_GENRE "KhronosGenre"
- #define KHRONOS_YEAR "KhronosYear"
- #define KHRONOS_COMMENT "KhronosComment"
- #define KHRONOS_ARTIST_URL "KhronosArtistURL"
- #define KHRONOS_CONTENT_URL "KhronosContentURL"
- #define KHRONOS_RATING "KhronosRating"
- #define KHRONOS_ALBUM_ART "KhronosAlbumArt"
- #define KHRONOS_COPYRIGHT "KhronosCopyright"
- #endif
- /* remap common types to SL types for clarity */
- typedef sl_int8_t SLint8; /* 8 bit signed integer */
- typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */
- typedef sl_int16_t SLint16; /* 16 bit signed integer */
- typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */
- typedef sl_int32_t SLint32; /* 32 bit signed integer */
- typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */
- typedef SLuint32 SLboolean;
- #define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000)
- #define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001)
- typedef SLuint8 SLchar; /* UTF-8 is to be used */
- typedef SLint16 SLmillibel;
- typedef SLuint32 SLmillisecond;
- typedef SLuint32 SLmilliHertz;
- typedef SLint32 SLmillimeter;
- typedef SLint32 SLmillidegree;
- typedef SLint16 SLpermille;
- typedef SLuint32 SLmicrosecond;
- typedef SLuint32 SLresult;
- #define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
- #define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))
- #define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF)
- #define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF)
- /** Interface ID defined as a UUID */
- typedef const struct SLInterfaceID_ {
- SLuint32 time_low;
- SLuint16 time_mid;
- SLuint16 time_hi_and_version;
- SLuint16 clock_seq;
- SLuint8 node[6];
- } * SLInterfaceID;
- /* Forward declaration for the object interface */
- struct SLObjectItf_;
- typedef const struct SLObjectItf_ * const * SLObjectItf;
- /* Objects ID's */
- #define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001)
- #define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002)
- #define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003)
- #define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004)
- #define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005)
- #define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006)
- #define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007)
- #define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008)
- #define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009)
- #define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A)
- /* SL Profiles */
- #define SL_PROFILES_PHONE ((SLuint16) 0x0001)
- #define SL_PROFILES_MUSIC ((SLuint16) 0x0002)
- #define SL_PROFILES_GAME ((SLuint16) 0x0004)
- /* Types of voices supported by the system */
- #define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001)
- #define SL_VOICETYPE_MIDI ((SLuint16) 0x0002)
- #define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004)
- #define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008)
- /* Convenient macros representing various different priority levels, for use with the SetPriority method */
- #define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1))
- #define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000)
- #define SL_PRIORITY_LOW ((SLint32) -0x40000000)
- #define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000)
- #define SL_PRIORITY_NORMAL ((SLint32) 0x00000000)
- #define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000)
- #define SL_PRIORITY_HIGH ((SLint32) 0x40000000)
- #define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000)
- #define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF)
- /** These macros list the various sample formats that are possible on audio input and output devices. */
- #define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008)
- #define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010)
- #define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014)
- #define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018)
- #define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C)
- #define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020)
- /** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */
- #define SL_SAMPLINGRATE_8 ((SLuint32) 8000000)
- #define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000)
- #define SL_SAMPLINGRATE_12 ((SLuint32) 12000000)
- #define SL_SAMPLINGRATE_16 ((SLuint32) 16000000)
- #define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000)
- #define SL_SAMPLINGRATE_24 ((SLuint32) 24000000)
- #define SL_SAMPLINGRATE_32 ((SLuint32) 32000000)
- #define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000)
- #define SL_SAMPLINGRATE_48 ((SLuint32) 48000000)
- #define SL_SAMPLINGRATE_64 ((SLuint32) 64000000)
- #define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000)
- #define SL_SAMPLINGRATE_96 ((SLuint32) 96000000)
- #define SL_SAMPLINGRATE_192 ((SLuint32) 192000000)
- #define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
- #define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
- #define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
- #define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
- #define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
- #define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
- #define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
- #define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
- #define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
- #define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
- #define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
- #define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
- #define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
- #define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
- #define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
- #define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
- #define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
- #define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000)
- /*****************************************************************************/
- /* Errors */
- /* */
- /*****************************************************************************/
- #define SL_RESULT_SUCCESS ((SLuint32) 0x00000000)
- #define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001)
- #define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002)
- #define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003)
- #define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004)
- #define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005)
- #define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006)
- #define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007)
- #define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008)
- #define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009)
- #define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A)
- #define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B)
- #define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C)
- #define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D)
- #define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E)
- #define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F)
- #define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010)
- /* Object state definitions */
- #define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001)
- #define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002)
- #define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003)
- /* Object event definitions */
- #define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
- #define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
- #define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
- #define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004)
- #define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005)
- #define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006)
- #define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007)
- /*****************************************************************************/
- /* Interface definitions */
- /*****************************************************************************/
- /** NULL Interface */
- extern const SLInterfaceID SL_IID_NULL;
- /*---------------------------------------------------------------------------*/
- /* Data Source and Data Sink Structures */
- /*---------------------------------------------------------------------------*/
- /** Data locator macros */
- #define SL_DATALOCATOR_URI ((SLuint32) 0x00000001)
- #define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002)
- #define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003)
- #define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004)
- #define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005)
- #define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006)
- #define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007)
- #define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008)
- /** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/
- typedef struct SLDataLocator_URI_ {
- SLuint32 locatorType;
- SLchar * URI;
- } SLDataLocator_URI;
- /** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/
- typedef struct SLDataLocator_Address_ {
- SLuint32 locatorType;
- void *pAddress;
- SLuint32 length;
- } SLDataLocator_Address;
- /** IODevice-types */
- #define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001)
- #define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002)
- #define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003)
- #define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004)
- #define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005)
- /** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/
- typedef struct SLDataLocator_IODevice_ {
- SLuint32 locatorType;
- SLuint32 deviceType;
- SLuint32 deviceID;
- SLObjectItf device;
- } SLDataLocator_IODevice;
- /** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/
- typedef struct SLDataLocator_OutputMix {
- SLuint32 locatorType;
- SLObjectItf outputMix;
- } SLDataLocator_OutputMix;
- /** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/
- typedef struct SLDataLocator_BufferQueue {
- SLuint32 locatorType;
- SLuint32 numBuffers;
- } SLDataLocator_BufferQueue;
- /** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/
- typedef struct SLDataLocator_MIDIBufferQueue {
- SLuint32 locatorType;
- SLuint32 tpqn;
- SLuint32 numBuffers;
- } SLDataLocator_MIDIBufferQueue;
- /** Data format defines */
- #define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001)
- #define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002)
- #define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003)
- /** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/
- typedef struct SLDataFormat_MIME_ {
- SLuint32 formatType;
- SLchar * mimeType;
- SLuint32 containerType;
- } SLDataFormat_MIME;
- /* Byte order of a block of 16- or 32-bit data */
- #define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001)
- #define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002)
- /* Container type */
- #define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001)
- #define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002)
- #define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003)
- #define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004)
- #define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005)
- #define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006)
- #define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007)
- #define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008)
- #define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009)
- #define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A)
- #define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B)
- #define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C)
- #define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D)
- #define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E)
- #define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F)
- #define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010)
- #define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011)
- #define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012)
- #define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013)
- #define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014)
- #define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015)
- #define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016)
- #define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017)
- #define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018)
- #define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019)
- #define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A)
- #define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B)
- #define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C)
- #define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D)
- /** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/
- typedef struct SLDataFormat_PCM_ {
- SLuint32 formatType;
- SLuint32 numChannels;
- SLuint32 samplesPerSec;
- SLuint32 bitsPerSample;
- SLuint32 containerSize;
- SLuint32 channelMask;
- SLuint32 endianness;
- } SLDataFormat_PCM;
- typedef struct SLDataSource_ {
- void *pLocator;
- void *pFormat;
- } SLDataSource;
- typedef struct SLDataSink_ {
- void *pLocator;
- void *pFormat;
- } SLDataSink;
- /*---------------------------------------------------------------------------*/
- /* Standard Object Interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_OBJECT;
- /** Object callback */
- typedef void (SLAPIENTRY *slObjectCallback) (
- SLObjectItf caller,
- const void * pContext,
- SLuint32 event,
- SLresult result,
- SLuint32 param,
- void *pInterface
- );
- struct SLObjectItf_ {
- SLresult (*Realize) (
- SLObjectItf self,
- SLboolean async
- );
- SLresult (*Resume) (
- SLObjectItf self,
- SLboolean async
- );
- SLresult (*GetState) (
- SLObjectItf self,
- SLuint32 * pState
- );
- SLresult (*GetInterface) (
- SLObjectItf self,
- const SLInterfaceID iid,
- void * pInterface
- );
- SLresult (*RegisterCallback) (
- SLObjectItf self,
- slObjectCallback callback,
- void * pContext
- );
- void (*AbortAsyncOperation) (
- SLObjectItf self
- );
- void (*Destroy) (
- SLObjectItf self
- );
- SLresult (*SetPriority) (
- SLObjectItf self,
- SLint32 priority,
- SLboolean preemptable
- );
- SLresult (*GetPriority) (
- SLObjectItf self,
- SLint32 *pPriority,
- SLboolean *pPreemptable
- );
- SLresult (*SetLossOfControlInterfaces) (
- SLObjectItf self,
- SLint16 numInterfaces,
- SLInterfaceID * pInterfaceIDs,
- SLboolean enabled
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Audio IO Device capabilities interface */
- /*---------------------------------------------------------------------------*/
- #define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF)
- #define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE)
- #define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD)
- #define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC)
- #define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB)
- #define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001)
- #define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100)
- #define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200)
- #define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400)
- #define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001)
- #define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002)
- #define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003)
- #define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004)
- #define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005)
- /* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */
- #define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005)
- #define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001)
- #define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002)
- #define SL_DEVSCOPE_USER ((SLuint16) 0x0003)
- typedef struct SLAudioInputDescriptor_ {
- SLchar *deviceName;
- SLint16 deviceConnection;
- SLint16 deviceScope;
- SLint16 deviceLocation;
- SLboolean isForTelephony;
- SLmilliHertz minSampleRate;
- SLmilliHertz maxSampleRate;
- SLboolean isFreqRangeContinuous;
- SLmilliHertz *samplingRatesSupported;
- SLint16 numOfSamplingRatesSupported;
- SLint16 maxChannels;
- } SLAudioInputDescriptor;
- typedef struct SLAudioOutputDescriptor_ {
- SLchar *pDeviceName;
- SLint16 deviceConnection;
- SLint16 deviceScope;
- SLint16 deviceLocation;
- SLboolean isForTelephony;
- SLmilliHertz minSampleRate;
- SLmilliHertz maxSampleRate;
- SLboolean isFreqRangeContinuous;
- SLmilliHertz *samplingRatesSupported;
- SLint16 numOfSamplingRatesSupported;
- SLint16 maxChannels;
- } SLAudioOutputDescriptor;
- extern const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES;
- struct SLAudioIODeviceCapabilitiesItf_;
- typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf;
- typedef void (SLAPIENTRY *slAvailableAudioInputsChangedCallback) (
- SLAudioIODeviceCapabilitiesItf caller,
- void *pContext,
- SLuint32 deviceID,
- SLint32 numInputs,
- SLboolean isNew
- );
- typedef void (SLAPIENTRY *slAvailableAudioOutputsChangedCallback) (
- SLAudioIODeviceCapabilitiesItf caller,
- void *pContext,
- SLuint32 deviceID,
- SLint32 numOutputs,
- SLboolean isNew
- );
- typedef void (SLAPIENTRY *slDefaultDeviceIDMapChangedCallback) (
- SLAudioIODeviceCapabilitiesItf caller,
- void *pContext,
- SLboolean isOutput,
- SLint32 numDevices
- );
- struct SLAudioIODeviceCapabilitiesItf_ {
- SLresult (*GetAvailableAudioInputs)(
- SLAudioIODeviceCapabilitiesItf self,
- SLint32 *pNumInputs,
- SLuint32 *pInputDeviceIDs
- );
- SLresult (*QueryAudioInputCapabilities)(
- SLAudioIODeviceCapabilitiesItf self,
- SLuint32 deviceId,
- SLAudioInputDescriptor *pDescriptor
- );
- SLresult (*RegisterAvailableAudioInputsChangedCallback) (
- SLAudioIODeviceCapabilitiesItf self,
- slAvailableAudioInputsChangedCallback callback,
- void *pContext
- );
- SLresult (*GetAvailableAudioOutputs)(
- SLAudioIODeviceCapabilitiesItf self,
- SLint32 *pNumOutputs,
- SLuint32 *pOutputDeviceIDs
- );
- SLresult (*QueryAudioOutputCapabilities)(
- SLAudioIODeviceCapabilitiesItf self,
- SLuint32 deviceId,
- SLAudioOutputDescriptor *pDescriptor
- );
- SLresult (*RegisterAvailableAudioOutputsChangedCallback) (
- SLAudioIODeviceCapabilitiesItf self,
- slAvailableAudioOutputsChangedCallback callback,
- void *pContext
- );
- SLresult (*RegisterDefaultDeviceIDMapChangedCallback) (
- SLAudioIODeviceCapabilitiesItf self,
- slDefaultDeviceIDMapChangedCallback callback,
- void *pContext
- );
- SLresult (*GetAssociatedAudioInputs) (
- SLAudioIODeviceCapabilitiesItf self,
- SLuint32 deviceId,
- SLint32 *pNumAudioInputs,
- SLuint32 *pAudioInputDeviceIDs
- );
- SLresult (*GetAssociatedAudioOutputs) (
- SLAudioIODeviceCapabilitiesItf self,
- SLuint32 deviceId,
- SLint32 *pNumAudioOutputs,
- SLuint32 *pAudioOutputDeviceIDs
- );
- SLresult (*GetDefaultAudioDevices) (
- SLAudioIODeviceCapabilitiesItf self,
- SLuint32 defaultDeviceID,
- SLint32 *pNumAudioDevices,
- SLuint32 *pAudioDeviceIDs
- );
- SLresult (*QuerySampleFormatsSupported)(
- SLAudioIODeviceCapabilitiesItf self,
- SLuint32 deviceId,
- SLmilliHertz samplingRate,
- SLint32 *pSampleFormats,
- SLint32 *pNumOfSampleFormats
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Capabilities of the LED array IODevice */
- /*---------------------------------------------------------------------------*/
- typedef struct SLLEDDescriptor_ {
- SLuint8 ledCount;
- SLuint8 primaryLED;
- SLuint32 colorMask;
- } SLLEDDescriptor;
- /*---------------------------------------------------------------------------*/
- /* LED Array interface */
- /*---------------------------------------------------------------------------*/
- typedef struct SLHSL_ {
- SLmillidegree hue;
- SLpermille saturation;
- SLpermille lightness;
- } SLHSL;
- extern const SLInterfaceID SL_IID_LED;
- struct SLLEDArrayItf_;
- typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf;
- struct SLLEDArrayItf_ {
- SLresult (*ActivateLEDArray) (
- SLLEDArrayItf self,
- SLuint32 lightMask
- );
- SLresult (*IsLEDArrayActivated) (
- SLLEDArrayItf self,
- SLuint32 *lightMask
- );
- SLresult (*SetColor) (
- SLLEDArrayItf self,
- SLuint8 index,
- const SLHSL *color
- );
- SLresult (*GetColor) (
- SLLEDArrayItf self,
- SLuint8 index,
- SLHSL *color
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Capabilities of the Vibra IODevice */
- /*---------------------------------------------------------------------------*/
- typedef struct SLVibraDescriptor_ {
- SLboolean supportsFrequency;
- SLboolean supportsIntensity;
- SLmilliHertz minFrequency;
- SLmilliHertz maxFrequency;
- } SLVibraDescriptor;
- /*---------------------------------------------------------------------------*/
- /* Vibra interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_VIBRA;
- struct SLVibraItf_;
- typedef const struct SLVibraItf_ * const * SLVibraItf;
- struct SLVibraItf_ {
- SLresult (*Vibrate) (
- SLVibraItf self,
- SLboolean vibrate
- );
- SLresult (*IsVibrating) (
- SLVibraItf self,
- SLboolean *pVibrating
- );
- SLresult (*SetFrequency) (
- SLVibraItf self,
- SLmilliHertz frequency
- );
- SLresult (*GetFrequency) (
- SLVibraItf self,
- SLmilliHertz *pFrequency
- );
- SLresult (*SetIntensity) (
- SLVibraItf self,
- SLpermille intensity
- );
- SLresult (*GetIntensity) (
- SLVibraItf self,
- SLpermille *pIntensity
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Meta data extraction related types and interface */
- /*---------------------------------------------------------------------------*/
- #define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000)
- #define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001)
- #define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002)
- #define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003)
- #define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004)
- #define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005)
- #define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006)
- #define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007)
- #define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008)
- #define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009)
- #define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A)
- #define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B)
- #define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B)
- #define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C)
- #define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D)
- #define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E)
- #define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F)
- #define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010)
- #define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011)
- #define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012)
- #define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013)
- #define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014)
- #define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015)
- #define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016)
- #define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017)
- #define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018)
- #define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019)
- #define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A)
- #define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B)
- #define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C)
- #define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D)
- #define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E)
- #define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F)
- #define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020)
- #define SL_METADATA_FILTER_KEY ((SLuint8) 0x01)
- #define SL_METADATA_FILTER_LANG ((SLuint8) 0x02)
- #define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04)
- typedef struct SLMetadataInfo_ {
- SLuint32 size;
- SLuint32 encoding;
- SLchar langCountry[16];
- SLuint8 data[1];
- } SLMetadataInfo;
- extern const SLInterfaceID SL_IID_METADATAEXTRACTION;
- struct SLMetadataExtractionItf_;
- typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf;
- struct SLMetadataExtractionItf_ {
- SLresult (*GetItemCount) (
- SLMetadataExtractionItf self,
- SLuint32 *pItemCount
- );
- SLresult (*GetKeySize) (
- SLMetadataExtractionItf self,
- SLuint32 index,
- SLuint32 *pKeySize
- );
- SLresult (*GetKey) (
- SLMetadataExtractionItf self,
- SLuint32 index,
- SLuint32 keySize,
- SLMetadataInfo *pKey
- );
- SLresult (*GetValueSize) (
- SLMetadataExtractionItf self,
- SLuint32 index,
- SLuint32 *pValueSize
- );
- SLresult (*GetValue) (
- SLMetadataExtractionItf self,
- SLuint32 index,
- SLuint32 valueSize,
- SLMetadataInfo *pValue
- );
- SLresult (*AddKeyFilter) (
- SLMetadataExtractionItf self,
- SLuint32 keySize,
- const void *pKey,
- SLuint32 keyEncoding,
- const SLchar *pValueLangCountry,
- SLuint32 valueEncoding,
- SLuint8 filterMask
- );
- SLresult (*ClearKeyFilter) (
- SLMetadataExtractionItf self
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Meta data traversal related types and interface */
- /*---------------------------------------------------------------------------*/
- #define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001)
- #define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002)
- #define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001)
- #define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002)
- #define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003)
- #define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004)
- #define SL_NODE_PARENT 0xFFFFFFFF
- extern const SLInterfaceID SL_IID_METADATATRAVERSAL;
- struct SLMetadataTraversalItf_;
- typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf;
- struct SLMetadataTraversalItf_ {
- SLresult (*SetMode) (
- SLMetadataTraversalItf self,
- SLuint32 mode
- );
- SLresult (*GetChildCount) (
- SLMetadataTraversalItf self,
- SLuint32 *pCount
- );
- SLresult (*GetChildMIMETypeSize) (
- SLMetadataTraversalItf self,
- SLuint32 index,
- SLuint32 *pSize
- );
- SLresult (*GetChildInfo) (
- SLMetadataTraversalItf self,
- SLuint32 index,
- SLint32 *pNodeID,
- SLuint32 *pType,
- SLuint32 size,
- SLchar *pMimeType
- );
- SLresult (*SetActiveNode) (
- SLMetadataTraversalItf self,
- SLuint32 index
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Dynamic Source types and interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_DYNAMICSOURCE;
- struct SLDynamicSourceItf_;
- typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf;
- struct SLDynamicSourceItf_ {
- SLresult (*SetSource) (
- SLDynamicSourceItf self,
- SLDataSource *pDataSource
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Output Mix interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_OUTPUTMIX;
- struct SLOutputMixItf_;
- typedef const struct SLOutputMixItf_ * const * SLOutputMixItf;
- typedef void (SLAPIENTRY *slMixDeviceChangeCallback) (
- SLOutputMixItf caller,
- void *pContext
- );
- struct SLOutputMixItf_ {
- SLresult (*GetDestinationOutputDeviceIDs) (
- SLOutputMixItf self,
- SLint32 *pNumDevices,
- SLuint32 *pDeviceIDs
- );
- SLresult (*RegisterDeviceChangeCallback) (
- SLOutputMixItf self,
- slMixDeviceChangeCallback callback,
- void *pContext
- );
- SLresult (*ReRoute)(
- SLOutputMixItf self,
- SLint32 numOutputDevices,
- SLuint32 *pOutputDeviceIDs
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Playback interface */
- /*---------------------------------------------------------------------------*/
- /** Playback states */
- #define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001)
- #define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002)
- #define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003)
- /** Play events **/
- #define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001)
- #define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002)
- #define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
- #define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008)
- #define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010)
- #define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF)
- extern const SLInterfaceID SL_IID_PLAY;
- /** Playback interface methods */
- struct SLPlayItf_;
- typedef const struct SLPlayItf_ * const * SLPlayItf;
- typedef void (SLAPIENTRY *slPlayCallback) (
- SLPlayItf caller,
- void *pContext,
- SLuint32 event
- );
- struct SLPlayItf_ {
- SLresult (*SetPlayState) (
- SLPlayItf self,
- SLuint32 state
- );
- SLresult (*GetPlayState) (
- SLPlayItf self,
- SLuint32 *pState
- );
- SLresult (*GetDuration) (
- SLPlayItf self,
- SLmillisecond *pMsec
- );
- SLresult (*GetPosition) (
- SLPlayItf self,
- SLmillisecond *pMsec
- );
- SLresult (*RegisterCallback) (
- SLPlayItf self,
- slPlayCallback callback,
- void *pContext
- );
- SLresult (*SetCallbackEventsMask) (
- SLPlayItf self,
- SLuint32 eventFlags
- );
- SLresult (*GetCallbackEventsMask) (
- SLPlayItf self,
- SLuint32 *pEventFlags
- );
- SLresult (*SetMarkerPosition) (
- SLPlayItf self,
- SLmillisecond mSec
- );
- SLresult (*ClearMarkerPosition) (
- SLPlayItf self
- );
- SLresult (*GetMarkerPosition) (
- SLPlayItf self,
- SLmillisecond *pMsec
- );
- SLresult (*SetPositionUpdatePeriod) (
- SLPlayItf self,
- SLmillisecond mSec
- );
- SLresult (*GetPositionUpdatePeriod) (
- SLPlayItf self,
- SLmillisecond *pMsec
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Prefetch status interface */
- /*---------------------------------------------------------------------------*/
- #define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001)
- #define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002)
- #define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001)
- #define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002)
- #define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003)
- extern const SLInterfaceID SL_IID_PREFETCHSTATUS;
- /** Prefetch status interface methods */
- struct SLPrefetchStatusItf_;
- typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf;
- typedef void (SLAPIENTRY *slPrefetchCallback) (
- SLPrefetchStatusItf caller,
- void *pContext,
- SLuint32 event
- );
- struct SLPrefetchStatusItf_ {
- SLresult (*GetPrefetchStatus) (
- SLPrefetchStatusItf self,
- SLuint32 *pStatus
- );
- SLresult (*GetFillLevel) (
- SLPrefetchStatusItf self,
- SLpermille *pLevel
- );
- SLresult (*RegisterCallback) (
- SLPrefetchStatusItf self,
- slPrefetchCallback callback,
- void *pContext
- );
- SLresult (*SetCallbackEventsMask) (
- SLPrefetchStatusItf self,
- SLuint32 eventFlags
- );
- SLresult (*GetCallbackEventsMask) (
- SLPrefetchStatusItf self,
- SLuint32 *pEventFlags
- );
- SLresult (*SetFillUpdatePeriod) (
- SLPrefetchStatusItf self,
- SLpermille period
- );
- SLresult (*GetFillUpdatePeriod) (
- SLPrefetchStatusItf self,
- SLpermille *pPeriod
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Playback Rate interface */
- /*---------------------------------------------------------------------------*/
- #define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001)
- #define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002)
- #define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100)
- #define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200)
- #define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400)
- #define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800)
- extern const SLInterfaceID SL_IID_PLAYBACKRATE;
- struct SLPlaybackRateItf_;
- typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf;
- struct SLPlaybackRateItf_ {
- SLresult (*SetRate)(
- SLPlaybackRateItf self,
- SLpermille rate
- );
- SLresult (*GetRate)(
- SLPlaybackRateItf self,
- SLpermille *pRate
- );
- SLresult (*SetPropertyConstraints)(
- SLPlaybackRateItf self,
- SLuint32 constraints
- );
- SLresult (*GetProperties)(
- SLPlaybackRateItf self,
- SLuint32 *pProperties
- );
- SLresult (*GetCapabilitiesOfRate)(
- SLPlaybackRateItf self,
- SLpermille rate,
- SLuint32 *pCapabilities
- );
- SLresult (*GetRateRange) (
- SLPlaybackRateItf self,
- SLuint8 index,
- SLpermille *pMinRate,
- SLpermille *pMaxRate,
- SLpermille *pStepSize,
- SLuint32 *pCapabilities
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Seek Interface */
- /*---------------------------------------------------------------------------*/
- #define SL_SEEKMODE_FAST ((SLuint32) 0x0001)
- #define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002)
- extern const SLInterfaceID SL_IID_SEEK;
- struct SLSeekItf_;
- typedef const struct SLSeekItf_ * const * SLSeekItf;
- struct SLSeekItf_ {
- SLresult (*SetPosition)(
- SLSeekItf self,
- SLmillisecond pos,
- SLuint32 seekMode
- );
- SLresult (*SetLoop)(
- SLSeekItf self,
- SLboolean loopEnable,
- SLmillisecond startPos,
- SLmillisecond endPos
- );
- SLresult (*GetLoop)(
- SLSeekItf self,
- SLboolean *pLoopEnabled,
- SLmillisecond *pStartPos,
- SLmillisecond *pEndPos
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Standard Recording Interface */
- /*---------------------------------------------------------------------------*/
- /** Recording states */
- #define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001)
- #define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002)
- #define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003)
- /** Record event **/
- #define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001)
- #define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002)
- #define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
- #define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008)
- #define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010)
- /* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */
- #define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020)
- #define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020)
- extern const SLInterfaceID SL_IID_RECORD;
- struct SLRecordItf_;
- typedef const struct SLRecordItf_ * const * SLRecordItf;
- typedef void (SLAPIENTRY *slRecordCallback) (
- SLRecordItf caller,
- void *pContext,
- SLuint32 event
- );
- /** Recording interface methods */
- struct SLRecordItf_ {
- SLresult (*SetRecordState) (
- SLRecordItf self,
- SLuint32 state
- );
- SLresult (*GetRecordState) (
- SLRecordItf self,
- SLuint32 *pState
- );
- SLresult (*SetDurationLimit) (
- SLRecordItf self,
- SLmillisecond msec
- );
- SLresult (*GetPosition) (
- SLRecordItf self,
- SLmillisecond *pMsec
- );
- SLresult (*RegisterCallback) (
- SLRecordItf self,
- slRecordCallback callback,
- void *pContext
- );
- SLresult (*SetCallbackEventsMask) (
- SLRecordItf self,
- SLuint32 eventFlags
- );
- SLresult (*GetCallbackEventsMask) (
- SLRecordItf self,
- SLuint32 *pEventFlags
- );
- SLresult (*SetMarkerPosition) (
- SLRecordItf self,
- SLmillisecond mSec
- );
- SLresult (*ClearMarkerPosition) (
- SLRecordItf self
- );
- SLresult (*GetMarkerPosition) (
- SLRecordItf self,
- SLmillisecond *pMsec
- );
- SLresult (*SetPositionUpdatePeriod) (
- SLRecordItf self,
- SLmillisecond mSec
- );
- SLresult (*GetPositionUpdatePeriod) (
- SLRecordItf self,
- SLmillisecond *pMsec
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Equalizer interface */
- /*---------------------------------------------------------------------------*/
- #define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF)
- extern const SLInterfaceID SL_IID_EQUALIZER;
- struct SLEqualizerItf_;
- typedef const struct SLEqualizerItf_ * const * SLEqualizerItf;
- struct SLEqualizerItf_ {
- SLresult (*SetEnabled)(
- SLEqualizerItf self,
- SLboolean enabled
- );
- SLresult (*IsEnabled)(
- SLEqualizerItf self,
- SLboolean *pEnabled
- );
- SLresult (*GetNumberOfBands)(
- SLEqualizerItf self,
- SLuint16 *pAmount
- );
- SLresult (*GetBandLevelRange)(
- SLEqualizerItf self,
- SLmillibel *pMin,
- SLmillibel *pMax
- );
- SLresult (*SetBandLevel)(
- SLEqualizerItf self,
- SLuint16 band,
- SLmillibel level
- );
- SLresult (*GetBandLevel)(
- SLEqualizerItf self,
- SLuint16 band,
- SLmillibel *pLevel
- );
- SLresult (*GetCenterFreq)(
- SLEqualizerItf self,
- SLuint16 band,
- SLmilliHertz *pCenter
- );
- SLresult (*GetBandFreqRange)(
- SLEqualizerItf self,
- SLuint16 band,
- SLmilliHertz *pMin,
- SLmilliHertz *pMax
- );
- SLresult (*GetBand)(
- SLEqualizerItf self,
- SLmilliHertz frequency,
- SLuint16 *pBand
- );
- SLresult (*GetCurrentPreset)(
- SLEqualizerItf self,
- SLuint16 *pPreset
- );
- SLresult (*UsePreset)(
- SLEqualizerItf self,
- SLuint16 index
- );
- SLresult (*GetNumberOfPresets)(
- SLEqualizerItf self,
- SLuint16 *pNumPresets
- );
- SLresult (*GetPresetName)(
- SLEqualizerItf self,
- SLuint16 index,
- const SLchar ** ppName
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Volume Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_VOLUME;
- struct SLVolumeItf_;
- typedef const struct SLVolumeItf_ * const * SLVolumeItf;
- struct SLVolumeItf_ {
- SLresult (*SetVolumeLevel) (
- SLVolumeItf self,
- SLmillibel level
- );
- SLresult (*GetVolumeLevel) (
- SLVolumeItf self,
- SLmillibel *pLevel
- );
- SLresult (*GetMaxVolumeLevel) (
- SLVolumeItf self,
- SLmillibel *pMaxLevel
- );
- SLresult (*SetMute) (
- SLVolumeItf self,
- SLboolean mute
- );
- SLresult (*GetMute) (
- SLVolumeItf self,
- SLboolean *pMute
- );
- SLresult (*EnableStereoPosition) (
- SLVolumeItf self,
- SLboolean enable
- );
- SLresult (*IsEnabledStereoPosition) (
- SLVolumeItf self,
- SLboolean *pEnable
- );
- SLresult (*SetStereoPosition) (
- SLVolumeItf self,
- SLpermille stereoPosition
- );
- SLresult (*GetStereoPosition) (
- SLVolumeItf self,
- SLpermille *pStereoPosition
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Device Volume Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_DEVICEVOLUME;
- struct SLDeviceVolumeItf_;
- typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf;
- struct SLDeviceVolumeItf_ {
- SLresult (*GetVolumeScale) (
- SLDeviceVolumeItf self,
- SLuint32 deviceID,
- SLint32 *pMinValue,
- SLint32 *pMaxValue,
- SLboolean *pIsMillibelScale
- );
- SLresult (*SetVolume) (
- SLDeviceVolumeItf self,
- SLuint32 deviceID,
- SLint32 volume
- );
- SLresult (*GetVolume) (
- SLDeviceVolumeItf self,
- SLuint32 deviceID,
- SLint32 *pVolume
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Buffer Queue Interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_BUFFERQUEUE;
- struct SLBufferQueueItf_;
- typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf;
- typedef void (SLAPIENTRY *slBufferQueueCallback)(
- SLBufferQueueItf caller,
- void *pContext
- );
- /** Buffer queue state **/
- typedef struct SLBufferQueueState_ {
- SLuint32 count;
- SLuint32 playIndex;
- } SLBufferQueueState;
- struct SLBufferQueueItf_ {
- SLresult (*Enqueue) (
- SLBufferQueueItf self,
- const void *pBuffer,
- SLuint32 size
- );
- SLresult (*Clear) (
- SLBufferQueueItf self
- );
- SLresult (*GetState) (
- SLBufferQueueItf self,
- SLBufferQueueState *pState
- );
- SLresult (*RegisterCallback) (
- SLBufferQueueItf self,
- slBufferQueueCallback callback,
- void* pContext
- );
- };
- /*---------------------------------------------------------------------------*/
- /* PresetReverb */
- /*---------------------------------------------------------------------------*/
- #define SL_REVERBPRESET_NONE ((SLuint16) 0x0000)
- #define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001)
- #define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002)
- #define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003)
- #define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004)
- #define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005)
- #define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006)
- extern const SLInterfaceID SL_IID_PRESETREVERB;
- struct SLPresetReverbItf_;
- typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf;
- struct SLPresetReverbItf_ {
- SLresult (*SetPreset) (
- SLPresetReverbItf self,
- SLuint16 preset
- );
- SLresult (*GetPreset) (
- SLPresetReverbItf self,
- SLuint16 *pPreset
- );
- };
- /*---------------------------------------------------------------------------*/
- /* EnvironmentalReverb */
- /*---------------------------------------------------------------------------*/
- #define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \
- { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \
- { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
- { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \
- { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \
- { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
- { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \
- { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
- { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
- { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \
- { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \
- { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \
- { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
- { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \
- { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
- { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \
- { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \
- { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_CITY \
- { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
- { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \
- { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \
- { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
- { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
- { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
- { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
- { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
- { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
- { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
- { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
- { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 }
- #define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \
- { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 }
- typedef struct SLEnvironmentalReverbSettings_ {
- SLmillibel roomLevel;
- SLmillibel roomHFLevel;
- SLmillisecond decayTime;
- SLpermille decayHFRatio;
- SLmillibel reflectionsLevel;
- SLmillisecond reflectionsDelay;
- SLmillibel reverbLevel;
- SLmillisecond reverbDelay;
- SLpermille diffusion;
- SLpermille density;
- } SLEnvironmentalReverbSettings;
- extern const SLInterfaceID SL_IID_ENVIRONMENTALREVERB;
- struct SLEnvironmentalReverbItf_;
- typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf;
- struct SLEnvironmentalReverbItf_ {
- SLresult (*SetRoomLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel room
- );
- SLresult (*GetRoomLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel *pRoom
- );
- SLresult (*SetRoomHFLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel roomHF
- );
- SLresult (*GetRoomHFLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel *pRoomHF
- );
- SLresult (*SetDecayTime) (
- SLEnvironmentalReverbItf self,
- SLmillisecond decayTime
- );
- SLresult (*GetDecayTime) (
- SLEnvironmentalReverbItf self,
- SLmillisecond *pDecayTime
- );
- SLresult (*SetDecayHFRatio) (
- SLEnvironmentalReverbItf self,
- SLpermille decayHFRatio
- );
- SLresult (*GetDecayHFRatio) (
- SLEnvironmentalReverbItf self,
- SLpermille *pDecayHFRatio
- );
- SLresult (*SetReflectionsLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel reflectionsLevel
- );
- SLresult (*GetReflectionsLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel *pReflectionsLevel
- );
- SLresult (*SetReflectionsDelay) (
- SLEnvironmentalReverbItf self,
- SLmillisecond reflectionsDelay
- );
- SLresult (*GetReflectionsDelay) (
- SLEnvironmentalReverbItf self,
- SLmillisecond *pReflectionsDelay
- );
- SLresult (*SetReverbLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel reverbLevel
- );
- SLresult (*GetReverbLevel) (
- SLEnvironmentalReverbItf self,
- SLmillibel *pReverbLevel
- );
- SLresult (*SetReverbDelay) (
- SLEnvironmentalReverbItf self,
- SLmillisecond reverbDelay
- );
- SLresult (*GetReverbDelay) (
- SLEnvironmentalReverbItf self,
- SLmillisecond *pReverbDelay
- );
- SLresult (*SetDiffusion) (
- SLEnvironmentalReverbItf self,
- SLpermille diffusion
- );
- SLresult (*GetDiffusion) (
- SLEnvironmentalReverbItf self,
- SLpermille *pDiffusion
- );
- SLresult (*SetDensity) (
- SLEnvironmentalReverbItf self,
- SLpermille density
- );
- SLresult (*GetDensity) (
- SLEnvironmentalReverbItf self,
- SLpermille *pDensity
- );
- SLresult (*SetEnvironmentalReverbProperties) (
- SLEnvironmentalReverbItf self,
- const SLEnvironmentalReverbSettings *pProperties
- );
- SLresult (*GetEnvironmentalReverbProperties) (
- SLEnvironmentalReverbItf self,
- SLEnvironmentalReverbSettings *pProperties
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Effects Send Interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_EFFECTSEND;
- struct SLEffectSendItf_;
- typedef const struct SLEffectSendItf_ * const * SLEffectSendItf;
- struct SLEffectSendItf_ {
- SLresult (*EnableEffectSend) (
- SLEffectSendItf self,
- const void *pAuxEffect,
- SLboolean enable,
- SLmillibel initialLevel
- );
- SLresult (*IsEnabled) (
- SLEffectSendItf self,
- const void * pAuxEffect,
- SLboolean *pEnable
- );
- SLresult (*SetDirectLevel) (
- SLEffectSendItf self,
- SLmillibel directLevel
- );
- SLresult (*GetDirectLevel) (
- SLEffectSendItf self,
- SLmillibel *pDirectLevel
- );
- SLresult (*SetSendLevel) (
- SLEffectSendItf self,
- const void *pAuxEffect,
- SLmillibel sendLevel
- );
- SLresult (*GetSendLevel)(
- SLEffectSendItf self,
- const void *pAuxEffect,
- SLmillibel *pSendLevel
- );
- };
- /*---------------------------------------------------------------------------*/
- /* 3D Grouping Interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_3DGROUPING;
- struct SL3DGroupingItf_ ;
- typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf;
- struct SL3DGroupingItf_ {
- SLresult (*Set3DGroup) (
- SL3DGroupingItf self,
- SLObjectItf group
- );
- SLresult (*Get3DGroup) (
- SL3DGroupingItf self,
- SLObjectItf *pGroup
- );
- };
- /*---------------------------------------------------------------------------*/
- /* 3D Commit Interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_3DCOMMIT;
- struct SL3DCommitItf_;
- typedef const struct SL3DCommitItf_* const * SL3DCommitItf;
- struct SL3DCommitItf_ {
- SLresult (*Commit) (
- SL3DCommitItf self
- );
- SLresult (*SetDeferred) (
- SL3DCommitItf self,
- SLboolean deferred
- );
- };
- /*---------------------------------------------------------------------------*/
- /* 3D Location Interface */
- /*---------------------------------------------------------------------------*/
- typedef struct SLVec3D_ {
- SLint32 x;
- SLint32 y;
- SLint32 z;
- } SLVec3D;
- extern const SLInterfaceID SL_IID_3DLOCATION;
- struct SL3DLocationItf_;
- typedef const struct SL3DLocationItf_ * const * SL3DLocationItf;
- struct SL3DLocationItf_ {
- SLresult (*SetLocationCartesian) (
- SL3DLocationItf self,
- const SLVec3D *pLocation
- );
- SLresult (*SetLocationSpherical) (
- SL3DLocationItf self,
- SLmillidegree azimuth,
- SLmillidegree elevation,
- SLmillimeter distance
- );
- SLresult (*Move) (
- SL3DLocationItf self,
- const SLVec3D *pMovement
- );
- SLresult (*GetLocationCartesian) (
- SL3DLocationItf self,
- SLVec3D *pLocation
- );
- SLresult (*SetOrientationVectors) (
- SL3DLocationItf self,
- const SLVec3D *pFront,
- const SLVec3D *pAbove
- );
- SLresult (*SetOrientationAngles) (
- SL3DLocationItf self,
- SLmillidegree heading,
- SLmillidegree pitch,
- SLmillidegree roll
- );
- SLresult (*Rotate) (
- SL3DLocationItf self,
- SLmillidegree theta,
- const SLVec3D *pAxis
- );
- SLresult (*GetOrientationVectors) (
- SL3DLocationItf self,
- SLVec3D *pFront,
- SLVec3D *pUp
- );
- };
- /*---------------------------------------------------------------------------*/
- /* 3D Doppler Interface */
- /*---------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_3DDOPPLER;
- struct SL3DDopplerItf_;
- typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf;
- struct SL3DDopplerItf_ {
- SLresult (*SetVelocityCartesian) (
- SL3DDopplerItf self,
- const SLVec3D *pVelocity
- );
- SLresult (*SetVelocitySpherical) (
- SL3DDopplerItf self,
- SLmillidegree azimuth,
- SLmillidegree elevation,
- SLmillimeter speed
- );
- SLresult (*GetVelocityCartesian) (
- SL3DDopplerItf self,
- SLVec3D *pVelocity
- );
- SLresult (*SetDopplerFactor) (
- SL3DDopplerItf self,
- SLpermille dopplerFactor
- );
- SLresult (*GetDopplerFactor) (
- SL3DDopplerItf self,
- SLpermille *pDopplerFactor
- );
- };
- /*---------------------------------------------------------------------------*/
- /* 3D Source Interface and associated defines */
- /* --------------------------------------------------------------------------*/
- #define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000)
- #define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001)
- extern const SLInterfaceID SL_IID_3DSOURCE;
- struct SL3DSourceItf_;
- typedef const struct SL3DSourceItf_ * const * SL3DSourceItf;
- struct SL3DSourceItf_ {
- SLresult (*SetHeadRelative) (
- SL3DSourceItf self,
- SLboolean headRelative
- );
- SLresult (*GetHeadRelative) (
- SL3DSourceItf self,
- SLboolean *pHeadRelative
- );
- SLresult (*SetRolloffDistances) (
- SL3DSourceItf self,
- SLmillimeter minDistance,
- SLmillimeter maxDistance
- );
- SLresult (*GetRolloffDistances) (
- SL3DSourceItf self,
- SLmillimeter *pMinDistance,
- SLmillimeter *pMaxDistance
- );
- SLresult (*SetRolloffMaxDistanceMute) (
- SL3DSourceItf self,
- SLboolean mute
- );
- SLresult (*GetRolloffMaxDistanceMute) (
- SL3DSourceItf self,
- SLboolean *pMute
- );
- SLresult (*SetRolloffFactor) (
- SL3DSourceItf self,
- SLpermille rolloffFactor
- );
- SLresult (*GetRolloffFactor) (
- SL3DSourceItf self,
- SLpermille *pRolloffFactor
- );
- SLresult (*SetRoomRolloffFactor) (
- SL3DSourceItf self,
- SLpermille roomRolloffFactor
- );
- SLresult (*GetRoomRolloffFactor) (
- SL3DSourceItf self,
- SLpermille *pRoomRolloffFactor
- );
- SLresult (*SetRolloffModel) (
- SL3DSourceItf self,
- SLuint8 model
- );
- SLresult (*GetRolloffModel) (
- SL3DSourceItf self,
- SLuint8 *pModel
- );
- SLresult (*SetCone) (
- SL3DSourceItf self,
- SLmillidegree innerAngle,
- SLmillidegree outerAngle,
- SLmillibel outerLevel
- );
- SLresult (*GetCone) (
- SL3DSourceItf self,
- SLmillidegree *pInnerAngle,
- SLmillidegree *pOuterAngle,
- SLmillibel *pOuterLevel
- );
- };
- /*---------------------------------------------------------------------------*/
- /* 3D Macroscopic Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_3DMACROSCOPIC;
- struct SL3DMacroscopicItf_;
- typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf;
- struct SL3DMacroscopicItf_ {
- SLresult (*SetSize) (
- SL3DMacroscopicItf self,
- SLmillimeter width,
- SLmillimeter height,
- SLmillimeter depth
- );
- SLresult (*GetSize) (
- SL3DMacroscopicItf self,
- SLmillimeter *pWidth,
- SLmillimeter *pHeight,
- SLmillimeter *pDepth
- );
- SLresult (*SetOrientationAngles) (
- SL3DMacroscopicItf self,
- SLmillidegree heading,
- SLmillidegree pitch,
- SLmillidegree roll
- );
- SLresult (*SetOrientationVectors) (
- SL3DMacroscopicItf self,
- const SLVec3D *pFront,
- const SLVec3D *pAbove
- );
- SLresult (*Rotate) (
- SL3DMacroscopicItf self,
- SLmillidegree theta,
- const SLVec3D *pAxis
- );
- SLresult (*GetOrientationVectors) (
- SL3DMacroscopicItf self,
- SLVec3D *pFront,
- SLVec3D *pUp
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Mute Solo Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_MUTESOLO;
- struct SLMuteSoloItf_;
- typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf;
- struct SLMuteSoloItf_ {
- SLresult (*SetChannelMute) (
- SLMuteSoloItf self,
- SLuint8 chan,
- SLboolean mute
- );
- SLresult (*GetChannelMute) (
- SLMuteSoloItf self,
- SLuint8 chan,
- SLboolean *pMute
- );
- SLresult (*SetChannelSolo) (
- SLMuteSoloItf self,
- SLuint8 chan,
- SLboolean solo
- );
- SLresult (*GetChannelSolo) (
- SLMuteSoloItf self,
- SLuint8 chan,
- SLboolean *pSolo
- );
- SLresult (*GetNumChannels) (
- SLMuteSoloItf self,
- SLuint8 *pNumChannels
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Dynamic Interface Management Interface and associated types and macros */
- /* --------------------------------------------------------------------------*/
- #define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
- #define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
- #define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
- #define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004)
- #define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005)
- extern const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT;
- struct SLDynamicInterfaceManagementItf_;
- typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf;
- typedef void (SLAPIENTRY *slDynamicInterfaceManagementCallback) (
- SLDynamicInterfaceManagementItf caller,
- void * pContext,
- SLuint32 event,
- SLresult result,
- const SLInterfaceID iid
- );
- struct SLDynamicInterfaceManagementItf_ {
- SLresult (*AddInterface) (
- SLDynamicInterfaceManagementItf self,
- const SLInterfaceID iid,
- SLboolean async
- );
- SLresult (*RemoveInterface) (
- SLDynamicInterfaceManagementItf self,
- const SLInterfaceID iid
- );
- SLresult (*ResumeInterface) (
- SLDynamicInterfaceManagementItf self,
- const SLInterfaceID iid,
- SLboolean async
- );
- SLresult (*RegisterCallback) (
- SLDynamicInterfaceManagementItf self,
- slDynamicInterfaceManagementCallback callback,
- void * pContext
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Midi Message Interface and associated types */
- /* --------------------------------------------------------------------------*/
- #define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001)
- #define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002)
- #define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003)
- #define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004)
- #define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005)
- #define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006)
- #define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007)
- extern const SLInterfaceID SL_IID_MIDIMESSAGE;
- struct SLMIDIMessageItf_;
- typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf;
- typedef void (SLAPIENTRY *slMetaEventCallback) (
- SLMIDIMessageItf caller,
- void *pContext,
- SLuint8 type,
- SLuint32 length,
- const SLuint8 *pData,
- SLuint32 tick,
- SLuint16 track
- );
- typedef void (SLAPIENTRY *slMIDIMessageCallback) (
- SLMIDIMessageItf caller,
- void *pContext,
- SLuint8 statusByte,
- SLuint32 length,
- const SLuint8 *pData,
- SLuint32 tick,
- SLuint16 track
- );
- struct SLMIDIMessageItf_ {
- SLresult (*SendMessage) (
- SLMIDIMessageItf self,
- const SLuint8 *data,
- SLuint32 length
- );
- SLresult (*RegisterMetaEventCallback) (
- SLMIDIMessageItf self,
- slMetaEventCallback callback,
- void *pContext
- );
- SLresult (*RegisterMIDIMessageCallback) (
- SLMIDIMessageItf self,
- slMIDIMessageCallback callback,
- void *pContext
- );
- SLresult (*AddMIDIMessageCallbackFilter) (
- SLMIDIMessageItf self,
- SLuint32 messageType
- );
- SLresult (*ClearMIDIMessageCallbackFilter) (
- SLMIDIMessageItf self
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Midi Mute Solo interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_MIDIMUTESOLO;
- struct SLMIDIMuteSoloItf_;
- typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf;
- struct SLMIDIMuteSoloItf_ {
- SLresult (*SetChannelMute) (
- SLMIDIMuteSoloItf self,
- SLuint8 channel,
- SLboolean mute
- );
- SLresult (*GetChannelMute) (
- SLMIDIMuteSoloItf self,
- SLuint8 channel,
- SLboolean *pMute
- );
- SLresult (*SetChannelSolo) (
- SLMIDIMuteSoloItf self,
- SLuint8 channel,
- SLboolean solo
- );
- SLresult (*GetChannelSolo) (
- SLMIDIMuteSoloItf self,
- SLuint8 channel,
- SLboolean *pSolo
- );
- SLresult (*GetTrackCount) (
- SLMIDIMuteSoloItf self,
- SLuint16 *pCount
- );
- SLresult (*SetTrackMute) (
- SLMIDIMuteSoloItf self,
- SLuint16 track,
- SLboolean mute
- );
- SLresult (*GetTrackMute) (
- SLMIDIMuteSoloItf self,
- SLuint16 track,
- SLboolean *pMute
- );
- SLresult (*SetTrackSolo) (
- SLMIDIMuteSoloItf self,
- SLuint16 track,
- SLboolean solo
- );
- SLresult (*GetTrackSolo) (
- SLMIDIMuteSoloItf self,
- SLuint16 track,
- SLboolean *pSolo
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Midi Tempo interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_MIDITEMPO;
- struct SLMIDITempoItf_;
- typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf;
- struct SLMIDITempoItf_ {
- SLresult (*SetTicksPerQuarterNote) (
- SLMIDITempoItf self,
- SLuint32 tpqn
- );
- SLresult (*GetTicksPerQuarterNote) (
- SLMIDITempoItf self,
- SLuint32 *pTpqn
- );
- SLresult (*SetMicrosecondsPerQuarterNote) (
- SLMIDITempoItf self,
- SLmicrosecond uspqn
- );
- SLresult (*GetMicrosecondsPerQuarterNote) (
- SLMIDITempoItf self,
- SLmicrosecond *uspqn
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Midi Time interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_MIDITIME;
- struct SLMIDITimeItf_;
- typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf;
- struct SLMIDITimeItf_ {
- SLresult (*GetDuration) (
- SLMIDITimeItf self,
- SLuint32 *pDuration
- );
- SLresult (*SetPosition) (
- SLMIDITimeItf self,
- SLuint32 position
- );
- SLresult (*GetPosition) (
- SLMIDITimeItf self,
- SLuint32 *pPosition
- );
- SLresult (*SetLoopPoints) (
- SLMIDITimeItf self,
- SLuint32 startTick,
- SLuint32 numTicks
- );
- SLresult (*GetLoopPoints) (
- SLMIDITimeItf self,
- SLuint32 *pStartTick,
- SLuint32 *pNumTicks
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Audio Decoder Capabilities Interface */
- /* --------------------------------------------------------------------------*/
- /*Audio Codec related defines*/
- #define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001)
- #define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002)
- #define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001)
- #define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002)
- #define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003)
- #define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004)
- #define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005)
- #define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006)
- #define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007)
- #define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008)
- #define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001)
- #define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001)
- #define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002)
- #define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003)
- #define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001)
- #define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002)
- #define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003)
- #define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004)
- #define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001)
- #define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001)
- #define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002)
- #define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003)
- #define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004)
- #define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005)
- #define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006)
- #define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001)
- #define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001)
- #define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001)
- #define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001)
- #define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002)
- #define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003)
- #define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004)
- #define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005)
- #define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006)
- #define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007)
- #define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008)
- #define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009)
- #define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A)
- #define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001)
- #define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002)
- #define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003)
- #define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004)
- #define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005)
- #define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006)
- #define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007)
- #define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001)
- #define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002)
- #define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003)
- #define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004)
- #define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001)
- #define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002)
- #define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003)
- #define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004)
- #define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005)
- #define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006)
- #define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007)
- #define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008)
- #define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001)
- #define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001)
- #define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002)
- #define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003)
- #define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004)
- typedef struct SLAudioCodecDescriptor_ {
- SLuint32 maxChannels;
- SLuint32 minBitsPerSample;
- SLuint32 maxBitsPerSample;
- SLmilliHertz minSampleRate;
- SLmilliHertz maxSampleRate;
- SLboolean isFreqRangeContinuous;
- SLmilliHertz *pSampleRatesSupported;
- SLuint32 numSampleRatesSupported;
- SLuint32 minBitRate;
- SLuint32 maxBitRate;
- SLboolean isBitrateRangeContinuous;
- SLuint32 *pBitratesSupported;
- SLuint32 numBitratesSupported;
- SLuint32 profileSetting;
- SLuint32 modeSetting;
- } SLAudioCodecDescriptor;
- /*Structure used to retrieve the profile and level settings supported by an audio encoder */
- typedef struct SLAudioCodecProfileMode_ {
- SLuint32 profileSetting;
- SLuint32 modeSetting;
- } SLAudioCodecProfileMode;
- extern const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES;
- struct SLAudioDecoderCapabilitiesItf_;
- typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf;
- struct SLAudioDecoderCapabilitiesItf_ {
- SLresult (*GetAudioDecoders) (
- SLAudioDecoderCapabilitiesItf self,
- SLuint32 * pNumDecoders ,
- SLuint32 *pDecoderIds
- );
- SLresult (*GetAudioDecoderCapabilities) (
- SLAudioDecoderCapabilitiesItf self,
- SLuint32 decoderId,
- SLuint32 *pIndex,
- SLAudioCodecDescriptor *pDescriptor
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Audio Encoder Capabilities Interface */
- /* --------------------------------------------------------------------------*/
- /* Structure used when setting audio encoding parameters */
- typedef struct SLAudioEncoderSettings_ {
- SLuint32 encoderId;
- SLuint32 channelsIn;
- SLuint32 channelsOut;
- SLmilliHertz sampleRate;
- SLuint32 bitRate;
- SLuint32 bitsPerSample;
- SLuint32 rateControl;
- SLuint32 profileSetting;
- SLuint32 levelSetting;
- SLuint32 channelMode;
- SLuint32 streamFormat;
- SLuint32 encodeOptions;
- SLuint32 blockAlignment;
- } SLAudioEncoderSettings;
- extern const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES;
- struct SLAudioEncoderCapabilitiesItf_;
- typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf;
- struct SLAudioEncoderCapabilitiesItf_ {
- SLresult (*GetAudioEncoders) (
- SLAudioEncoderCapabilitiesItf self,
- SLuint32 *pNumEncoders ,
- SLuint32 *pEncoderIds
- );
- SLresult (*GetAudioEncoderCapabilities) (
- SLAudioEncoderCapabilitiesItf self,
- SLuint32 encoderId,
- SLuint32 *pIndex,
- SLAudioCodecDescriptor * pDescriptor
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Audio Encoder Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_AUDIOENCODER;
- struct SLAudioEncoderItf_;
- typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf;
- struct SLAudioEncoderItf_ {
- SLresult (*SetEncoderSettings) (
- SLAudioEncoderItf self,
- SLAudioEncoderSettings *pSettings
- );
- SLresult (*GetEncoderSettings) (
- SLAudioEncoderItf self,
- SLAudioEncoderSettings *pSettings
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Bass Boost Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_BASSBOOST;
- struct SLBassBoostItf_;
- typedef const struct SLBassBoostItf_ * const * SLBassBoostItf;
- struct SLBassBoostItf_ {
- SLresult (*SetEnabled)(
- SLBassBoostItf self,
- SLboolean enabled
- );
- SLresult (*IsEnabled)(
- SLBassBoostItf self,
- SLboolean *pEnabled
- );
- SLresult (*SetStrength)(
- SLBassBoostItf self,
- SLpermille strength
- );
- SLresult (*GetRoundedStrength)(
- SLBassBoostItf self,
- SLpermille *pStrength
- );
- SLresult (*IsStrengthSupported)(
- SLBassBoostItf self,
- SLboolean *pSupported
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Pitch Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_PITCH;
- struct SLPitchItf_;
- typedef const struct SLPitchItf_ * const * SLPitchItf;
- struct SLPitchItf_ {
- SLresult (*SetPitch) (
- SLPitchItf self,
- SLpermille pitch
- );
- SLresult (*GetPitch) (
- SLPitchItf self,
- SLpermille *pPitch
- );
- SLresult (*GetPitchCapabilities) (
- SLPitchItf self,
- SLpermille *pMinPitch,
- SLpermille *pMaxPitch
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Rate Pitch Interface */
- /* RatePitchItf is an interface for controlling the rate a sound is played */
- /* back. A change in rate will cause a change in pitch. */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_RATEPITCH;
- struct SLRatePitchItf_;
- typedef const struct SLRatePitchItf_ * const * SLRatePitchItf;
- struct SLRatePitchItf_ {
- SLresult (*SetRate) (
- SLRatePitchItf self,
- SLpermille rate
- );
- SLresult (*GetRate) (
- SLRatePitchItf self,
- SLpermille *pRate
- );
- SLresult (*GetRatePitchCapabilities) (
- SLRatePitchItf self,
- SLpermille *pMinRate,
- SLpermille *pMaxRate
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Virtualizer Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_VIRTUALIZER;
- struct SLVirtualizerItf_;
- typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf;
- struct SLVirtualizerItf_ {
- SLresult (*SetEnabled)(
- SLVirtualizerItf self,
- SLboolean enabled
- );
- SLresult (*IsEnabled)(
- SLVirtualizerItf self,
- SLboolean *pEnabled
- );
- SLresult (*SetStrength)(
- SLVirtualizerItf self,
- SLpermille strength
- );
- SLresult (*GetRoundedStrength)(
- SLVirtualizerItf self,
- SLpermille *pStrength
- );
- SLresult (*IsStrengthSupported)(
- SLVirtualizerItf self,
- SLboolean *pSupported
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Visualization Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_VISUALIZATION;
- struct SLVisualizationItf_;
- typedef const struct SLVisualizationItf_ * const * SLVisualizationItf;
- typedef void (SLAPIENTRY *slVisualizationCallback) (
- void *pContext,
- const SLuint8 waveform[],
- const SLuint8 fft[],
- SLmilliHertz samplerate
- );
- struct SLVisualizationItf_{
- SLresult (*RegisterVisualizationCallback)(
- SLVisualizationItf self,
- slVisualizationCallback callback,
- void *pContext,
- SLmilliHertz rate
- );
- SLresult (*GetMaxRate)(
- SLVisualizationItf self,
- SLmilliHertz* pRate
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Engine Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_ENGINE;
- struct SLEngineItf_;
- typedef const struct SLEngineItf_ * const * SLEngineItf;
- struct SLEngineItf_ {
- SLresult (*CreateLEDDevice) (
- SLEngineItf self,
- SLObjectItf * pDevice,
- SLuint32 deviceID,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateVibraDevice) (
- SLEngineItf self,
- SLObjectItf * pDevice,
- SLuint32 deviceID,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateAudioPlayer) (
- SLEngineItf self,
- SLObjectItf * pPlayer,
- SLDataSource *pAudioSrc,
- SLDataSink *pAudioSnk,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateAudioRecorder) (
- SLEngineItf self,
- SLObjectItf * pRecorder,
- SLDataSource *pAudioSrc,
- SLDataSink *pAudioSnk,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateMidiPlayer) (
- SLEngineItf self,
- SLObjectItf * pPlayer,
- SLDataSource *pMIDISrc,
- SLDataSource *pBankSrc,
- SLDataSink *pAudioOutput,
- SLDataSink *pVibra,
- SLDataSink *pLEDArray,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateListener) (
- SLEngineItf self,
- SLObjectItf * pListener,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*Create3DGroup) (
- SLEngineItf self,
- SLObjectItf * pGroup,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateOutputMix) (
- SLEngineItf self,
- SLObjectItf * pMix,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateMetadataExtractor) (
- SLEngineItf self,
- SLObjectItf * pMetadataExtractor,
- SLDataSource * pDataSource,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*CreateExtensionObject) (
- SLEngineItf self,
- SLObjectItf * pObject,
- void * pParameters,
- SLuint32 objectID,
- SLuint32 numInterfaces,
- const SLInterfaceID * pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult (*QueryNumSupportedInterfaces) (
- SLEngineItf self,
- SLuint32 objectID,
- SLuint32 * pNumSupportedInterfaces
- );
- SLresult (*QuerySupportedInterfaces) (
- SLEngineItf self,
- SLuint32 objectID,
- SLuint32 index,
- SLInterfaceID * pInterfaceId
- );
- SLresult (*QueryNumSupportedExtensions) (
- SLEngineItf self,
- SLuint32 * pNumExtensions
- );
- SLresult (*QuerySupportedExtension) (
- SLEngineItf self,
- SLuint32 index,
- SLchar * pExtensionName,
- SLint16 * pNameLength
- );
- SLresult (*IsExtensionSupported) (
- SLEngineItf self,
- const SLchar * pExtensionName,
- SLboolean * pSupported
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Engine Capabilities Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_ENGINECAPABILITIES;
- struct SLEngineCapabilitiesItf_;
- typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf;
- struct SLEngineCapabilitiesItf_ {
- SLresult (*QuerySupportedProfiles) (
- SLEngineCapabilitiesItf self,
- SLuint16 *pProfilesSupported
- );
- SLresult (*QueryAvailableVoices) (
- SLEngineCapabilitiesItf self,
- SLuint16 voiceType,
- SLint16 *pNumMaxVoices,
- SLboolean *pIsAbsoluteMax,
- SLint16 *pNumFreeVoices
- );
- SLresult (*QueryNumberOfMIDISynthesizers) (
- SLEngineCapabilitiesItf self,
- SLint16 *pNumMIDIsynthesizers
- );
- SLresult (*QueryAPIVersion) (
- SLEngineCapabilitiesItf self,
- SLint16 *pMajor,
- SLint16 *pMinor,
- SLint16 *pStep
- );
- SLresult (*QueryLEDCapabilities) (
- SLEngineCapabilitiesItf self,
- SLuint32 *pIndex,
- SLuint32 *pLEDDeviceID,
- SLLEDDescriptor *pDescriptor
- );
- SLresult (*QueryVibraCapabilities) (
- SLEngineCapabilitiesItf self,
- SLuint32 *pIndex,
- SLuint32 *pVibraDeviceID,
- SLVibraDescriptor *pDescriptor
- );
- SLresult (*IsThreadSafe) (
- SLEngineCapabilitiesItf self,
- SLboolean *pIsThreadSafe
- );
- };
- /*---------------------------------------------------------------------------*/
- /* Thread Sync Interface */
- /* --------------------------------------------------------------------------*/
- extern const SLInterfaceID SL_IID_THREADSYNC;
- struct SLThreadSyncItf_;
- typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf;
- struct SLThreadSyncItf_ {
- SLresult (*EnterCriticalSection) (
- SLThreadSyncItf self
- );
- SLresult (*ExitCriticalSection) (
- SLThreadSyncItf self
- );
- };
- /*****************************************************************************/
- /* SL engine constructor */
- /*****************************************************************************/
- #define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001)
- #define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002)
- typedef struct SLEngineOption_ {
- SLuint32 feature;
- SLuint32 data;
- } SLEngineOption;
- SLresult SLAPIENTRY slCreateEngine(
- SLObjectItf *pEngine,
- SLuint32 numOptions,
- const SLEngineOption *pEngineOptions,
- SLuint32 numInterfaces,
- const SLInterfaceID *pInterfaceIds,
- const SLboolean * pInterfaceRequired
- );
- SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces(
- SLuint32 * pNumSupportedInterfaces
- );
- SLresult SLAPIENTRY slQuerySupportedEngineInterfaces(
- SLuint32 index,
- SLInterfaceID * pInterfaceId
- );
- #ifdef __cplusplus
- } /* extern "C" */
- #endif
- #endif /* OPENSL_ES_H_ */
|