1523f5352Sopenharmony_ci/* 2523f5352Sopenharmony_ci * Copyright (c) 2008 The Khronos Group Inc. 3523f5352Sopenharmony_ci * 4523f5352Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a copy of 5523f5352Sopenharmony_ci * this software and /or associated documentation files (the "Materials "), to 6523f5352Sopenharmony_ci * deal in the Materials without restriction, including without limitation the 7523f5352Sopenharmony_ci * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8523f5352Sopenharmony_ci * sell copies of the Materials, and to permit persons to whom the Materials are 9523f5352Sopenharmony_ci * furnished to do so, subject to 10523f5352Sopenharmony_ci * the following conditions: 11523f5352Sopenharmony_ci * 12523f5352Sopenharmony_ci * The above copyright notice and this permission notice shall be included 13523f5352Sopenharmony_ci * in all copies or substantial portions of the Materials. 14523f5352Sopenharmony_ci * 15523f5352Sopenharmony_ci * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16523f5352Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17523f5352Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18523f5352Sopenharmony_ci * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19523f5352Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20523f5352Sopenharmony_ci * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE 21523f5352Sopenharmony_ci * MATERIALS. 22523f5352Sopenharmony_ci * 23523f5352Sopenharmony_ci * OpenSLES.h - OpenSL ES version 1.0 24523f5352Sopenharmony_ci * 25523f5352Sopenharmony_ci */ 26523f5352Sopenharmony_ci 27523f5352Sopenharmony_ci/****************************************************************************/ 28523f5352Sopenharmony_ci/* NOTE: This file is a standard OpenSL ES header file and should not be */ 29523f5352Sopenharmony_ci/* modified in any way. */ 30523f5352Sopenharmony_ci/****************************************************************************/ 31523f5352Sopenharmony_ci 32523f5352Sopenharmony_ci#ifndef OPENSL_ES_H_ 33523f5352Sopenharmony_ci#define OPENSL_ES_H_ 34523f5352Sopenharmony_ci 35523f5352Sopenharmony_ci#ifdef __cplusplus 36523f5352Sopenharmony_ciextern "C" { 37523f5352Sopenharmony_ci#endif 38523f5352Sopenharmony_ci 39523f5352Sopenharmony_ci#include "OpenSLES_Platform.h" 40523f5352Sopenharmony_ci 41523f5352Sopenharmony_ci 42523f5352Sopenharmony_ci/*****************************************************************************/ 43523f5352Sopenharmony_ci/* Common types, structures, and defines */ 44523f5352Sopenharmony_ci/*****************************************************************************/ 45523f5352Sopenharmony_ci 46523f5352Sopenharmony_ci#ifndef _KHRONOS_KEYS_ 47523f5352Sopenharmony_ci#define _KHRONOS_KEYS_ 48523f5352Sopenharmony_ci 49523f5352Sopenharmony_ci#define KHRONOS_TITLE "KhronosTitle" 50523f5352Sopenharmony_ci#define KHRONOS_ALBUM "KhronosAlbum" 51523f5352Sopenharmony_ci#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber" 52523f5352Sopenharmony_ci#define KHRONOS_ARTIST "KhronosArtist" 53523f5352Sopenharmony_ci#define KHRONOS_GENRE "KhronosGenre" 54523f5352Sopenharmony_ci#define KHRONOS_YEAR "KhronosYear" 55523f5352Sopenharmony_ci#define KHRONOS_COMMENT "KhronosComment" 56523f5352Sopenharmony_ci#define KHRONOS_ARTIST_URL "KhronosArtistURL" 57523f5352Sopenharmony_ci#define KHRONOS_CONTENT_URL "KhronosContentURL" 58523f5352Sopenharmony_ci#define KHRONOS_RATING "KhronosRating" 59523f5352Sopenharmony_ci#define KHRONOS_ALBUM_ART "KhronosAlbumArt" 60523f5352Sopenharmony_ci#define KHRONOS_COPYRIGHT "KhronosCopyright" 61523f5352Sopenharmony_ci 62523f5352Sopenharmony_ci#endif 63523f5352Sopenharmony_ci 64523f5352Sopenharmony_ci 65523f5352Sopenharmony_ci/* remap common types to SL types for clarity */ 66523f5352Sopenharmony_citypedef sl_int8_t SLint8; /* 8 bit signed integer */ 67523f5352Sopenharmony_citypedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */ 68523f5352Sopenharmony_citypedef sl_int16_t SLint16; /* 16 bit signed integer */ 69523f5352Sopenharmony_citypedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */ 70523f5352Sopenharmony_citypedef sl_int32_t SLint32; /* 32 bit signed integer */ 71523f5352Sopenharmony_citypedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */ 72523f5352Sopenharmony_ci 73523f5352Sopenharmony_citypedef SLuint32 SLboolean; 74523f5352Sopenharmony_ci#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000) 75523f5352Sopenharmony_ci#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001) 76523f5352Sopenharmony_ci 77523f5352Sopenharmony_citypedef SLuint8 SLchar; /* UTF-8 is to be used */ 78523f5352Sopenharmony_citypedef SLint16 SLmillibel; 79523f5352Sopenharmony_citypedef SLuint32 SLmillisecond; 80523f5352Sopenharmony_citypedef SLuint32 SLmilliHertz; 81523f5352Sopenharmony_citypedef SLint32 SLmillimeter; 82523f5352Sopenharmony_citypedef SLint32 SLmillidegree; 83523f5352Sopenharmony_citypedef SLint16 SLpermille; 84523f5352Sopenharmony_citypedef SLuint32 SLmicrosecond; 85523f5352Sopenharmony_citypedef SLuint32 SLresult; 86523f5352Sopenharmony_ci 87523f5352Sopenharmony_ci#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF) 88523f5352Sopenharmony_ci#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1)) 89523f5352Sopenharmony_ci 90523f5352Sopenharmony_ci#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF) 91523f5352Sopenharmony_ci#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF) 92523f5352Sopenharmony_ci 93523f5352Sopenharmony_ci/** Interface ID defined as a UUID */ 94523f5352Sopenharmony_citypedef const struct SLInterfaceID_ { 95523f5352Sopenharmony_ci SLuint32 time_low; 96523f5352Sopenharmony_ci SLuint16 time_mid; 97523f5352Sopenharmony_ci SLuint16 time_hi_and_version; 98523f5352Sopenharmony_ci SLuint16 clock_seq; 99523f5352Sopenharmony_ci SLuint8 node[6]; 100523f5352Sopenharmony_ci} * SLInterfaceID; 101523f5352Sopenharmony_ci 102523f5352Sopenharmony_ci/* Forward declaration for the object interface */ 103523f5352Sopenharmony_cistruct SLObjectItf_; 104523f5352Sopenharmony_ci 105523f5352Sopenharmony_citypedef const struct SLObjectItf_ * const * SLObjectItf; 106523f5352Sopenharmony_ci 107523f5352Sopenharmony_ci/* Objects ID's */ 108523f5352Sopenharmony_ci 109523f5352Sopenharmony_ci#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001) 110523f5352Sopenharmony_ci#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002) 111523f5352Sopenharmony_ci#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003) 112523f5352Sopenharmony_ci#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004) 113523f5352Sopenharmony_ci#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005) 114523f5352Sopenharmony_ci#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006) 115523f5352Sopenharmony_ci#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007) 116523f5352Sopenharmony_ci#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008) 117523f5352Sopenharmony_ci#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009) 118523f5352Sopenharmony_ci#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A) 119523f5352Sopenharmony_ci 120523f5352Sopenharmony_ci 121523f5352Sopenharmony_ci/* SL Profiles */ 122523f5352Sopenharmony_ci 123523f5352Sopenharmony_ci#define SL_PROFILES_PHONE ((SLuint16) 0x0001) 124523f5352Sopenharmony_ci#define SL_PROFILES_MUSIC ((SLuint16) 0x0002) 125523f5352Sopenharmony_ci#define SL_PROFILES_GAME ((SLuint16) 0x0004) 126523f5352Sopenharmony_ci 127523f5352Sopenharmony_ci/* Types of voices supported by the system */ 128523f5352Sopenharmony_ci 129523f5352Sopenharmony_ci#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001) 130523f5352Sopenharmony_ci#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002) 131523f5352Sopenharmony_ci#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004) 132523f5352Sopenharmony_ci#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008) 133523f5352Sopenharmony_ci 134523f5352Sopenharmony_ci/* Convenient macros representing various different priority levels, for use with the SetPriority method */ 135523f5352Sopenharmony_ci 136523f5352Sopenharmony_ci#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1)) 137523f5352Sopenharmony_ci#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000) 138523f5352Sopenharmony_ci#define SL_PRIORITY_LOW ((SLint32) -0x40000000) 139523f5352Sopenharmony_ci#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000) 140523f5352Sopenharmony_ci#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000) 141523f5352Sopenharmony_ci#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000) 142523f5352Sopenharmony_ci#define SL_PRIORITY_HIGH ((SLint32) 0x40000000) 143523f5352Sopenharmony_ci#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000) 144523f5352Sopenharmony_ci#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF) 145523f5352Sopenharmony_ci 146523f5352Sopenharmony_ci 147523f5352Sopenharmony_ci/** These macros list the various sample formats that are possible on audio input and output devices. */ 148523f5352Sopenharmony_ci 149523f5352Sopenharmony_ci#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008) 150523f5352Sopenharmony_ci#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010) 151523f5352Sopenharmony_ci#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014) 152523f5352Sopenharmony_ci#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018) 153523f5352Sopenharmony_ci#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C) 154523f5352Sopenharmony_ci#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020) 155523f5352Sopenharmony_ci 156523f5352Sopenharmony_ci 157523f5352Sopenharmony_ci/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */ 158523f5352Sopenharmony_ci 159523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000) 160523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000) 161523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000) 162523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000) 163523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000) 164523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000) 165523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000) 166523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000) 167523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000) 168523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000) 169523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000) 170523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000) 171523f5352Sopenharmony_ci#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000) 172523f5352Sopenharmony_ci 173523f5352Sopenharmony_ci#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001) 174523f5352Sopenharmony_ci#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002) 175523f5352Sopenharmony_ci#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004) 176523f5352Sopenharmony_ci#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008) 177523f5352Sopenharmony_ci#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010) 178523f5352Sopenharmony_ci#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020) 179523f5352Sopenharmony_ci#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040) 180523f5352Sopenharmony_ci#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080) 181523f5352Sopenharmony_ci#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100) 182523f5352Sopenharmony_ci#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200) 183523f5352Sopenharmony_ci#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400) 184523f5352Sopenharmony_ci#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800) 185523f5352Sopenharmony_ci#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000) 186523f5352Sopenharmony_ci#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000) 187523f5352Sopenharmony_ci#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000) 188523f5352Sopenharmony_ci#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000) 189523f5352Sopenharmony_ci#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000) 190523f5352Sopenharmony_ci#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000) 191523f5352Sopenharmony_ci 192523f5352Sopenharmony_ci 193523f5352Sopenharmony_ci/*****************************************************************************/ 194523f5352Sopenharmony_ci/* Errors */ 195523f5352Sopenharmony_ci/* */ 196523f5352Sopenharmony_ci/*****************************************************************************/ 197523f5352Sopenharmony_ci 198523f5352Sopenharmony_ci#define SL_RESULT_SUCCESS ((SLuint32) 0x00000000) 199523f5352Sopenharmony_ci#define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001) 200523f5352Sopenharmony_ci#define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002) 201523f5352Sopenharmony_ci#define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003) 202523f5352Sopenharmony_ci#define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004) 203523f5352Sopenharmony_ci#define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005) 204523f5352Sopenharmony_ci#define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006) 205523f5352Sopenharmony_ci#define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007) 206523f5352Sopenharmony_ci#define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008) 207523f5352Sopenharmony_ci#define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009) 208523f5352Sopenharmony_ci#define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A) 209523f5352Sopenharmony_ci#define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B) 210523f5352Sopenharmony_ci#define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C) 211523f5352Sopenharmony_ci#define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D) 212523f5352Sopenharmony_ci#define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E) 213523f5352Sopenharmony_ci#define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F) 214523f5352Sopenharmony_ci#define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010) 215523f5352Sopenharmony_ci 216523f5352Sopenharmony_ci 217523f5352Sopenharmony_ci/* Object state definitions */ 218523f5352Sopenharmony_ci 219523f5352Sopenharmony_ci#define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001) 220523f5352Sopenharmony_ci#define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002) 221523f5352Sopenharmony_ci#define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003) 222523f5352Sopenharmony_ci 223523f5352Sopenharmony_ci/* Object event definitions */ 224523f5352Sopenharmony_ci 225523f5352Sopenharmony_ci#define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001) 226523f5352Sopenharmony_ci#define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002) 227523f5352Sopenharmony_ci#define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003) 228523f5352Sopenharmony_ci#define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004) 229523f5352Sopenharmony_ci#define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005) 230523f5352Sopenharmony_ci#define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006) 231523f5352Sopenharmony_ci#define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007) 232523f5352Sopenharmony_ci 233523f5352Sopenharmony_ci 234523f5352Sopenharmony_ci/*****************************************************************************/ 235523f5352Sopenharmony_ci/* Interface definitions */ 236523f5352Sopenharmony_ci/*****************************************************************************/ 237523f5352Sopenharmony_ci 238523f5352Sopenharmony_ci/** NULL Interface */ 239523f5352Sopenharmony_ci 240523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_NULL; 241523f5352Sopenharmony_ci 242523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 243523f5352Sopenharmony_ci/* Data Source and Data Sink Structures */ 244523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 245523f5352Sopenharmony_ci 246523f5352Sopenharmony_ci/** Data locator macros */ 247523f5352Sopenharmony_ci#define SL_DATALOCATOR_URI ((SLuint32) 0x00000001) 248523f5352Sopenharmony_ci#define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002) 249523f5352Sopenharmony_ci#define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003) 250523f5352Sopenharmony_ci#define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004) 251523f5352Sopenharmony_ci#define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005) 252523f5352Sopenharmony_ci#define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006) 253523f5352Sopenharmony_ci#define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007) 254523f5352Sopenharmony_ci#define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008) 255523f5352Sopenharmony_ci 256523f5352Sopenharmony_ci 257523f5352Sopenharmony_ci 258523f5352Sopenharmony_ci/** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/ 259523f5352Sopenharmony_citypedef struct SLDataLocator_URI_ { 260523f5352Sopenharmony_ci SLuint32 locatorType; 261523f5352Sopenharmony_ci SLchar * URI; 262523f5352Sopenharmony_ci} SLDataLocator_URI; 263523f5352Sopenharmony_ci 264523f5352Sopenharmony_ci/** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/ 265523f5352Sopenharmony_citypedef struct SLDataLocator_Address_ { 266523f5352Sopenharmony_ci SLuint32 locatorType; 267523f5352Sopenharmony_ci void *pAddress; 268523f5352Sopenharmony_ci SLuint32 length; 269523f5352Sopenharmony_ci} SLDataLocator_Address; 270523f5352Sopenharmony_ci 271523f5352Sopenharmony_ci/** IODevice-types */ 272523f5352Sopenharmony_ci#define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001) 273523f5352Sopenharmony_ci#define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002) 274523f5352Sopenharmony_ci#define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003) 275523f5352Sopenharmony_ci#define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004) 276523f5352Sopenharmony_ci#define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005) 277523f5352Sopenharmony_ci 278523f5352Sopenharmony_ci/** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/ 279523f5352Sopenharmony_citypedef struct SLDataLocator_IODevice_ { 280523f5352Sopenharmony_ci SLuint32 locatorType; 281523f5352Sopenharmony_ci SLuint32 deviceType; 282523f5352Sopenharmony_ci SLuint32 deviceID; 283523f5352Sopenharmony_ci SLObjectItf device; 284523f5352Sopenharmony_ci} SLDataLocator_IODevice; 285523f5352Sopenharmony_ci 286523f5352Sopenharmony_ci/** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/ 287523f5352Sopenharmony_citypedef struct SLDataLocator_OutputMix { 288523f5352Sopenharmony_ci SLuint32 locatorType; 289523f5352Sopenharmony_ci SLObjectItf outputMix; 290523f5352Sopenharmony_ci} SLDataLocator_OutputMix; 291523f5352Sopenharmony_ci 292523f5352Sopenharmony_ci 293523f5352Sopenharmony_ci/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/ 294523f5352Sopenharmony_citypedef struct SLDataLocator_BufferQueue { 295523f5352Sopenharmony_ci SLuint32 locatorType; 296523f5352Sopenharmony_ci SLuint32 numBuffers; 297523f5352Sopenharmony_ci} SLDataLocator_BufferQueue; 298523f5352Sopenharmony_ci 299523f5352Sopenharmony_ci/** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/ 300523f5352Sopenharmony_citypedef struct SLDataLocator_MIDIBufferQueue { 301523f5352Sopenharmony_ci SLuint32 locatorType; 302523f5352Sopenharmony_ci SLuint32 tpqn; 303523f5352Sopenharmony_ci SLuint32 numBuffers; 304523f5352Sopenharmony_ci} SLDataLocator_MIDIBufferQueue; 305523f5352Sopenharmony_ci 306523f5352Sopenharmony_ci/** Data format defines */ 307523f5352Sopenharmony_ci#define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001) 308523f5352Sopenharmony_ci#define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002) 309523f5352Sopenharmony_ci#define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003) 310523f5352Sopenharmony_ci 311523f5352Sopenharmony_ci 312523f5352Sopenharmony_ci/** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/ 313523f5352Sopenharmony_citypedef struct SLDataFormat_MIME_ { 314523f5352Sopenharmony_ci SLuint32 formatType; 315523f5352Sopenharmony_ci SLchar * mimeType; 316523f5352Sopenharmony_ci SLuint32 containerType; 317523f5352Sopenharmony_ci} SLDataFormat_MIME; 318523f5352Sopenharmony_ci 319523f5352Sopenharmony_ci/* Byte order of a block of 16- or 32-bit data */ 320523f5352Sopenharmony_ci#define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001) 321523f5352Sopenharmony_ci#define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002) 322523f5352Sopenharmony_ci 323523f5352Sopenharmony_ci/* Container type */ 324523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001) 325523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002) 326523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003) 327523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004) 328523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005) 329523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006) 330523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007) 331523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008) 332523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009) 333523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A) 334523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B) 335523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C) 336523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D) 337523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E) 338523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F) 339523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010) 340523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011) 341523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012) 342523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013) 343523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014) 344523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015) 345523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016) 346523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017) 347523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018) 348523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019) 349523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A) 350523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B) 351523f5352Sopenharmony_ci#define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C) 352523f5352Sopenharmony_ci 353523f5352Sopenharmony_ci 354523f5352Sopenharmony_ci/** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/ 355523f5352Sopenharmony_citypedef struct SLDataFormat_PCM_ { 356523f5352Sopenharmony_ci SLuint32 formatType; 357523f5352Sopenharmony_ci SLuint32 numChannels; 358523f5352Sopenharmony_ci SLuint32 samplesPerSec; 359523f5352Sopenharmony_ci SLuint32 bitsPerSample; 360523f5352Sopenharmony_ci SLuint32 containerSize; 361523f5352Sopenharmony_ci SLuint32 channelMask; 362523f5352Sopenharmony_ci SLuint32 endianness; 363523f5352Sopenharmony_ci} SLDataFormat_PCM; 364523f5352Sopenharmony_ci 365523f5352Sopenharmony_citypedef struct SLDataSource_ { 366523f5352Sopenharmony_ci void *pLocator; 367523f5352Sopenharmony_ci void *pFormat; 368523f5352Sopenharmony_ci} SLDataSource; 369523f5352Sopenharmony_ci 370523f5352Sopenharmony_ci 371523f5352Sopenharmony_citypedef struct SLDataSink_ { 372523f5352Sopenharmony_ci void *pLocator; 373523f5352Sopenharmony_ci void *pFormat; 374523f5352Sopenharmony_ci} SLDataSink; 375523f5352Sopenharmony_ci 376523f5352Sopenharmony_ci 377523f5352Sopenharmony_ci 378523f5352Sopenharmony_ci 379523f5352Sopenharmony_ci 380523f5352Sopenharmony_ci 381523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 382523f5352Sopenharmony_ci/* Standard Object Interface */ 383523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 384523f5352Sopenharmony_ci 385523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_OBJECT; 386523f5352Sopenharmony_ci 387523f5352Sopenharmony_ci/** Object callback */ 388523f5352Sopenharmony_ci 389523f5352Sopenharmony_ci 390523f5352Sopenharmony_citypedef void (SLAPIENTRY *slObjectCallback) ( 391523f5352Sopenharmony_ci SLObjectItf caller, 392523f5352Sopenharmony_ci const void * pContext, 393523f5352Sopenharmony_ci SLuint32 event, 394523f5352Sopenharmony_ci SLresult result, 395523f5352Sopenharmony_ci SLuint32 param, 396523f5352Sopenharmony_ci void *pInterface 397523f5352Sopenharmony_ci); 398523f5352Sopenharmony_ci 399523f5352Sopenharmony_ci 400523f5352Sopenharmony_cistruct SLObjectItf_ { 401523f5352Sopenharmony_ci SLresult (*Realize) ( 402523f5352Sopenharmony_ci SLObjectItf self, 403523f5352Sopenharmony_ci SLboolean async 404523f5352Sopenharmony_ci ); 405523f5352Sopenharmony_ci SLresult (*Resume) ( 406523f5352Sopenharmony_ci SLObjectItf self, 407523f5352Sopenharmony_ci SLboolean async 408523f5352Sopenharmony_ci ); 409523f5352Sopenharmony_ci SLresult (*GetState) ( 410523f5352Sopenharmony_ci SLObjectItf self, 411523f5352Sopenharmony_ci SLuint32 * pState 412523f5352Sopenharmony_ci ); 413523f5352Sopenharmony_ci SLresult (*GetInterface) ( 414523f5352Sopenharmony_ci SLObjectItf self, 415523f5352Sopenharmony_ci const SLInterfaceID iid, 416523f5352Sopenharmony_ci void * pInterface 417523f5352Sopenharmony_ci ); 418523f5352Sopenharmony_ci SLresult (*RegisterCallback) ( 419523f5352Sopenharmony_ci SLObjectItf self, 420523f5352Sopenharmony_ci slObjectCallback callback, 421523f5352Sopenharmony_ci void * pContext 422523f5352Sopenharmony_ci ); 423523f5352Sopenharmony_ci void (*AbortAsyncOperation) ( 424523f5352Sopenharmony_ci SLObjectItf self 425523f5352Sopenharmony_ci ); 426523f5352Sopenharmony_ci void (*Destroy) ( 427523f5352Sopenharmony_ci SLObjectItf self 428523f5352Sopenharmony_ci ); 429523f5352Sopenharmony_ci SLresult (*SetPriority) ( 430523f5352Sopenharmony_ci SLObjectItf self, 431523f5352Sopenharmony_ci SLint32 priority, 432523f5352Sopenharmony_ci SLboolean preemptable 433523f5352Sopenharmony_ci ); 434523f5352Sopenharmony_ci SLresult (*GetPriority) ( 435523f5352Sopenharmony_ci SLObjectItf self, 436523f5352Sopenharmony_ci SLint32 *pPriority, 437523f5352Sopenharmony_ci SLboolean *pPreemptable 438523f5352Sopenharmony_ci ); 439523f5352Sopenharmony_ci SLresult (*SetLossOfControlInterfaces) ( 440523f5352Sopenharmony_ci SLObjectItf self, 441523f5352Sopenharmony_ci SLint16 numInterfaces, 442523f5352Sopenharmony_ci SLInterfaceID * pInterfaceIDs, 443523f5352Sopenharmony_ci SLboolean enabled 444523f5352Sopenharmony_ci ); 445523f5352Sopenharmony_ci}; 446523f5352Sopenharmony_ci 447523f5352Sopenharmony_ci 448523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 449523f5352Sopenharmony_ci/* Audio IO Device capabilities interface */ 450523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 451523f5352Sopenharmony_ci 452523f5352Sopenharmony_ci#define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF) 453523f5352Sopenharmony_ci#define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE) 454523f5352Sopenharmony_ci#define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD) 455523f5352Sopenharmony_ci#define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC) 456523f5352Sopenharmony_ci#define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB) 457523f5352Sopenharmony_ci 458523f5352Sopenharmony_ci 459523f5352Sopenharmony_ci#define SL_DEVCONNECTION_INTEGRATED ((SLuint16) 0x0001) 460523f5352Sopenharmony_ci#define SL_DEVCONNECTION_ATTACHED_WIRED ((SLuint16) 0x0100) 461523f5352Sopenharmony_ci#define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLuint16) 0x0200) 462523f5352Sopenharmony_ci#define SL_DEVCONNECTION_NETWORK ((SLuint16) 0x0400) 463523f5352Sopenharmony_ci 464523f5352Sopenharmony_ci 465523f5352Sopenharmony_ci#define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001) 466523f5352Sopenharmony_ci#define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002) 467523f5352Sopenharmony_ci#define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003) 468523f5352Sopenharmony_ci#define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004) 469523f5352Sopenharmony_ci#define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005) 470523f5352Sopenharmony_ci 471523f5352Sopenharmony_ci 472523f5352Sopenharmony_ci#define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001) 473523f5352Sopenharmony_ci#define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002) 474523f5352Sopenharmony_ci#define SL_DEVSCOPE_USER ((SLuint16) 0x0003) 475523f5352Sopenharmony_ci 476523f5352Sopenharmony_ci 477523f5352Sopenharmony_citypedef struct SLAudioInputDescriptor_ { 478523f5352Sopenharmony_ci SLchar *deviceName; 479523f5352Sopenharmony_ci SLint16 deviceConnection; 480523f5352Sopenharmony_ci SLint16 deviceScope; 481523f5352Sopenharmony_ci SLint16 deviceLocation; 482523f5352Sopenharmony_ci SLboolean isForTelephony; 483523f5352Sopenharmony_ci SLmilliHertz minSampleRate; 484523f5352Sopenharmony_ci SLmilliHertz maxSampleRate; 485523f5352Sopenharmony_ci SLboolean isFreqRangeContinuous; 486523f5352Sopenharmony_ci SLmilliHertz *samplingRatesSupported; 487523f5352Sopenharmony_ci SLint16 numOfSamplingRatesSupported; 488523f5352Sopenharmony_ci SLint16 maxChannels; 489523f5352Sopenharmony_ci} SLAudioInputDescriptor; 490523f5352Sopenharmony_ci 491523f5352Sopenharmony_ci 492523f5352Sopenharmony_citypedef struct SLAudioOutputDescriptor_ { 493523f5352Sopenharmony_ci SLchar *pDeviceName; 494523f5352Sopenharmony_ci SLint16 deviceConnection; 495523f5352Sopenharmony_ci SLint16 deviceScope; 496523f5352Sopenharmony_ci SLint16 deviceLocation; 497523f5352Sopenharmony_ci SLboolean isForTelephony; 498523f5352Sopenharmony_ci SLmilliHertz minSampleRate; 499523f5352Sopenharmony_ci SLmilliHertz maxSampleRate; 500523f5352Sopenharmony_ci SLboolean isFreqRangeContinuous; 501523f5352Sopenharmony_ci SLmilliHertz *samplingRatesSupported; 502523f5352Sopenharmony_ci SLint16 numOfSamplingRatesSupported; 503523f5352Sopenharmony_ci SLint16 maxChannels; 504523f5352Sopenharmony_ci} SLAudioOutputDescriptor; 505523f5352Sopenharmony_ci 506523f5352Sopenharmony_ci 507523f5352Sopenharmony_ci 508523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES; 509523f5352Sopenharmony_ci 510523f5352Sopenharmony_cistruct SLAudioIODeviceCapabilitiesItf_; 511523f5352Sopenharmony_citypedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf; 512523f5352Sopenharmony_ci 513523f5352Sopenharmony_ci 514523f5352Sopenharmony_citypedef void (SLAPIENTRY *slAvailableAudioInputsChangedCallback) ( 515523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf caller, 516523f5352Sopenharmony_ci void *pContext, 517523f5352Sopenharmony_ci SLuint32 deviceID, 518523f5352Sopenharmony_ci SLint32 numInputs, 519523f5352Sopenharmony_ci SLboolean isNew 520523f5352Sopenharmony_ci); 521523f5352Sopenharmony_ci 522523f5352Sopenharmony_ci 523523f5352Sopenharmony_citypedef void (SLAPIENTRY *slAvailableAudioOutputsChangedCallback) ( 524523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf caller, 525523f5352Sopenharmony_ci void *pContext, 526523f5352Sopenharmony_ci SLuint32 deviceID, 527523f5352Sopenharmony_ci SLint32 numOutputs, 528523f5352Sopenharmony_ci SLboolean isNew 529523f5352Sopenharmony_ci); 530523f5352Sopenharmony_ci 531523f5352Sopenharmony_citypedef void (SLAPIENTRY *slDefaultDeviceIDMapChangedCallback) ( 532523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf caller, 533523f5352Sopenharmony_ci void *pContext, 534523f5352Sopenharmony_ci SLboolean isOutput, 535523f5352Sopenharmony_ci SLint32 numDevices 536523f5352Sopenharmony_ci); 537523f5352Sopenharmony_ci 538523f5352Sopenharmony_ci 539523f5352Sopenharmony_cistruct SLAudioIODeviceCapabilitiesItf_ { 540523f5352Sopenharmony_ci SLresult (*GetAvailableAudioInputs)( 541523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 542523f5352Sopenharmony_ci SLint32 *pNumInputs, 543523f5352Sopenharmony_ci SLuint32 *pInputDeviceIDs 544523f5352Sopenharmony_ci ); 545523f5352Sopenharmony_ci SLresult (*QueryAudioInputCapabilities)( 546523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 547523f5352Sopenharmony_ci SLuint32 deviceId, 548523f5352Sopenharmony_ci SLAudioInputDescriptor *pDescriptor 549523f5352Sopenharmony_ci ); 550523f5352Sopenharmony_ci SLresult (*RegisterAvailableAudioInputsChangedCallback) ( 551523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 552523f5352Sopenharmony_ci slAvailableAudioInputsChangedCallback callback, 553523f5352Sopenharmony_ci void *pContext 554523f5352Sopenharmony_ci ); 555523f5352Sopenharmony_ci SLresult (*GetAvailableAudioOutputs)( 556523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 557523f5352Sopenharmony_ci SLint32 *pNumOutputs, 558523f5352Sopenharmony_ci SLuint32 *pOutputDeviceIDs 559523f5352Sopenharmony_ci ); 560523f5352Sopenharmony_ci SLresult (*QueryAudioOutputCapabilities)( 561523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 562523f5352Sopenharmony_ci SLuint32 deviceId, 563523f5352Sopenharmony_ci SLAudioOutputDescriptor *pDescriptor 564523f5352Sopenharmony_ci ); 565523f5352Sopenharmony_ci SLresult (*RegisterAvailableAudioOutputsChangedCallback) ( 566523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 567523f5352Sopenharmony_ci slAvailableAudioOutputsChangedCallback callback, 568523f5352Sopenharmony_ci void *pContext 569523f5352Sopenharmony_ci ); 570523f5352Sopenharmony_ci SLresult (*RegisterDefaultDeviceIDMapChangedCallback) ( 571523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 572523f5352Sopenharmony_ci slDefaultDeviceIDMapChangedCallback callback, 573523f5352Sopenharmony_ci void *pContext 574523f5352Sopenharmony_ci ); 575523f5352Sopenharmony_ci SLresult (*GetAssociatedAudioInputs) ( 576523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 577523f5352Sopenharmony_ci SLuint32 deviceId, 578523f5352Sopenharmony_ci SLint32 *pNumAudioInputs, 579523f5352Sopenharmony_ci SLuint32 *pAudioInputDeviceIDs 580523f5352Sopenharmony_ci ); 581523f5352Sopenharmony_ci SLresult (*GetAssociatedAudioOutputs) ( 582523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 583523f5352Sopenharmony_ci SLuint32 deviceId, 584523f5352Sopenharmony_ci SLint32 *pNumAudioOutputs, 585523f5352Sopenharmony_ci SLuint32 *pAudioOutputDeviceIDs 586523f5352Sopenharmony_ci ); 587523f5352Sopenharmony_ci SLresult (*GetDefaultAudioDevices) ( 588523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 589523f5352Sopenharmony_ci SLuint32 defaultDeviceID, 590523f5352Sopenharmony_ci SLint32 *pNumAudioDevices, 591523f5352Sopenharmony_ci SLuint32 *pAudioDeviceIDs 592523f5352Sopenharmony_ci ); 593523f5352Sopenharmony_ci SLresult (*QuerySampleFormatsSupported)( 594523f5352Sopenharmony_ci SLAudioIODeviceCapabilitiesItf self, 595523f5352Sopenharmony_ci SLuint32 deviceId, 596523f5352Sopenharmony_ci SLmilliHertz samplingRate, 597523f5352Sopenharmony_ci SLint32 *pSampleFormats, 598523f5352Sopenharmony_ci SLint32 *pNumOfSampleFormats 599523f5352Sopenharmony_ci ); 600523f5352Sopenharmony_ci}; 601523f5352Sopenharmony_ci 602523f5352Sopenharmony_ci 603523f5352Sopenharmony_ci 604523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 605523f5352Sopenharmony_ci/* Capabilities of the LED array IODevice */ 606523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 607523f5352Sopenharmony_ci 608523f5352Sopenharmony_citypedef struct SLLEDDescriptor_ { 609523f5352Sopenharmony_ci SLuint8 ledCount; 610523f5352Sopenharmony_ci SLuint8 primaryLED; 611523f5352Sopenharmony_ci SLuint32 colorMask; 612523f5352Sopenharmony_ci} SLLEDDescriptor; 613523f5352Sopenharmony_ci 614523f5352Sopenharmony_ci 615523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 616523f5352Sopenharmony_ci/* LED Array interface */ 617523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 618523f5352Sopenharmony_ci 619523f5352Sopenharmony_citypedef struct SLHSL_ { 620523f5352Sopenharmony_ci SLmillidegree hue; 621523f5352Sopenharmony_ci SLpermille saturation; 622523f5352Sopenharmony_ci SLpermille lightness; 623523f5352Sopenharmony_ci} SLHSL; 624523f5352Sopenharmony_ci 625523f5352Sopenharmony_ci 626523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_LED; 627523f5352Sopenharmony_ci 628523f5352Sopenharmony_cistruct SLLEDArrayItf_; 629523f5352Sopenharmony_citypedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf; 630523f5352Sopenharmony_ci 631523f5352Sopenharmony_cistruct SLLEDArrayItf_ { 632523f5352Sopenharmony_ci SLresult (*ActivateLEDArray) ( 633523f5352Sopenharmony_ci SLLEDArrayItf self, 634523f5352Sopenharmony_ci SLuint32 lightMask 635523f5352Sopenharmony_ci ); 636523f5352Sopenharmony_ci SLresult (*IsLEDArrayActivated) ( 637523f5352Sopenharmony_ci SLLEDArrayItf self, 638523f5352Sopenharmony_ci SLuint32 *lightMask 639523f5352Sopenharmony_ci ); 640523f5352Sopenharmony_ci SLresult (*SetColor) ( 641523f5352Sopenharmony_ci SLLEDArrayItf self, 642523f5352Sopenharmony_ci SLuint8 index, 643523f5352Sopenharmony_ci const SLHSL *color 644523f5352Sopenharmony_ci ); 645523f5352Sopenharmony_ci SLresult (*GetColor) ( 646523f5352Sopenharmony_ci SLLEDArrayItf self, 647523f5352Sopenharmony_ci SLuint8 index, 648523f5352Sopenharmony_ci SLHSL *color 649523f5352Sopenharmony_ci ); 650523f5352Sopenharmony_ci}; 651523f5352Sopenharmony_ci 652523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 653523f5352Sopenharmony_ci/* Capabilities of the Vibra IODevice */ 654523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 655523f5352Sopenharmony_ci 656523f5352Sopenharmony_citypedef struct SLVibraDescriptor_ { 657523f5352Sopenharmony_ci SLboolean supportsFrequency; 658523f5352Sopenharmony_ci SLboolean supportsIntensity; 659523f5352Sopenharmony_ci SLmilliHertz minFrequency; 660523f5352Sopenharmony_ci SLmilliHertz maxFrequency; 661523f5352Sopenharmony_ci} SLVibraDescriptor; 662523f5352Sopenharmony_ci 663523f5352Sopenharmony_ci 664523f5352Sopenharmony_ci 665523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 666523f5352Sopenharmony_ci/* Vibra interface */ 667523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 668523f5352Sopenharmony_ci 669523f5352Sopenharmony_ci 670523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_VIBRA; 671523f5352Sopenharmony_ci 672523f5352Sopenharmony_ci 673523f5352Sopenharmony_cistruct SLVibraItf_; 674523f5352Sopenharmony_citypedef const struct SLVibraItf_ * const * SLVibraItf; 675523f5352Sopenharmony_ci 676523f5352Sopenharmony_cistruct SLVibraItf_ { 677523f5352Sopenharmony_ci SLresult (*Vibrate) ( 678523f5352Sopenharmony_ci SLVibraItf self, 679523f5352Sopenharmony_ci SLboolean vibrate 680523f5352Sopenharmony_ci ); 681523f5352Sopenharmony_ci SLresult (*IsVibrating) ( 682523f5352Sopenharmony_ci SLVibraItf self, 683523f5352Sopenharmony_ci SLboolean *pVibrating 684523f5352Sopenharmony_ci ); 685523f5352Sopenharmony_ci SLresult (*SetFrequency) ( 686523f5352Sopenharmony_ci SLVibraItf self, 687523f5352Sopenharmony_ci SLmilliHertz frequency 688523f5352Sopenharmony_ci ); 689523f5352Sopenharmony_ci SLresult (*GetFrequency) ( 690523f5352Sopenharmony_ci SLVibraItf self, 691523f5352Sopenharmony_ci SLmilliHertz *pFrequency 692523f5352Sopenharmony_ci ); 693523f5352Sopenharmony_ci SLresult (*SetIntensity) ( 694523f5352Sopenharmony_ci SLVibraItf self, 695523f5352Sopenharmony_ci SLpermille intensity 696523f5352Sopenharmony_ci ); 697523f5352Sopenharmony_ci SLresult (*GetIntensity) ( 698523f5352Sopenharmony_ci SLVibraItf self, 699523f5352Sopenharmony_ci SLpermille *pIntensity 700523f5352Sopenharmony_ci ); 701523f5352Sopenharmony_ci}; 702523f5352Sopenharmony_ci 703523f5352Sopenharmony_ci 704523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 705523f5352Sopenharmony_ci/* Meta data extraction related types and interface */ 706523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 707523f5352Sopenharmony_ci 708523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000) 709523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001) 710523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002) 711523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003) 712523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004) 713523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005) 714523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006) 715523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007) 716523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008) 717523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009) 718523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A) 719523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B) 720523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B) 721523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C) 722523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D) 723523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E) 724523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F) 725523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010) 726523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011) 727523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012) 728523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013) 729523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014) 730523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015) 731523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016) 732523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017) 733523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018) 734523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019) 735523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A) 736523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B) 737523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C) 738523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D) 739523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E) 740523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F) 741523f5352Sopenharmony_ci#define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020) 742523f5352Sopenharmony_ci 743523f5352Sopenharmony_ci 744523f5352Sopenharmony_ci#define SL_METADATA_FILTER_KEY ((SLuint8) 0x01) 745523f5352Sopenharmony_ci#define SL_METADATA_FILTER_LANG ((SLuint8) 0x02) 746523f5352Sopenharmony_ci#define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04) 747523f5352Sopenharmony_ci 748523f5352Sopenharmony_ci 749523f5352Sopenharmony_citypedef struct SLMetadataInfo_ { 750523f5352Sopenharmony_ci SLuint32 size; 751523f5352Sopenharmony_ci SLuint32 encoding; 752523f5352Sopenharmony_ci SLchar langCountry[16]; 753523f5352Sopenharmony_ci SLuint8 data[1]; 754523f5352Sopenharmony_ci} SLMetadataInfo; 755523f5352Sopenharmony_ci 756523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_METADATAEXTRACTION; 757523f5352Sopenharmony_ci 758523f5352Sopenharmony_cistruct SLMetadataExtractionItf_; 759523f5352Sopenharmony_citypedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf; 760523f5352Sopenharmony_ci 761523f5352Sopenharmony_ci 762523f5352Sopenharmony_cistruct SLMetadataExtractionItf_ { 763523f5352Sopenharmony_ci SLresult (*GetItemCount) ( 764523f5352Sopenharmony_ci SLMetadataExtractionItf self, 765523f5352Sopenharmony_ci SLuint32 *pItemCount 766523f5352Sopenharmony_ci ); 767523f5352Sopenharmony_ci SLresult (*GetKeySize) ( 768523f5352Sopenharmony_ci SLMetadataExtractionItf self, 769523f5352Sopenharmony_ci SLuint32 index, 770523f5352Sopenharmony_ci SLuint32 *pKeySize 771523f5352Sopenharmony_ci ); 772523f5352Sopenharmony_ci SLresult (*GetKey) ( 773523f5352Sopenharmony_ci SLMetadataExtractionItf self, 774523f5352Sopenharmony_ci SLuint32 index, 775523f5352Sopenharmony_ci SLuint32 keySize, 776523f5352Sopenharmony_ci SLMetadataInfo *pKey 777523f5352Sopenharmony_ci ); 778523f5352Sopenharmony_ci SLresult (*GetValueSize) ( 779523f5352Sopenharmony_ci SLMetadataExtractionItf self, 780523f5352Sopenharmony_ci SLuint32 index, 781523f5352Sopenharmony_ci SLuint32 *pValueSize 782523f5352Sopenharmony_ci ); 783523f5352Sopenharmony_ci SLresult (*GetValue) ( 784523f5352Sopenharmony_ci SLMetadataExtractionItf self, 785523f5352Sopenharmony_ci SLuint32 index, 786523f5352Sopenharmony_ci SLuint32 valueSize, 787523f5352Sopenharmony_ci SLMetadataInfo *pValue 788523f5352Sopenharmony_ci ); 789523f5352Sopenharmony_ci SLresult (*AddKeyFilter) ( 790523f5352Sopenharmony_ci SLMetadataExtractionItf self, 791523f5352Sopenharmony_ci SLuint32 keySize, 792523f5352Sopenharmony_ci const void *pKey, 793523f5352Sopenharmony_ci SLuint32 keyEncoding, 794523f5352Sopenharmony_ci const SLchar *pValueLangCountry, 795523f5352Sopenharmony_ci SLuint32 valueEncoding, 796523f5352Sopenharmony_ci SLuint8 filterMask 797523f5352Sopenharmony_ci ); 798523f5352Sopenharmony_ci SLresult (*ClearKeyFilter) ( 799523f5352Sopenharmony_ci SLMetadataExtractionItf self 800523f5352Sopenharmony_ci ); 801523f5352Sopenharmony_ci}; 802523f5352Sopenharmony_ci 803523f5352Sopenharmony_ci 804523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 805523f5352Sopenharmony_ci/* Meta data traversal related types and interface */ 806523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 807523f5352Sopenharmony_ci 808523f5352Sopenharmony_ci#define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001) 809523f5352Sopenharmony_ci#define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002) 810523f5352Sopenharmony_ci 811523f5352Sopenharmony_ci 812523f5352Sopenharmony_ci#define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001) 813523f5352Sopenharmony_ci#define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002) 814523f5352Sopenharmony_ci#define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003) 815523f5352Sopenharmony_ci#define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004) 816523f5352Sopenharmony_ci 817523f5352Sopenharmony_ci#define SL_NODE_PARENT 0xFFFFFFFF 818523f5352Sopenharmony_ci 819523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_METADATATRAVERSAL; 820523f5352Sopenharmony_ci 821523f5352Sopenharmony_cistruct SLMetadataTraversalItf_; 822523f5352Sopenharmony_citypedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf; 823523f5352Sopenharmony_ci 824523f5352Sopenharmony_cistruct SLMetadataTraversalItf_ { 825523f5352Sopenharmony_ci SLresult (*SetMode) ( 826523f5352Sopenharmony_ci SLMetadataTraversalItf self, 827523f5352Sopenharmony_ci SLuint32 mode 828523f5352Sopenharmony_ci ); 829523f5352Sopenharmony_ci SLresult (*GetChildCount) ( 830523f5352Sopenharmony_ci SLMetadataTraversalItf self, 831523f5352Sopenharmony_ci SLuint32 *pCount 832523f5352Sopenharmony_ci ); 833523f5352Sopenharmony_ci SLresult (*GetChildMIMETypeSize) ( 834523f5352Sopenharmony_ci SLMetadataTraversalItf self, 835523f5352Sopenharmony_ci SLuint32 index, 836523f5352Sopenharmony_ci SLuint32 *pSize 837523f5352Sopenharmony_ci ); 838523f5352Sopenharmony_ci SLresult (*GetChildInfo) ( 839523f5352Sopenharmony_ci SLMetadataTraversalItf self, 840523f5352Sopenharmony_ci SLuint32 index, 841523f5352Sopenharmony_ci SLint32 *pNodeID, 842523f5352Sopenharmony_ci SLuint32 *pType, 843523f5352Sopenharmony_ci SLuint32 size, 844523f5352Sopenharmony_ci SLchar *pMimeType 845523f5352Sopenharmony_ci ); 846523f5352Sopenharmony_ci SLresult (*SetActiveNode) ( 847523f5352Sopenharmony_ci SLMetadataTraversalItf self, 848523f5352Sopenharmony_ci SLuint32 index 849523f5352Sopenharmony_ci ); 850523f5352Sopenharmony_ci}; 851523f5352Sopenharmony_ci 852523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 853523f5352Sopenharmony_ci/* Dynamic Source types and interface */ 854523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 855523f5352Sopenharmony_ci 856523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_DYNAMICSOURCE; 857523f5352Sopenharmony_ci 858523f5352Sopenharmony_cistruct SLDynamicSourceItf_; 859523f5352Sopenharmony_citypedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf; 860523f5352Sopenharmony_ci 861523f5352Sopenharmony_cistruct SLDynamicSourceItf_ { 862523f5352Sopenharmony_ci SLresult (*SetSource) ( 863523f5352Sopenharmony_ci SLDynamicSourceItf self, 864523f5352Sopenharmony_ci SLDataSource *pDataSource 865523f5352Sopenharmony_ci ); 866523f5352Sopenharmony_ci}; 867523f5352Sopenharmony_ci 868523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 869523f5352Sopenharmony_ci/* Output Mix interface */ 870523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 871523f5352Sopenharmony_ci 872523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_OUTPUTMIX; 873523f5352Sopenharmony_ci 874523f5352Sopenharmony_cistruct SLOutputMixItf_; 875523f5352Sopenharmony_citypedef const struct SLOutputMixItf_ * const * SLOutputMixItf; 876523f5352Sopenharmony_ci 877523f5352Sopenharmony_citypedef void (SLAPIENTRY *slMixDeviceChangeCallback) ( 878523f5352Sopenharmony_ci SLOutputMixItf caller, 879523f5352Sopenharmony_ci void *pContext 880523f5352Sopenharmony_ci); 881523f5352Sopenharmony_ci 882523f5352Sopenharmony_ci 883523f5352Sopenharmony_cistruct SLOutputMixItf_ { 884523f5352Sopenharmony_ci SLresult (*GetDestinationOutputDeviceIDs) ( 885523f5352Sopenharmony_ci SLOutputMixItf self, 886523f5352Sopenharmony_ci SLint32 *pNumDevices, 887523f5352Sopenharmony_ci SLuint32 *pDeviceIDs 888523f5352Sopenharmony_ci ); 889523f5352Sopenharmony_ci SLresult (*RegisterDeviceChangeCallback) ( 890523f5352Sopenharmony_ci SLOutputMixItf self, 891523f5352Sopenharmony_ci slMixDeviceChangeCallback callback, 892523f5352Sopenharmony_ci void *pContext 893523f5352Sopenharmony_ci ); 894523f5352Sopenharmony_ci SLresult (*ReRoute)( 895523f5352Sopenharmony_ci SLOutputMixItf self, 896523f5352Sopenharmony_ci SLint32 numOutputDevices, 897523f5352Sopenharmony_ci SLuint32 *pOutputDeviceIDs 898523f5352Sopenharmony_ci ); 899523f5352Sopenharmony_ci}; 900523f5352Sopenharmony_ci 901523f5352Sopenharmony_ci 902523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 903523f5352Sopenharmony_ci/* Playback interface */ 904523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 905523f5352Sopenharmony_ci 906523f5352Sopenharmony_ci/** Playback states */ 907523f5352Sopenharmony_ci#define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001) 908523f5352Sopenharmony_ci#define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002) 909523f5352Sopenharmony_ci#define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003) 910523f5352Sopenharmony_ci 911523f5352Sopenharmony_ci/** Play events **/ 912523f5352Sopenharmony_ci#define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001) 913523f5352Sopenharmony_ci#define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002) 914523f5352Sopenharmony_ci#define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004) 915523f5352Sopenharmony_ci#define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008) 916523f5352Sopenharmony_ci#define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010) 917523f5352Sopenharmony_ci 918523f5352Sopenharmony_ci#define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF) 919523f5352Sopenharmony_ci 920523f5352Sopenharmony_ci 921523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_PLAY; 922523f5352Sopenharmony_ci 923523f5352Sopenharmony_ci/** Playback interface methods */ 924523f5352Sopenharmony_ci 925523f5352Sopenharmony_cistruct SLPlayItf_; 926523f5352Sopenharmony_citypedef const struct SLPlayItf_ * const * SLPlayItf; 927523f5352Sopenharmony_ci 928523f5352Sopenharmony_citypedef void (SLAPIENTRY *slPlayCallback) ( 929523f5352Sopenharmony_ci SLPlayItf caller, 930523f5352Sopenharmony_ci void *pContext, 931523f5352Sopenharmony_ci SLuint32 event 932523f5352Sopenharmony_ci); 933523f5352Sopenharmony_ci 934523f5352Sopenharmony_cistruct SLPlayItf_ { 935523f5352Sopenharmony_ci SLresult (*SetPlayState) ( 936523f5352Sopenharmony_ci SLPlayItf self, 937523f5352Sopenharmony_ci SLuint32 state 938523f5352Sopenharmony_ci ); 939523f5352Sopenharmony_ci SLresult (*GetPlayState) ( 940523f5352Sopenharmony_ci SLPlayItf self, 941523f5352Sopenharmony_ci SLuint32 *pState 942523f5352Sopenharmony_ci ); 943523f5352Sopenharmony_ci SLresult (*GetDuration) ( 944523f5352Sopenharmony_ci SLPlayItf self, 945523f5352Sopenharmony_ci SLmillisecond *pMsec 946523f5352Sopenharmony_ci ); 947523f5352Sopenharmony_ci SLresult (*GetPosition) ( 948523f5352Sopenharmony_ci SLPlayItf self, 949523f5352Sopenharmony_ci SLmillisecond *pMsec 950523f5352Sopenharmony_ci ); 951523f5352Sopenharmony_ci SLresult (*RegisterCallback) ( 952523f5352Sopenharmony_ci SLPlayItf self, 953523f5352Sopenharmony_ci slPlayCallback callback, 954523f5352Sopenharmony_ci void *pContext 955523f5352Sopenharmony_ci ); 956523f5352Sopenharmony_ci SLresult (*SetCallbackEventsMask) ( 957523f5352Sopenharmony_ci SLPlayItf self, 958523f5352Sopenharmony_ci SLuint32 eventFlags 959523f5352Sopenharmony_ci ); 960523f5352Sopenharmony_ci SLresult (*GetCallbackEventsMask) ( 961523f5352Sopenharmony_ci SLPlayItf self, 962523f5352Sopenharmony_ci SLuint32 *pEventFlags 963523f5352Sopenharmony_ci ); 964523f5352Sopenharmony_ci SLresult (*SetMarkerPosition) ( 965523f5352Sopenharmony_ci SLPlayItf self, 966523f5352Sopenharmony_ci SLmillisecond mSec 967523f5352Sopenharmony_ci ); 968523f5352Sopenharmony_ci SLresult (*ClearMarkerPosition) ( 969523f5352Sopenharmony_ci SLPlayItf self 970523f5352Sopenharmony_ci ); 971523f5352Sopenharmony_ci SLresult (*GetMarkerPosition) ( 972523f5352Sopenharmony_ci SLPlayItf self, 973523f5352Sopenharmony_ci SLmillisecond *pMsec 974523f5352Sopenharmony_ci ); 975523f5352Sopenharmony_ci SLresult (*SetPositionUpdatePeriod) ( 976523f5352Sopenharmony_ci SLPlayItf self, 977523f5352Sopenharmony_ci SLmillisecond mSec 978523f5352Sopenharmony_ci ); 979523f5352Sopenharmony_ci SLresult (*GetPositionUpdatePeriod) ( 980523f5352Sopenharmony_ci SLPlayItf self, 981523f5352Sopenharmony_ci SLmillisecond *pMsec 982523f5352Sopenharmony_ci ); 983523f5352Sopenharmony_ci}; 984523f5352Sopenharmony_ci 985523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 986523f5352Sopenharmony_ci/* Prefetch status interface */ 987523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 988523f5352Sopenharmony_ci 989523f5352Sopenharmony_ci#define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001) 990523f5352Sopenharmony_ci#define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002) 991523f5352Sopenharmony_ci 992523f5352Sopenharmony_ci#define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001) 993523f5352Sopenharmony_ci#define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002) 994523f5352Sopenharmony_ci#define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003) 995523f5352Sopenharmony_ci 996523f5352Sopenharmony_ci 997523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_PREFETCHSTATUS; 998523f5352Sopenharmony_ci 999523f5352Sopenharmony_ci 1000523f5352Sopenharmony_ci/** Prefetch status interface methods */ 1001523f5352Sopenharmony_ci 1002523f5352Sopenharmony_cistruct SLPrefetchStatusItf_; 1003523f5352Sopenharmony_citypedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf; 1004523f5352Sopenharmony_ci 1005523f5352Sopenharmony_citypedef void (SLAPIENTRY *slPrefetchCallback) ( 1006523f5352Sopenharmony_ci SLPrefetchStatusItf caller, 1007523f5352Sopenharmony_ci void *pContext, 1008523f5352Sopenharmony_ci SLuint32 event 1009523f5352Sopenharmony_ci); 1010523f5352Sopenharmony_ci 1011523f5352Sopenharmony_cistruct SLPrefetchStatusItf_ { 1012523f5352Sopenharmony_ci SLresult (*GetPrefetchStatus) ( 1013523f5352Sopenharmony_ci SLPrefetchStatusItf self, 1014523f5352Sopenharmony_ci SLuint32 *pStatus 1015523f5352Sopenharmony_ci ); 1016523f5352Sopenharmony_ci SLresult (*GetFillLevel) ( 1017523f5352Sopenharmony_ci SLPrefetchStatusItf self, 1018523f5352Sopenharmony_ci SLpermille *pLevel 1019523f5352Sopenharmony_ci ); 1020523f5352Sopenharmony_ci SLresult (*RegisterCallback) ( 1021523f5352Sopenharmony_ci SLPrefetchStatusItf self, 1022523f5352Sopenharmony_ci slPrefetchCallback callback, 1023523f5352Sopenharmony_ci void *pContext 1024523f5352Sopenharmony_ci ); 1025523f5352Sopenharmony_ci SLresult (*SetCallbackEventsMask) ( 1026523f5352Sopenharmony_ci SLPrefetchStatusItf self, 1027523f5352Sopenharmony_ci SLuint32 eventFlags 1028523f5352Sopenharmony_ci ); 1029523f5352Sopenharmony_ci SLresult (*GetCallbackEventsMask) ( 1030523f5352Sopenharmony_ci SLPrefetchStatusItf self, 1031523f5352Sopenharmony_ci SLuint32 *pEventFlags 1032523f5352Sopenharmony_ci ); 1033523f5352Sopenharmony_ci SLresult (*SetFillUpdatePeriod) ( 1034523f5352Sopenharmony_ci SLPrefetchStatusItf self, 1035523f5352Sopenharmony_ci SLpermille period 1036523f5352Sopenharmony_ci ); 1037523f5352Sopenharmony_ci SLresult (*GetFillUpdatePeriod) ( 1038523f5352Sopenharmony_ci SLPrefetchStatusItf self, 1039523f5352Sopenharmony_ci SLpermille *pPeriod 1040523f5352Sopenharmony_ci ); 1041523f5352Sopenharmony_ci}; 1042523f5352Sopenharmony_ci 1043523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1044523f5352Sopenharmony_ci/* Playback Rate interface */ 1045523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1046523f5352Sopenharmony_ci 1047523f5352Sopenharmony_ci#define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001) 1048523f5352Sopenharmony_ci#define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002) 1049523f5352Sopenharmony_ci#define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100) 1050523f5352Sopenharmony_ci#define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200) 1051523f5352Sopenharmony_ci#define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400) 1052523f5352Sopenharmony_ci#define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800) 1053523f5352Sopenharmony_ci 1054523f5352Sopenharmony_ci 1055523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_PLAYBACKRATE; 1056523f5352Sopenharmony_ci 1057523f5352Sopenharmony_cistruct SLPlaybackRateItf_; 1058523f5352Sopenharmony_citypedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf; 1059523f5352Sopenharmony_ci 1060523f5352Sopenharmony_cistruct SLPlaybackRateItf_ { 1061523f5352Sopenharmony_ci SLresult (*SetRate)( 1062523f5352Sopenharmony_ci SLPlaybackRateItf self, 1063523f5352Sopenharmony_ci SLpermille rate 1064523f5352Sopenharmony_ci ); 1065523f5352Sopenharmony_ci SLresult (*GetRate)( 1066523f5352Sopenharmony_ci SLPlaybackRateItf self, 1067523f5352Sopenharmony_ci SLpermille *pRate 1068523f5352Sopenharmony_ci ); 1069523f5352Sopenharmony_ci SLresult (*SetPropertyConstraints)( 1070523f5352Sopenharmony_ci SLPlaybackRateItf self, 1071523f5352Sopenharmony_ci SLuint32 constraints 1072523f5352Sopenharmony_ci ); 1073523f5352Sopenharmony_ci SLresult (*GetProperties)( 1074523f5352Sopenharmony_ci SLPlaybackRateItf self, 1075523f5352Sopenharmony_ci SLuint32 *pProperties 1076523f5352Sopenharmony_ci ); 1077523f5352Sopenharmony_ci SLresult (*GetCapabilitiesOfRate)( 1078523f5352Sopenharmony_ci SLPlaybackRateItf self, 1079523f5352Sopenharmony_ci SLpermille rate, 1080523f5352Sopenharmony_ci SLuint32 *pCapabilities 1081523f5352Sopenharmony_ci ); 1082523f5352Sopenharmony_ci SLresult (*GetRateRange) ( 1083523f5352Sopenharmony_ci SLPlaybackRateItf self, 1084523f5352Sopenharmony_ci SLuint8 index, 1085523f5352Sopenharmony_ci SLpermille *pMinRate, 1086523f5352Sopenharmony_ci SLpermille *pMaxRate, 1087523f5352Sopenharmony_ci SLpermille *pStepSize, 1088523f5352Sopenharmony_ci SLuint32 *pCapabilities 1089523f5352Sopenharmony_ci ); 1090523f5352Sopenharmony_ci}; 1091523f5352Sopenharmony_ci 1092523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1093523f5352Sopenharmony_ci/* Seek Interface */ 1094523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1095523f5352Sopenharmony_ci 1096523f5352Sopenharmony_ci#define SL_SEEKMODE_FAST ((SLuint16) 0x0001) 1097523f5352Sopenharmony_ci#define SL_SEEKMODE_ACCURATE ((SLuint16) 0x0002) 1098523f5352Sopenharmony_ci 1099523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_SEEK; 1100523f5352Sopenharmony_ci 1101523f5352Sopenharmony_cistruct SLSeekItf_; 1102523f5352Sopenharmony_citypedef const struct SLSeekItf_ * const * SLSeekItf; 1103523f5352Sopenharmony_ci 1104523f5352Sopenharmony_cistruct SLSeekItf_ { 1105523f5352Sopenharmony_ci SLresult (*SetPosition)( 1106523f5352Sopenharmony_ci SLSeekItf self, 1107523f5352Sopenharmony_ci SLmillisecond pos, 1108523f5352Sopenharmony_ci SLuint32 seekMode 1109523f5352Sopenharmony_ci ); 1110523f5352Sopenharmony_ci SLresult (*SetLoop)( 1111523f5352Sopenharmony_ci SLSeekItf self, 1112523f5352Sopenharmony_ci SLboolean loopEnable, 1113523f5352Sopenharmony_ci SLmillisecond startPos, 1114523f5352Sopenharmony_ci SLmillisecond endPos 1115523f5352Sopenharmony_ci ); 1116523f5352Sopenharmony_ci SLresult (*GetLoop)( 1117523f5352Sopenharmony_ci SLSeekItf self, 1118523f5352Sopenharmony_ci SLboolean *pLoopEnabled, 1119523f5352Sopenharmony_ci SLmillisecond *pStartPos, 1120523f5352Sopenharmony_ci SLmillisecond *pEndPos 1121523f5352Sopenharmony_ci ); 1122523f5352Sopenharmony_ci}; 1123523f5352Sopenharmony_ci 1124523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1125523f5352Sopenharmony_ci/* Standard Recording Interface */ 1126523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1127523f5352Sopenharmony_ci 1128523f5352Sopenharmony_ci/** Recording states */ 1129523f5352Sopenharmony_ci#define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001) 1130523f5352Sopenharmony_ci#define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002) 1131523f5352Sopenharmony_ci#define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003) 1132523f5352Sopenharmony_ci 1133523f5352Sopenharmony_ci 1134523f5352Sopenharmony_ci/** Record event **/ 1135523f5352Sopenharmony_ci#define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001) 1136523f5352Sopenharmony_ci#define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002) 1137523f5352Sopenharmony_ci#define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004) 1138523f5352Sopenharmony_ci#define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008) 1139523f5352Sopenharmony_ci#define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010) 1140523f5352Sopenharmony_ci 1141523f5352Sopenharmony_ci 1142523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_RECORD; 1143523f5352Sopenharmony_ci 1144523f5352Sopenharmony_cistruct SLRecordItf_; 1145523f5352Sopenharmony_citypedef const struct SLRecordItf_ * const * SLRecordItf; 1146523f5352Sopenharmony_ci 1147523f5352Sopenharmony_citypedef void (SLAPIENTRY *slRecordCallback) ( 1148523f5352Sopenharmony_ci SLRecordItf caller, 1149523f5352Sopenharmony_ci void *pContext, 1150523f5352Sopenharmony_ci SLuint32 event 1151523f5352Sopenharmony_ci); 1152523f5352Sopenharmony_ci 1153523f5352Sopenharmony_ci/** Recording interface methods */ 1154523f5352Sopenharmony_cistruct SLRecordItf_ { 1155523f5352Sopenharmony_ci SLresult (*SetRecordState) ( 1156523f5352Sopenharmony_ci SLRecordItf self, 1157523f5352Sopenharmony_ci SLuint32 state 1158523f5352Sopenharmony_ci ); 1159523f5352Sopenharmony_ci SLresult (*GetRecordState) ( 1160523f5352Sopenharmony_ci SLRecordItf self, 1161523f5352Sopenharmony_ci SLuint32 *pState 1162523f5352Sopenharmony_ci ); 1163523f5352Sopenharmony_ci SLresult (*SetDurationLimit) ( 1164523f5352Sopenharmony_ci SLRecordItf self, 1165523f5352Sopenharmony_ci SLmillisecond msec 1166523f5352Sopenharmony_ci ); 1167523f5352Sopenharmony_ci SLresult (*GetPosition) ( 1168523f5352Sopenharmony_ci SLRecordItf self, 1169523f5352Sopenharmony_ci SLmillisecond *pMsec 1170523f5352Sopenharmony_ci ); 1171523f5352Sopenharmony_ci SLresult (*RegisterCallback) ( 1172523f5352Sopenharmony_ci SLRecordItf self, 1173523f5352Sopenharmony_ci slRecordCallback callback, 1174523f5352Sopenharmony_ci void *pContext 1175523f5352Sopenharmony_ci ); 1176523f5352Sopenharmony_ci SLresult (*SetCallbackEventsMask) ( 1177523f5352Sopenharmony_ci SLRecordItf self, 1178523f5352Sopenharmony_ci SLuint32 eventFlags 1179523f5352Sopenharmony_ci ); 1180523f5352Sopenharmony_ci SLresult (*GetCallbackEventsMask) ( 1181523f5352Sopenharmony_ci SLRecordItf self, 1182523f5352Sopenharmony_ci SLuint32 *pEventFlags 1183523f5352Sopenharmony_ci ); 1184523f5352Sopenharmony_ci SLresult (*SetMarkerPosition) ( 1185523f5352Sopenharmony_ci SLRecordItf self, 1186523f5352Sopenharmony_ci SLmillisecond mSec 1187523f5352Sopenharmony_ci ); 1188523f5352Sopenharmony_ci SLresult (*ClearMarkerPosition) ( 1189523f5352Sopenharmony_ci SLRecordItf self 1190523f5352Sopenharmony_ci ); 1191523f5352Sopenharmony_ci SLresult (*GetMarkerPosition) ( 1192523f5352Sopenharmony_ci SLRecordItf self, 1193523f5352Sopenharmony_ci SLmillisecond *pMsec 1194523f5352Sopenharmony_ci ); 1195523f5352Sopenharmony_ci SLresult (*SetPositionUpdatePeriod) ( 1196523f5352Sopenharmony_ci SLRecordItf self, 1197523f5352Sopenharmony_ci SLmillisecond mSec 1198523f5352Sopenharmony_ci ); 1199523f5352Sopenharmony_ci SLresult (*GetPositionUpdatePeriod) ( 1200523f5352Sopenharmony_ci SLRecordItf self, 1201523f5352Sopenharmony_ci SLmillisecond *pMsec 1202523f5352Sopenharmony_ci ); 1203523f5352Sopenharmony_ci}; 1204523f5352Sopenharmony_ci 1205523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1206523f5352Sopenharmony_ci/* Equalizer interface */ 1207523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1208523f5352Sopenharmony_ci 1209523f5352Sopenharmony_ci#define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF) 1210523f5352Sopenharmony_ci 1211523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_EQUALIZER; 1212523f5352Sopenharmony_ci 1213523f5352Sopenharmony_cistruct SLEqualizerItf_; 1214523f5352Sopenharmony_citypedef const struct SLEqualizerItf_ * const * SLEqualizerItf; 1215523f5352Sopenharmony_ci 1216523f5352Sopenharmony_cistruct SLEqualizerItf_ { 1217523f5352Sopenharmony_ci SLresult (*SetEnabled)( 1218523f5352Sopenharmony_ci SLEqualizerItf self, 1219523f5352Sopenharmony_ci SLboolean enabled 1220523f5352Sopenharmony_ci ); 1221523f5352Sopenharmony_ci SLresult (*IsEnabled)( 1222523f5352Sopenharmony_ci SLEqualizerItf self, 1223523f5352Sopenharmony_ci SLboolean *pEnabled 1224523f5352Sopenharmony_ci ); 1225523f5352Sopenharmony_ci SLresult (*GetNumberOfBands)( 1226523f5352Sopenharmony_ci SLEqualizerItf self, 1227523f5352Sopenharmony_ci SLuint16 *pAmount 1228523f5352Sopenharmony_ci ); 1229523f5352Sopenharmony_ci SLresult (*GetBandLevelRange)( 1230523f5352Sopenharmony_ci SLEqualizerItf self, 1231523f5352Sopenharmony_ci SLmillibel *pMin, 1232523f5352Sopenharmony_ci SLmillibel *pMax 1233523f5352Sopenharmony_ci ); 1234523f5352Sopenharmony_ci SLresult (*SetBandLevel)( 1235523f5352Sopenharmony_ci SLEqualizerItf self, 1236523f5352Sopenharmony_ci SLuint16 band, 1237523f5352Sopenharmony_ci SLmillibel level 1238523f5352Sopenharmony_ci ); 1239523f5352Sopenharmony_ci SLresult (*GetBandLevel)( 1240523f5352Sopenharmony_ci SLEqualizerItf self, 1241523f5352Sopenharmony_ci SLuint16 band, 1242523f5352Sopenharmony_ci SLmillibel *pLevel 1243523f5352Sopenharmony_ci ); 1244523f5352Sopenharmony_ci SLresult (*GetCenterFreq)( 1245523f5352Sopenharmony_ci SLEqualizerItf self, 1246523f5352Sopenharmony_ci SLuint16 band, 1247523f5352Sopenharmony_ci SLmilliHertz *pCenter 1248523f5352Sopenharmony_ci ); 1249523f5352Sopenharmony_ci SLresult (*GetBandFreqRange)( 1250523f5352Sopenharmony_ci SLEqualizerItf self, 1251523f5352Sopenharmony_ci SLuint16 band, 1252523f5352Sopenharmony_ci SLmilliHertz *pMin, 1253523f5352Sopenharmony_ci SLmilliHertz *pMax 1254523f5352Sopenharmony_ci ); 1255523f5352Sopenharmony_ci SLresult (*GetBand)( 1256523f5352Sopenharmony_ci SLEqualizerItf self, 1257523f5352Sopenharmony_ci SLmilliHertz frequency, 1258523f5352Sopenharmony_ci SLuint16 *pBand 1259523f5352Sopenharmony_ci ); 1260523f5352Sopenharmony_ci SLresult (*GetCurrentPreset)( 1261523f5352Sopenharmony_ci SLEqualizerItf self, 1262523f5352Sopenharmony_ci SLuint16 *pPreset 1263523f5352Sopenharmony_ci ); 1264523f5352Sopenharmony_ci SLresult (*UsePreset)( 1265523f5352Sopenharmony_ci SLEqualizerItf self, 1266523f5352Sopenharmony_ci SLuint16 index 1267523f5352Sopenharmony_ci ); 1268523f5352Sopenharmony_ci SLresult (*GetNumberOfPresets)( 1269523f5352Sopenharmony_ci SLEqualizerItf self, 1270523f5352Sopenharmony_ci SLuint16 *pNumPresets 1271523f5352Sopenharmony_ci ); 1272523f5352Sopenharmony_ci SLresult (*GetPresetName)( 1273523f5352Sopenharmony_ci SLEqualizerItf self, 1274523f5352Sopenharmony_ci SLuint16 index, 1275523f5352Sopenharmony_ci const SLchar ** ppName 1276523f5352Sopenharmony_ci ); 1277523f5352Sopenharmony_ci}; 1278523f5352Sopenharmony_ci 1279523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1280523f5352Sopenharmony_ci/* Volume Interface */ 1281523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 1282523f5352Sopenharmony_ci 1283523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_VOLUME; 1284523f5352Sopenharmony_ci 1285523f5352Sopenharmony_cistruct SLVolumeItf_; 1286523f5352Sopenharmony_citypedef const struct SLVolumeItf_ * const * SLVolumeItf; 1287523f5352Sopenharmony_ci 1288523f5352Sopenharmony_cistruct SLVolumeItf_ { 1289523f5352Sopenharmony_ci SLresult (*SetVolumeLevel) ( 1290523f5352Sopenharmony_ci SLVolumeItf self, 1291523f5352Sopenharmony_ci SLmillibel level 1292523f5352Sopenharmony_ci ); 1293523f5352Sopenharmony_ci SLresult (*GetVolumeLevel) ( 1294523f5352Sopenharmony_ci SLVolumeItf self, 1295523f5352Sopenharmony_ci SLmillibel *pLevel 1296523f5352Sopenharmony_ci ); 1297523f5352Sopenharmony_ci SLresult (*GetMaxVolumeLevel) ( 1298523f5352Sopenharmony_ci SLVolumeItf self, 1299523f5352Sopenharmony_ci SLmillibel *pMaxLevel 1300523f5352Sopenharmony_ci ); 1301523f5352Sopenharmony_ci SLresult (*SetMute) ( 1302523f5352Sopenharmony_ci SLVolumeItf self, 1303523f5352Sopenharmony_ci SLboolean mute 1304523f5352Sopenharmony_ci ); 1305523f5352Sopenharmony_ci SLresult (*GetMute) ( 1306523f5352Sopenharmony_ci SLVolumeItf self, 1307523f5352Sopenharmony_ci SLboolean *pMute 1308523f5352Sopenharmony_ci ); 1309523f5352Sopenharmony_ci SLresult (*EnableStereoPosition) ( 1310523f5352Sopenharmony_ci SLVolumeItf self, 1311523f5352Sopenharmony_ci SLboolean enable 1312523f5352Sopenharmony_ci ); 1313523f5352Sopenharmony_ci SLresult (*IsEnabledStereoPosition) ( 1314523f5352Sopenharmony_ci SLVolumeItf self, 1315523f5352Sopenharmony_ci SLboolean *pEnable 1316523f5352Sopenharmony_ci ); 1317523f5352Sopenharmony_ci SLresult (*SetStereoPosition) ( 1318523f5352Sopenharmony_ci SLVolumeItf self, 1319523f5352Sopenharmony_ci SLpermille stereoPosition 1320523f5352Sopenharmony_ci ); 1321523f5352Sopenharmony_ci SLresult (*GetStereoPosition) ( 1322523f5352Sopenharmony_ci SLVolumeItf self, 1323523f5352Sopenharmony_ci SLpermille *pStereoPosition 1324523f5352Sopenharmony_ci ); 1325523f5352Sopenharmony_ci}; 1326523f5352Sopenharmony_ci 1327523f5352Sopenharmony_ci 1328523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1329523f5352Sopenharmony_ci/* Device Volume Interface */ 1330523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 1331523f5352Sopenharmony_ci 1332523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_DEVICEVOLUME; 1333523f5352Sopenharmony_ci 1334523f5352Sopenharmony_cistruct SLDeviceVolumeItf_; 1335523f5352Sopenharmony_citypedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf; 1336523f5352Sopenharmony_ci 1337523f5352Sopenharmony_cistruct SLDeviceVolumeItf_ { 1338523f5352Sopenharmony_ci SLresult (*GetVolumeScale) ( 1339523f5352Sopenharmony_ci SLDeviceVolumeItf self, 1340523f5352Sopenharmony_ci SLuint32 deviceID, 1341523f5352Sopenharmony_ci SLint32 *pMinValue, 1342523f5352Sopenharmony_ci SLint32 *pMaxValue, 1343523f5352Sopenharmony_ci SLboolean *pIsMillibelScale 1344523f5352Sopenharmony_ci ); 1345523f5352Sopenharmony_ci SLresult (*SetVolume) ( 1346523f5352Sopenharmony_ci SLDeviceVolumeItf self, 1347523f5352Sopenharmony_ci SLuint32 deviceID, 1348523f5352Sopenharmony_ci SLint32 volume 1349523f5352Sopenharmony_ci ); 1350523f5352Sopenharmony_ci SLresult (*GetVolume) ( 1351523f5352Sopenharmony_ci SLDeviceVolumeItf self, 1352523f5352Sopenharmony_ci SLuint32 deviceID, 1353523f5352Sopenharmony_ci SLint32 *pVolume 1354523f5352Sopenharmony_ci ); 1355523f5352Sopenharmony_ci}; 1356523f5352Sopenharmony_ci 1357523f5352Sopenharmony_ci 1358523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1359523f5352Sopenharmony_ci/* Buffer Queue Interface */ 1360523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1361523f5352Sopenharmony_ci 1362523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_BUFFERQUEUE; 1363523f5352Sopenharmony_ci 1364523f5352Sopenharmony_cistruct SLBufferQueueItf_; 1365523f5352Sopenharmony_citypedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf; 1366523f5352Sopenharmony_ci 1367523f5352Sopenharmony_citypedef void (SLAPIENTRY *slBufferQueueCallback)( 1368523f5352Sopenharmony_ci SLBufferQueueItf caller, 1369523f5352Sopenharmony_ci void *pContext 1370523f5352Sopenharmony_ci); 1371523f5352Sopenharmony_ci 1372523f5352Sopenharmony_ci/** Buffer queue state **/ 1373523f5352Sopenharmony_ci 1374523f5352Sopenharmony_citypedef struct SLBufferQueueState_ { 1375523f5352Sopenharmony_ci SLuint32 count; 1376523f5352Sopenharmony_ci SLuint32 playIndex; 1377523f5352Sopenharmony_ci} SLBufferQueueState; 1378523f5352Sopenharmony_ci 1379523f5352Sopenharmony_ci 1380523f5352Sopenharmony_cistruct SLBufferQueueItf_ { 1381523f5352Sopenharmony_ci SLresult (*Enqueue) ( 1382523f5352Sopenharmony_ci SLBufferQueueItf self, 1383523f5352Sopenharmony_ci const void *pBuffer, 1384523f5352Sopenharmony_ci SLuint32 size 1385523f5352Sopenharmony_ci ); 1386523f5352Sopenharmony_ci SLresult (*Clear) ( 1387523f5352Sopenharmony_ci SLBufferQueueItf self 1388523f5352Sopenharmony_ci ); 1389523f5352Sopenharmony_ci SLresult (*GetState) ( 1390523f5352Sopenharmony_ci SLBufferQueueItf self, 1391523f5352Sopenharmony_ci SLBufferQueueState *pState 1392523f5352Sopenharmony_ci ); 1393523f5352Sopenharmony_ci SLresult (*RegisterCallback) ( 1394523f5352Sopenharmony_ci SLBufferQueueItf self, 1395523f5352Sopenharmony_ci slBufferQueueCallback callback, 1396523f5352Sopenharmony_ci void* pContext 1397523f5352Sopenharmony_ci ); 1398523f5352Sopenharmony_ci}; 1399523f5352Sopenharmony_ci 1400523f5352Sopenharmony_ci 1401523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1402523f5352Sopenharmony_ci/* PresetReverb */ 1403523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1404523f5352Sopenharmony_ci 1405523f5352Sopenharmony_ci#define SL_REVERBPRESET_NONE ((SLuint16) 0x0000) 1406523f5352Sopenharmony_ci#define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001) 1407523f5352Sopenharmony_ci#define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002) 1408523f5352Sopenharmony_ci#define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003) 1409523f5352Sopenharmony_ci#define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004) 1410523f5352Sopenharmony_ci#define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005) 1411523f5352Sopenharmony_ci#define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006) 1412523f5352Sopenharmony_ci 1413523f5352Sopenharmony_ci 1414523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_PRESETREVERB; 1415523f5352Sopenharmony_ci 1416523f5352Sopenharmony_cistruct SLPresetReverbItf_; 1417523f5352Sopenharmony_citypedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf; 1418523f5352Sopenharmony_ci 1419523f5352Sopenharmony_cistruct SLPresetReverbItf_ { 1420523f5352Sopenharmony_ci SLresult (*SetPreset) ( 1421523f5352Sopenharmony_ci SLPresetReverbItf self, 1422523f5352Sopenharmony_ci SLuint16 preset 1423523f5352Sopenharmony_ci ); 1424523f5352Sopenharmony_ci SLresult (*GetPreset) ( 1425523f5352Sopenharmony_ci SLPresetReverbItf self, 1426523f5352Sopenharmony_ci SLuint16 *pPreset 1427523f5352Sopenharmony_ci ); 1428523f5352Sopenharmony_ci}; 1429523f5352Sopenharmony_ci 1430523f5352Sopenharmony_ci 1431523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1432523f5352Sopenharmony_ci/* EnvironmentalReverb */ 1433523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1434523f5352Sopenharmony_ci 1435523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \ 1436523f5352Sopenharmony_ci { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 } 1437523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \ 1438523f5352Sopenharmony_ci { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 } 1439523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \ 1440523f5352Sopenharmony_ci { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 } 1441523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \ 1442523f5352Sopenharmony_ci { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 } 1443523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \ 1444523f5352Sopenharmony_ci { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 } 1445523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \ 1446523f5352Sopenharmony_ci { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 } 1447523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \ 1448523f5352Sopenharmony_ci { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 } 1449523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \ 1450523f5352Sopenharmony_ci { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 } 1451523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \ 1452523f5352Sopenharmony_ci { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 } 1453523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \ 1454523f5352Sopenharmony_ci { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 } 1455523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \ 1456523f5352Sopenharmony_ci { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 } 1457523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \ 1458523f5352Sopenharmony_ci { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 } 1459523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \ 1460523f5352Sopenharmony_ci { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 } 1461523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \ 1462523f5352Sopenharmony_ci { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 } 1463523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \ 1464523f5352Sopenharmony_ci { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 } 1465523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \ 1466523f5352Sopenharmony_ci { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 } 1467523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \ 1468523f5352Sopenharmony_ci { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 } 1469523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_CITY \ 1470523f5352Sopenharmony_ci { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 } 1471523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \ 1472523f5352Sopenharmony_ci { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 } 1473523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \ 1474523f5352Sopenharmony_ci { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 } 1475523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \ 1476523f5352Sopenharmony_ci { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 } 1477523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \ 1478523f5352Sopenharmony_ci { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 } 1479523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \ 1480523f5352Sopenharmony_ci { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 } 1481523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \ 1482523f5352Sopenharmony_ci { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 } 1483523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \ 1484523f5352Sopenharmony_ci { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 } 1485523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \ 1486523f5352Sopenharmony_ci { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 } 1487523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \ 1488523f5352Sopenharmony_ci { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 } 1489523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \ 1490523f5352Sopenharmony_ci { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 } 1491523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \ 1492523f5352Sopenharmony_ci { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 } 1493523f5352Sopenharmony_ci#define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \ 1494523f5352Sopenharmony_ci { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 } 1495523f5352Sopenharmony_ci 1496523f5352Sopenharmony_ci 1497523f5352Sopenharmony_citypedef struct SLEnvironmentalReverbSettings_ { 1498523f5352Sopenharmony_ci SLmillibel roomLevel; 1499523f5352Sopenharmony_ci SLmillibel roomHFLevel; 1500523f5352Sopenharmony_ci SLmillisecond decayTime; 1501523f5352Sopenharmony_ci SLpermille decayHFRatio; 1502523f5352Sopenharmony_ci SLmillibel reflectionsLevel; 1503523f5352Sopenharmony_ci SLmillisecond reflectionsDelay; 1504523f5352Sopenharmony_ci SLmillibel reverbLevel; 1505523f5352Sopenharmony_ci SLmillisecond reverbDelay; 1506523f5352Sopenharmony_ci SLpermille diffusion; 1507523f5352Sopenharmony_ci SLpermille density; 1508523f5352Sopenharmony_ci} SLEnvironmentalReverbSettings; 1509523f5352Sopenharmony_ci 1510523f5352Sopenharmony_ci 1511523f5352Sopenharmony_ci 1512523f5352Sopenharmony_ci 1513523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_ENVIRONMENTALREVERB; 1514523f5352Sopenharmony_ci 1515523f5352Sopenharmony_ci 1516523f5352Sopenharmony_cistruct SLEnvironmentalReverbItf_; 1517523f5352Sopenharmony_citypedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf; 1518523f5352Sopenharmony_ci 1519523f5352Sopenharmony_cistruct SLEnvironmentalReverbItf_ { 1520523f5352Sopenharmony_ci SLresult (*SetRoomLevel) ( 1521523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1522523f5352Sopenharmony_ci SLmillibel room 1523523f5352Sopenharmony_ci ); 1524523f5352Sopenharmony_ci SLresult (*GetRoomLevel) ( 1525523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1526523f5352Sopenharmony_ci SLmillibel *pRoom 1527523f5352Sopenharmony_ci ); 1528523f5352Sopenharmony_ci SLresult (*SetRoomHFLevel) ( 1529523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1530523f5352Sopenharmony_ci SLmillibel roomHF 1531523f5352Sopenharmony_ci ); 1532523f5352Sopenharmony_ci SLresult (*GetRoomHFLevel) ( 1533523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1534523f5352Sopenharmony_ci SLmillibel *pRoomHF 1535523f5352Sopenharmony_ci ); 1536523f5352Sopenharmony_ci SLresult (*SetDecayTime) ( 1537523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1538523f5352Sopenharmony_ci SLmillisecond decayTime 1539523f5352Sopenharmony_ci ); 1540523f5352Sopenharmony_ci SLresult (*GetDecayTime) ( 1541523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1542523f5352Sopenharmony_ci SLmillisecond *pDecayTime 1543523f5352Sopenharmony_ci ); 1544523f5352Sopenharmony_ci SLresult (*SetDecayHFRatio) ( 1545523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1546523f5352Sopenharmony_ci SLpermille decayHFRatio 1547523f5352Sopenharmony_ci ); 1548523f5352Sopenharmony_ci SLresult (*GetDecayHFRatio) ( 1549523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1550523f5352Sopenharmony_ci SLpermille *pDecayHFRatio 1551523f5352Sopenharmony_ci ); 1552523f5352Sopenharmony_ci SLresult (*SetReflectionsLevel) ( 1553523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1554523f5352Sopenharmony_ci SLmillibel reflectionsLevel 1555523f5352Sopenharmony_ci ); 1556523f5352Sopenharmony_ci SLresult (*GetReflectionsLevel) ( 1557523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1558523f5352Sopenharmony_ci SLmillibel *pReflectionsLevel 1559523f5352Sopenharmony_ci ); 1560523f5352Sopenharmony_ci SLresult (*SetReflectionsDelay) ( 1561523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1562523f5352Sopenharmony_ci SLmillisecond reflectionsDelay 1563523f5352Sopenharmony_ci ); 1564523f5352Sopenharmony_ci SLresult (*GetReflectionsDelay) ( 1565523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1566523f5352Sopenharmony_ci SLmillisecond *pReflectionsDelay 1567523f5352Sopenharmony_ci ); 1568523f5352Sopenharmony_ci SLresult (*SetReverbLevel) ( 1569523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1570523f5352Sopenharmony_ci SLmillibel reverbLevel 1571523f5352Sopenharmony_ci ); 1572523f5352Sopenharmony_ci SLresult (*GetReverbLevel) ( 1573523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1574523f5352Sopenharmony_ci SLmillibel *pReverbLevel 1575523f5352Sopenharmony_ci ); 1576523f5352Sopenharmony_ci SLresult (*SetReverbDelay) ( 1577523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1578523f5352Sopenharmony_ci SLmillisecond reverbDelay 1579523f5352Sopenharmony_ci ); 1580523f5352Sopenharmony_ci SLresult (*GetReverbDelay) ( 1581523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1582523f5352Sopenharmony_ci SLmillisecond *pReverbDelay 1583523f5352Sopenharmony_ci ); 1584523f5352Sopenharmony_ci SLresult (*SetDiffusion) ( 1585523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1586523f5352Sopenharmony_ci SLpermille diffusion 1587523f5352Sopenharmony_ci ); 1588523f5352Sopenharmony_ci SLresult (*GetDiffusion) ( 1589523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1590523f5352Sopenharmony_ci SLpermille *pDiffusion 1591523f5352Sopenharmony_ci ); 1592523f5352Sopenharmony_ci SLresult (*SetDensity) ( 1593523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1594523f5352Sopenharmony_ci SLpermille density 1595523f5352Sopenharmony_ci ); 1596523f5352Sopenharmony_ci SLresult (*GetDensity) ( 1597523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1598523f5352Sopenharmony_ci SLpermille *pDensity 1599523f5352Sopenharmony_ci ); 1600523f5352Sopenharmony_ci SLresult (*SetEnvironmentalReverbProperties) ( 1601523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1602523f5352Sopenharmony_ci const SLEnvironmentalReverbSettings *pProperties 1603523f5352Sopenharmony_ci ); 1604523f5352Sopenharmony_ci SLresult (*GetEnvironmentalReverbProperties) ( 1605523f5352Sopenharmony_ci SLEnvironmentalReverbItf self, 1606523f5352Sopenharmony_ci SLEnvironmentalReverbSettings *pProperties 1607523f5352Sopenharmony_ci ); 1608523f5352Sopenharmony_ci}; 1609523f5352Sopenharmony_ci 1610523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1611523f5352Sopenharmony_ci/* Effects Send Interface */ 1612523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1613523f5352Sopenharmony_ci 1614523f5352Sopenharmony_ci 1615523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_EFFECTSEND; 1616523f5352Sopenharmony_ci 1617523f5352Sopenharmony_cistruct SLEffectSendItf_; 1618523f5352Sopenharmony_citypedef const struct SLEffectSendItf_ * const * SLEffectSendItf; 1619523f5352Sopenharmony_ci 1620523f5352Sopenharmony_cistruct SLEffectSendItf_ { 1621523f5352Sopenharmony_ci SLresult (*EnableEffectSend) ( 1622523f5352Sopenharmony_ci SLEffectSendItf self, 1623523f5352Sopenharmony_ci const void *pAuxEffect, 1624523f5352Sopenharmony_ci SLboolean enable, 1625523f5352Sopenharmony_ci SLmillibel initialLevel 1626523f5352Sopenharmony_ci ); 1627523f5352Sopenharmony_ci SLresult (*IsEnabled) ( 1628523f5352Sopenharmony_ci SLEffectSendItf self, 1629523f5352Sopenharmony_ci const void * pAuxEffect, 1630523f5352Sopenharmony_ci SLboolean *pEnable 1631523f5352Sopenharmony_ci ); 1632523f5352Sopenharmony_ci SLresult (*SetDirectLevel) ( 1633523f5352Sopenharmony_ci SLEffectSendItf self, 1634523f5352Sopenharmony_ci SLmillibel directLevel 1635523f5352Sopenharmony_ci ); 1636523f5352Sopenharmony_ci SLresult (*GetDirectLevel) ( 1637523f5352Sopenharmony_ci SLEffectSendItf self, 1638523f5352Sopenharmony_ci SLmillibel *pDirectLevel 1639523f5352Sopenharmony_ci ); 1640523f5352Sopenharmony_ci SLresult (*SetSendLevel) ( 1641523f5352Sopenharmony_ci SLEffectSendItf self, 1642523f5352Sopenharmony_ci const void *pAuxEffect, 1643523f5352Sopenharmony_ci SLmillibel sendLevel 1644523f5352Sopenharmony_ci ); 1645523f5352Sopenharmony_ci SLresult (*GetSendLevel)( 1646523f5352Sopenharmony_ci SLEffectSendItf self, 1647523f5352Sopenharmony_ci const void *pAuxEffect, 1648523f5352Sopenharmony_ci SLmillibel *pSendLevel 1649523f5352Sopenharmony_ci ); 1650523f5352Sopenharmony_ci}; 1651523f5352Sopenharmony_ci 1652523f5352Sopenharmony_ci 1653523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1654523f5352Sopenharmony_ci/* 3D Grouping Interface */ 1655523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1656523f5352Sopenharmony_ci 1657523f5352Sopenharmony_ci 1658523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_3DGROUPING; 1659523f5352Sopenharmony_ci 1660523f5352Sopenharmony_ci 1661523f5352Sopenharmony_cistruct SL3DGroupingItf_ ; 1662523f5352Sopenharmony_citypedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf; 1663523f5352Sopenharmony_ci 1664523f5352Sopenharmony_cistruct SL3DGroupingItf_ { 1665523f5352Sopenharmony_ci SLresult (*Set3DGroup) ( 1666523f5352Sopenharmony_ci SL3DGroupingItf self, 1667523f5352Sopenharmony_ci SLObjectItf group 1668523f5352Sopenharmony_ci ); 1669523f5352Sopenharmony_ci SLresult (*Get3DGroup) ( 1670523f5352Sopenharmony_ci SL3DGroupingItf self, 1671523f5352Sopenharmony_ci SLObjectItf *pGroup 1672523f5352Sopenharmony_ci ); 1673523f5352Sopenharmony_ci}; 1674523f5352Sopenharmony_ci 1675523f5352Sopenharmony_ci 1676523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1677523f5352Sopenharmony_ci/* 3D Commit Interface */ 1678523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1679523f5352Sopenharmony_ci 1680523f5352Sopenharmony_ci 1681523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_3DCOMMIT; 1682523f5352Sopenharmony_ci 1683523f5352Sopenharmony_cistruct SL3DCommitItf_; 1684523f5352Sopenharmony_citypedef const struct SL3DCommitItf_* const * SL3DCommitItf; 1685523f5352Sopenharmony_ci 1686523f5352Sopenharmony_cistruct SL3DCommitItf_ { 1687523f5352Sopenharmony_ci SLresult (*Commit) ( 1688523f5352Sopenharmony_ci SL3DCommitItf self 1689523f5352Sopenharmony_ci ); 1690523f5352Sopenharmony_ci SLresult (*SetDeferred) ( 1691523f5352Sopenharmony_ci SL3DCommitItf self, 1692523f5352Sopenharmony_ci SLboolean deferred 1693523f5352Sopenharmony_ci ); 1694523f5352Sopenharmony_ci}; 1695523f5352Sopenharmony_ci 1696523f5352Sopenharmony_ci 1697523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1698523f5352Sopenharmony_ci/* 3D Location Interface */ 1699523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1700523f5352Sopenharmony_ci 1701523f5352Sopenharmony_citypedef struct SLVec3D_ { 1702523f5352Sopenharmony_ci SLint32 x; 1703523f5352Sopenharmony_ci SLint32 y; 1704523f5352Sopenharmony_ci SLint32 z; 1705523f5352Sopenharmony_ci} SLVec3D; 1706523f5352Sopenharmony_ci 1707523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_3DLOCATION; 1708523f5352Sopenharmony_ci 1709523f5352Sopenharmony_cistruct SL3DLocationItf_; 1710523f5352Sopenharmony_citypedef const struct SL3DLocationItf_ * const * SL3DLocationItf; 1711523f5352Sopenharmony_ci 1712523f5352Sopenharmony_cistruct SL3DLocationItf_ { 1713523f5352Sopenharmony_ci SLresult (*SetLocationCartesian) ( 1714523f5352Sopenharmony_ci SL3DLocationItf self, 1715523f5352Sopenharmony_ci const SLVec3D *pLocation 1716523f5352Sopenharmony_ci ); 1717523f5352Sopenharmony_ci SLresult (*SetLocationSpherical) ( 1718523f5352Sopenharmony_ci SL3DLocationItf self, 1719523f5352Sopenharmony_ci SLmillidegree azimuth, 1720523f5352Sopenharmony_ci SLmillidegree elevation, 1721523f5352Sopenharmony_ci SLmillimeter distance 1722523f5352Sopenharmony_ci ); 1723523f5352Sopenharmony_ci SLresult (*Move) ( 1724523f5352Sopenharmony_ci SL3DLocationItf self, 1725523f5352Sopenharmony_ci const SLVec3D *pMovement 1726523f5352Sopenharmony_ci ); 1727523f5352Sopenharmony_ci SLresult (*GetLocationCartesian) ( 1728523f5352Sopenharmony_ci SL3DLocationItf self, 1729523f5352Sopenharmony_ci SLVec3D *pLocation 1730523f5352Sopenharmony_ci ); 1731523f5352Sopenharmony_ci SLresult (*SetOrientationVectors) ( 1732523f5352Sopenharmony_ci SL3DLocationItf self, 1733523f5352Sopenharmony_ci const SLVec3D *pFront, 1734523f5352Sopenharmony_ci const SLVec3D *pAbove 1735523f5352Sopenharmony_ci ); 1736523f5352Sopenharmony_ci SLresult (*SetOrientationAngles) ( 1737523f5352Sopenharmony_ci SL3DLocationItf self, 1738523f5352Sopenharmony_ci SLmillidegree heading, 1739523f5352Sopenharmony_ci SLmillidegree pitch, 1740523f5352Sopenharmony_ci SLmillidegree roll 1741523f5352Sopenharmony_ci ); 1742523f5352Sopenharmony_ci SLresult (*Rotate) ( 1743523f5352Sopenharmony_ci SL3DLocationItf self, 1744523f5352Sopenharmony_ci SLmillidegree theta, 1745523f5352Sopenharmony_ci const SLVec3D *pAxis 1746523f5352Sopenharmony_ci ); 1747523f5352Sopenharmony_ci SLresult (*GetOrientationVectors) ( 1748523f5352Sopenharmony_ci SL3DLocationItf self, 1749523f5352Sopenharmony_ci SLVec3D *pFront, 1750523f5352Sopenharmony_ci SLVec3D *pUp 1751523f5352Sopenharmony_ci ); 1752523f5352Sopenharmony_ci}; 1753523f5352Sopenharmony_ci 1754523f5352Sopenharmony_ci 1755523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1756523f5352Sopenharmony_ci/* 3D Doppler Interface */ 1757523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1758523f5352Sopenharmony_ci 1759523f5352Sopenharmony_ci 1760523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_3DDOPPLER; 1761523f5352Sopenharmony_ci 1762523f5352Sopenharmony_cistruct SL3DDopplerItf_; 1763523f5352Sopenharmony_citypedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf; 1764523f5352Sopenharmony_ci 1765523f5352Sopenharmony_cistruct SL3DDopplerItf_ { 1766523f5352Sopenharmony_ci SLresult (*SetVelocityCartesian) ( 1767523f5352Sopenharmony_ci SL3DDopplerItf self, 1768523f5352Sopenharmony_ci const SLVec3D *pVelocity 1769523f5352Sopenharmony_ci ); 1770523f5352Sopenharmony_ci SLresult (*SetVelocitySpherical) ( 1771523f5352Sopenharmony_ci SL3DDopplerItf self, 1772523f5352Sopenharmony_ci SLmillidegree azimuth, 1773523f5352Sopenharmony_ci SLmillidegree elevation, 1774523f5352Sopenharmony_ci SLmillimeter speed 1775523f5352Sopenharmony_ci ); 1776523f5352Sopenharmony_ci SLresult (*GetVelocityCartesian) ( 1777523f5352Sopenharmony_ci SL3DDopplerItf self, 1778523f5352Sopenharmony_ci SLVec3D *pVelocity 1779523f5352Sopenharmony_ci ); 1780523f5352Sopenharmony_ci SLresult (*SetDopplerFactor) ( 1781523f5352Sopenharmony_ci SL3DDopplerItf self, 1782523f5352Sopenharmony_ci SLpermille dopplerFactor 1783523f5352Sopenharmony_ci ); 1784523f5352Sopenharmony_ci SLresult (*GetDopplerFactor) ( 1785523f5352Sopenharmony_ci SL3DDopplerItf self, 1786523f5352Sopenharmony_ci SLpermille *pDopplerFactor 1787523f5352Sopenharmony_ci ); 1788523f5352Sopenharmony_ci}; 1789523f5352Sopenharmony_ci 1790523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1791523f5352Sopenharmony_ci/* 3D Source Interface and associated defines */ 1792523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 1793523f5352Sopenharmony_ci 1794523f5352Sopenharmony_ci#define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000) 1795523f5352Sopenharmony_ci#define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001) 1796523f5352Sopenharmony_ci 1797523f5352Sopenharmony_ci 1798523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_3DSOURCE; 1799523f5352Sopenharmony_ci 1800523f5352Sopenharmony_cistruct SL3DSourceItf_; 1801523f5352Sopenharmony_citypedef const struct SL3DSourceItf_ * const * SL3DSourceItf; 1802523f5352Sopenharmony_ci 1803523f5352Sopenharmony_cistruct SL3DSourceItf_ { 1804523f5352Sopenharmony_ci SLresult (*SetHeadRelative) ( 1805523f5352Sopenharmony_ci SL3DSourceItf self, 1806523f5352Sopenharmony_ci SLboolean headRelative 1807523f5352Sopenharmony_ci ); 1808523f5352Sopenharmony_ci SLresult (*GetHeadRelative) ( 1809523f5352Sopenharmony_ci SL3DSourceItf self, 1810523f5352Sopenharmony_ci SLboolean *pHeadRelative 1811523f5352Sopenharmony_ci ); 1812523f5352Sopenharmony_ci SLresult (*SetRolloffDistances) ( 1813523f5352Sopenharmony_ci SL3DSourceItf self, 1814523f5352Sopenharmony_ci SLmillimeter minDistance, 1815523f5352Sopenharmony_ci SLmillimeter maxDistance 1816523f5352Sopenharmony_ci ); 1817523f5352Sopenharmony_ci SLresult (*GetRolloffDistances) ( 1818523f5352Sopenharmony_ci SL3DSourceItf self, 1819523f5352Sopenharmony_ci SLmillimeter *pMinDistance, 1820523f5352Sopenharmony_ci SLmillimeter *pMaxDistance 1821523f5352Sopenharmony_ci ); 1822523f5352Sopenharmony_ci SLresult (*SetRolloffMaxDistanceMute) ( 1823523f5352Sopenharmony_ci SL3DSourceItf self, 1824523f5352Sopenharmony_ci SLboolean mute 1825523f5352Sopenharmony_ci ); 1826523f5352Sopenharmony_ci SLresult (*GetRolloffMaxDistanceMute) ( 1827523f5352Sopenharmony_ci SL3DSourceItf self, 1828523f5352Sopenharmony_ci SLboolean *pMute 1829523f5352Sopenharmony_ci ); 1830523f5352Sopenharmony_ci SLresult (*SetRolloffFactor) ( 1831523f5352Sopenharmony_ci SL3DSourceItf self, 1832523f5352Sopenharmony_ci SLpermille rolloffFactor 1833523f5352Sopenharmony_ci ); 1834523f5352Sopenharmony_ci SLresult (*GetRolloffFactor) ( 1835523f5352Sopenharmony_ci SL3DSourceItf self, 1836523f5352Sopenharmony_ci SLpermille *pRolloffFactor 1837523f5352Sopenharmony_ci ); 1838523f5352Sopenharmony_ci SLresult (*SetRoomRolloffFactor) ( 1839523f5352Sopenharmony_ci SL3DSourceItf self, 1840523f5352Sopenharmony_ci SLpermille roomRolloffFactor 1841523f5352Sopenharmony_ci ); 1842523f5352Sopenharmony_ci SLresult (*GetRoomRolloffFactor) ( 1843523f5352Sopenharmony_ci SL3DSourceItf self, 1844523f5352Sopenharmony_ci SLpermille *pRoomRolloffFactor 1845523f5352Sopenharmony_ci ); 1846523f5352Sopenharmony_ci SLresult (*SetRolloffModel) ( 1847523f5352Sopenharmony_ci SL3DSourceItf self, 1848523f5352Sopenharmony_ci SLuint8 model 1849523f5352Sopenharmony_ci ); 1850523f5352Sopenharmony_ci SLresult (*GetRolloffModel) ( 1851523f5352Sopenharmony_ci SL3DSourceItf self, 1852523f5352Sopenharmony_ci SLuint8 *pModel 1853523f5352Sopenharmony_ci ); 1854523f5352Sopenharmony_ci SLresult (*SetCone) ( 1855523f5352Sopenharmony_ci SL3DSourceItf self, 1856523f5352Sopenharmony_ci SLmillidegree innerAngle, 1857523f5352Sopenharmony_ci SLmillidegree outerAngle, 1858523f5352Sopenharmony_ci SLmillibel outerLevel 1859523f5352Sopenharmony_ci ); 1860523f5352Sopenharmony_ci SLresult (*GetCone) ( 1861523f5352Sopenharmony_ci SL3DSourceItf self, 1862523f5352Sopenharmony_ci SLmillidegree *pInnerAngle, 1863523f5352Sopenharmony_ci SLmillidegree *pOuterAngle, 1864523f5352Sopenharmony_ci SLmillibel *pOuterLevel 1865523f5352Sopenharmony_ci ); 1866523f5352Sopenharmony_ci}; 1867523f5352Sopenharmony_ci 1868523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1869523f5352Sopenharmony_ci/* 3D Macroscopic Interface */ 1870523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 1871523f5352Sopenharmony_ci 1872523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_3DMACROSCOPIC; 1873523f5352Sopenharmony_ci 1874523f5352Sopenharmony_cistruct SL3DMacroscopicItf_; 1875523f5352Sopenharmony_citypedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf; 1876523f5352Sopenharmony_ci 1877523f5352Sopenharmony_cistruct SL3DMacroscopicItf_ { 1878523f5352Sopenharmony_ci SLresult (*SetSize) ( 1879523f5352Sopenharmony_ci SL3DMacroscopicItf self, 1880523f5352Sopenharmony_ci SLmillimeter width, 1881523f5352Sopenharmony_ci SLmillimeter height, 1882523f5352Sopenharmony_ci SLmillimeter depth 1883523f5352Sopenharmony_ci ); 1884523f5352Sopenharmony_ci SLresult (*GetSize) ( 1885523f5352Sopenharmony_ci SL3DMacroscopicItf self, 1886523f5352Sopenharmony_ci SLmillimeter *pWidth, 1887523f5352Sopenharmony_ci SLmillimeter *pHeight, 1888523f5352Sopenharmony_ci SLmillimeter *pDepth 1889523f5352Sopenharmony_ci ); 1890523f5352Sopenharmony_ci SLresult (*SetOrientationAngles) ( 1891523f5352Sopenharmony_ci SL3DMacroscopicItf self, 1892523f5352Sopenharmony_ci SLmillidegree heading, 1893523f5352Sopenharmony_ci SLmillidegree pitch, 1894523f5352Sopenharmony_ci SLmillidegree roll 1895523f5352Sopenharmony_ci ); 1896523f5352Sopenharmony_ci SLresult (*SetOrientationVectors) ( 1897523f5352Sopenharmony_ci SL3DMacroscopicItf self, 1898523f5352Sopenharmony_ci const SLVec3D *pFront, 1899523f5352Sopenharmony_ci const SLVec3D *pAbove 1900523f5352Sopenharmony_ci ); 1901523f5352Sopenharmony_ci SLresult (*Rotate) ( 1902523f5352Sopenharmony_ci SL3DMacroscopicItf self, 1903523f5352Sopenharmony_ci SLmillidegree theta, 1904523f5352Sopenharmony_ci const SLVec3D *pAxis 1905523f5352Sopenharmony_ci ); 1906523f5352Sopenharmony_ci SLresult (*GetOrientationVectors) ( 1907523f5352Sopenharmony_ci SL3DMacroscopicItf self, 1908523f5352Sopenharmony_ci SLVec3D *pFront, 1909523f5352Sopenharmony_ci SLVec3D *pUp 1910523f5352Sopenharmony_ci ); 1911523f5352Sopenharmony_ci}; 1912523f5352Sopenharmony_ci 1913523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1914523f5352Sopenharmony_ci/* Mute Solo Interface */ 1915523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 1916523f5352Sopenharmony_ci 1917523f5352Sopenharmony_ci 1918523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_MUTESOLO; 1919523f5352Sopenharmony_ci 1920523f5352Sopenharmony_cistruct SLMuteSoloItf_; 1921523f5352Sopenharmony_citypedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf; 1922523f5352Sopenharmony_ci 1923523f5352Sopenharmony_cistruct SLMuteSoloItf_ { 1924523f5352Sopenharmony_ci SLresult (*SetChannelMute) ( 1925523f5352Sopenharmony_ci SLMuteSoloItf self, 1926523f5352Sopenharmony_ci SLuint8 chan, 1927523f5352Sopenharmony_ci SLboolean mute 1928523f5352Sopenharmony_ci ); 1929523f5352Sopenharmony_ci SLresult (*GetChannelMute) ( 1930523f5352Sopenharmony_ci SLMuteSoloItf self, 1931523f5352Sopenharmony_ci SLuint8 chan, 1932523f5352Sopenharmony_ci SLboolean *pMute 1933523f5352Sopenharmony_ci ); 1934523f5352Sopenharmony_ci SLresult (*SetChannelSolo) ( 1935523f5352Sopenharmony_ci SLMuteSoloItf self, 1936523f5352Sopenharmony_ci SLuint8 chan, 1937523f5352Sopenharmony_ci SLboolean solo 1938523f5352Sopenharmony_ci ); 1939523f5352Sopenharmony_ci SLresult (*GetChannelSolo) ( 1940523f5352Sopenharmony_ci SLMuteSoloItf self, 1941523f5352Sopenharmony_ci SLuint8 chan, 1942523f5352Sopenharmony_ci SLboolean *pSolo 1943523f5352Sopenharmony_ci ); 1944523f5352Sopenharmony_ci SLresult (*GetNumChannels) ( 1945523f5352Sopenharmony_ci SLMuteSoloItf self, 1946523f5352Sopenharmony_ci SLuint8 *pNumChannels 1947523f5352Sopenharmony_ci ); 1948523f5352Sopenharmony_ci}; 1949523f5352Sopenharmony_ci 1950523f5352Sopenharmony_ci 1951523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 1952523f5352Sopenharmony_ci/* Dynamic Interface Management Interface and associated types and macros */ 1953523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 1954523f5352Sopenharmony_ci 1955523f5352Sopenharmony_ci#define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001) 1956523f5352Sopenharmony_ci#define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002) 1957523f5352Sopenharmony_ci#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003) 1958523f5352Sopenharmony_ci#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004) 1959523f5352Sopenharmony_ci#define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005) 1960523f5352Sopenharmony_ci 1961523f5352Sopenharmony_ci 1962523f5352Sopenharmony_ci 1963523f5352Sopenharmony_ci 1964523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT; 1965523f5352Sopenharmony_ci 1966523f5352Sopenharmony_cistruct SLDynamicInterfaceManagementItf_; 1967523f5352Sopenharmony_citypedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf; 1968523f5352Sopenharmony_ci 1969523f5352Sopenharmony_citypedef void (SLAPIENTRY *slDynamicInterfaceManagementCallback) ( 1970523f5352Sopenharmony_ci SLDynamicInterfaceManagementItf caller, 1971523f5352Sopenharmony_ci void * pContext, 1972523f5352Sopenharmony_ci SLuint32 event, 1973523f5352Sopenharmony_ci SLresult result, 1974523f5352Sopenharmony_ci const SLInterfaceID iid 1975523f5352Sopenharmony_ci); 1976523f5352Sopenharmony_ci 1977523f5352Sopenharmony_ci 1978523f5352Sopenharmony_cistruct SLDynamicInterfaceManagementItf_ { 1979523f5352Sopenharmony_ci SLresult (*AddInterface) ( 1980523f5352Sopenharmony_ci SLDynamicInterfaceManagementItf self, 1981523f5352Sopenharmony_ci const SLInterfaceID iid, 1982523f5352Sopenharmony_ci SLboolean async 1983523f5352Sopenharmony_ci ); 1984523f5352Sopenharmony_ci SLresult (*RemoveInterface) ( 1985523f5352Sopenharmony_ci SLDynamicInterfaceManagementItf self, 1986523f5352Sopenharmony_ci const SLInterfaceID iid 1987523f5352Sopenharmony_ci ); 1988523f5352Sopenharmony_ci SLresult (*ResumeInterface) ( 1989523f5352Sopenharmony_ci SLDynamicInterfaceManagementItf self, 1990523f5352Sopenharmony_ci const SLInterfaceID iid, 1991523f5352Sopenharmony_ci SLboolean async 1992523f5352Sopenharmony_ci ); 1993523f5352Sopenharmony_ci SLresult (*RegisterCallback) ( 1994523f5352Sopenharmony_ci SLDynamicInterfaceManagementItf self, 1995523f5352Sopenharmony_ci slDynamicInterfaceManagementCallback callback, 1996523f5352Sopenharmony_ci void * pContext 1997523f5352Sopenharmony_ci ); 1998523f5352Sopenharmony_ci}; 1999523f5352Sopenharmony_ci 2000523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2001523f5352Sopenharmony_ci/* Midi Message Interface and associated types */ 2002523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2003523f5352Sopenharmony_ci 2004523f5352Sopenharmony_ci#define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001) 2005523f5352Sopenharmony_ci#define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002) 2006523f5352Sopenharmony_ci#define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003) 2007523f5352Sopenharmony_ci#define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004) 2008523f5352Sopenharmony_ci#define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005) 2009523f5352Sopenharmony_ci#define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006) 2010523f5352Sopenharmony_ci#define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007) 2011523f5352Sopenharmony_ci 2012523f5352Sopenharmony_ci 2013523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_MIDIMESSAGE; 2014523f5352Sopenharmony_ci 2015523f5352Sopenharmony_cistruct SLMIDIMessageItf_; 2016523f5352Sopenharmony_citypedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf; 2017523f5352Sopenharmony_ci 2018523f5352Sopenharmony_citypedef void (SLAPIENTRY *slMetaEventCallback) ( 2019523f5352Sopenharmony_ci SLMIDIMessageItf caller, 2020523f5352Sopenharmony_ci void *pContext, 2021523f5352Sopenharmony_ci SLuint8 type, 2022523f5352Sopenharmony_ci SLuint32 length, 2023523f5352Sopenharmony_ci const SLuint8 *pData, 2024523f5352Sopenharmony_ci SLuint32 tick, 2025523f5352Sopenharmony_ci SLuint16 track 2026523f5352Sopenharmony_ci); 2027523f5352Sopenharmony_ci 2028523f5352Sopenharmony_citypedef void (SLAPIENTRY *slMIDIMessageCallback) ( 2029523f5352Sopenharmony_ci SLMIDIMessageItf caller, 2030523f5352Sopenharmony_ci void *pContext, 2031523f5352Sopenharmony_ci SLuint8 statusByte, 2032523f5352Sopenharmony_ci SLuint32 length, 2033523f5352Sopenharmony_ci const SLuint8 *pData, 2034523f5352Sopenharmony_ci SLuint32 tick, 2035523f5352Sopenharmony_ci SLuint16 track 2036523f5352Sopenharmony_ci); 2037523f5352Sopenharmony_ci 2038523f5352Sopenharmony_cistruct SLMIDIMessageItf_ { 2039523f5352Sopenharmony_ci SLresult (*SendMessage) ( 2040523f5352Sopenharmony_ci SLMIDIMessageItf self, 2041523f5352Sopenharmony_ci const SLuint8 *data, 2042523f5352Sopenharmony_ci SLuint32 length 2043523f5352Sopenharmony_ci ); 2044523f5352Sopenharmony_ci SLresult (*RegisterMetaEventCallback) ( 2045523f5352Sopenharmony_ci SLMIDIMessageItf self, 2046523f5352Sopenharmony_ci slMetaEventCallback callback, 2047523f5352Sopenharmony_ci void *pContext 2048523f5352Sopenharmony_ci ); 2049523f5352Sopenharmony_ci SLresult (*RegisterMIDIMessageCallback) ( 2050523f5352Sopenharmony_ci SLMIDIMessageItf self, 2051523f5352Sopenharmony_ci slMIDIMessageCallback callback, 2052523f5352Sopenharmony_ci void *pContext 2053523f5352Sopenharmony_ci ); 2054523f5352Sopenharmony_ci SLresult (*AddMIDIMessageCallbackFilter) ( 2055523f5352Sopenharmony_ci SLMIDIMessageItf self, 2056523f5352Sopenharmony_ci SLuint32 messageType 2057523f5352Sopenharmony_ci ); 2058523f5352Sopenharmony_ci SLresult (*ClearMIDIMessageCallbackFilter) ( 2059523f5352Sopenharmony_ci SLMIDIMessageItf self 2060523f5352Sopenharmony_ci ); 2061523f5352Sopenharmony_ci}; 2062523f5352Sopenharmony_ci 2063523f5352Sopenharmony_ci 2064523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2065523f5352Sopenharmony_ci/* Midi Mute Solo interface */ 2066523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2067523f5352Sopenharmony_ci 2068523f5352Sopenharmony_ci 2069523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_MIDIMUTESOLO; 2070523f5352Sopenharmony_ci 2071523f5352Sopenharmony_cistruct SLMIDIMuteSoloItf_; 2072523f5352Sopenharmony_citypedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf; 2073523f5352Sopenharmony_ci 2074523f5352Sopenharmony_cistruct SLMIDIMuteSoloItf_ { 2075523f5352Sopenharmony_ci SLresult (*SetChannelMute) ( 2076523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2077523f5352Sopenharmony_ci SLuint8 channel, 2078523f5352Sopenharmony_ci SLboolean mute 2079523f5352Sopenharmony_ci ); 2080523f5352Sopenharmony_ci SLresult (*GetChannelMute) ( 2081523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2082523f5352Sopenharmony_ci SLuint8 channel, 2083523f5352Sopenharmony_ci SLboolean *pMute 2084523f5352Sopenharmony_ci ); 2085523f5352Sopenharmony_ci SLresult (*SetChannelSolo) ( 2086523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2087523f5352Sopenharmony_ci SLuint8 channel, 2088523f5352Sopenharmony_ci SLboolean solo 2089523f5352Sopenharmony_ci ); 2090523f5352Sopenharmony_ci SLresult (*GetChannelSolo) ( 2091523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2092523f5352Sopenharmony_ci SLuint8 channel, 2093523f5352Sopenharmony_ci SLboolean *pSolo 2094523f5352Sopenharmony_ci ); 2095523f5352Sopenharmony_ci SLresult (*GetTrackCount) ( 2096523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2097523f5352Sopenharmony_ci SLuint16 *pCount 2098523f5352Sopenharmony_ci ); 2099523f5352Sopenharmony_ci SLresult (*SetTrackMute) ( 2100523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2101523f5352Sopenharmony_ci SLuint16 track, 2102523f5352Sopenharmony_ci SLboolean mute 2103523f5352Sopenharmony_ci ); 2104523f5352Sopenharmony_ci SLresult (*GetTrackMute) ( 2105523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2106523f5352Sopenharmony_ci SLuint16 track, 2107523f5352Sopenharmony_ci SLboolean *pMute 2108523f5352Sopenharmony_ci ); 2109523f5352Sopenharmony_ci SLresult (*SetTrackSolo) ( 2110523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2111523f5352Sopenharmony_ci SLuint16 track, 2112523f5352Sopenharmony_ci SLboolean solo 2113523f5352Sopenharmony_ci ); 2114523f5352Sopenharmony_ci SLresult (*GetTrackSolo) ( 2115523f5352Sopenharmony_ci SLMIDIMuteSoloItf self, 2116523f5352Sopenharmony_ci SLuint16 track, 2117523f5352Sopenharmony_ci SLboolean *pSolo 2118523f5352Sopenharmony_ci ); 2119523f5352Sopenharmony_ci}; 2120523f5352Sopenharmony_ci 2121523f5352Sopenharmony_ci 2122523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2123523f5352Sopenharmony_ci/* Midi Tempo interface */ 2124523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2125523f5352Sopenharmony_ci 2126523f5352Sopenharmony_ci 2127523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_MIDITEMPO; 2128523f5352Sopenharmony_ci 2129523f5352Sopenharmony_cistruct SLMIDITempoItf_; 2130523f5352Sopenharmony_citypedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf; 2131523f5352Sopenharmony_ci 2132523f5352Sopenharmony_cistruct SLMIDITempoItf_ { 2133523f5352Sopenharmony_ci SLresult (*SetTicksPerQuarterNote) ( 2134523f5352Sopenharmony_ci SLMIDITempoItf self, 2135523f5352Sopenharmony_ci SLuint32 tpqn 2136523f5352Sopenharmony_ci ); 2137523f5352Sopenharmony_ci SLresult (*GetTicksPerQuarterNote) ( 2138523f5352Sopenharmony_ci SLMIDITempoItf self, 2139523f5352Sopenharmony_ci SLuint32 *pTpqn 2140523f5352Sopenharmony_ci ); 2141523f5352Sopenharmony_ci SLresult (*SetMicrosecondsPerQuarterNote) ( 2142523f5352Sopenharmony_ci SLMIDITempoItf self, 2143523f5352Sopenharmony_ci SLmicrosecond uspqn 2144523f5352Sopenharmony_ci ); 2145523f5352Sopenharmony_ci SLresult (*GetMicrosecondsPerQuarterNote) ( 2146523f5352Sopenharmony_ci SLMIDITempoItf self, 2147523f5352Sopenharmony_ci SLmicrosecond *uspqn 2148523f5352Sopenharmony_ci ); 2149523f5352Sopenharmony_ci}; 2150523f5352Sopenharmony_ci 2151523f5352Sopenharmony_ci 2152523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2153523f5352Sopenharmony_ci/* Midi Time interface */ 2154523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2155523f5352Sopenharmony_ci 2156523f5352Sopenharmony_ci 2157523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_MIDITIME; 2158523f5352Sopenharmony_ci 2159523f5352Sopenharmony_cistruct SLMIDITimeItf_; 2160523f5352Sopenharmony_citypedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf; 2161523f5352Sopenharmony_ci 2162523f5352Sopenharmony_cistruct SLMIDITimeItf_ { 2163523f5352Sopenharmony_ci SLresult (*GetDuration) ( 2164523f5352Sopenharmony_ci SLMIDITimeItf self, 2165523f5352Sopenharmony_ci SLuint32 *pDuration 2166523f5352Sopenharmony_ci ); 2167523f5352Sopenharmony_ci SLresult (*SetPosition) ( 2168523f5352Sopenharmony_ci SLMIDITimeItf self, 2169523f5352Sopenharmony_ci SLuint32 position 2170523f5352Sopenharmony_ci ); 2171523f5352Sopenharmony_ci SLresult (*GetPosition) ( 2172523f5352Sopenharmony_ci SLMIDITimeItf self, 2173523f5352Sopenharmony_ci SLuint32 *pPosition 2174523f5352Sopenharmony_ci ); 2175523f5352Sopenharmony_ci SLresult (*SetLoopPoints) ( 2176523f5352Sopenharmony_ci SLMIDITimeItf self, 2177523f5352Sopenharmony_ci SLuint32 startTick, 2178523f5352Sopenharmony_ci SLuint32 numTicks 2179523f5352Sopenharmony_ci ); 2180523f5352Sopenharmony_ci SLresult (*GetLoopPoints) ( 2181523f5352Sopenharmony_ci SLMIDITimeItf self, 2182523f5352Sopenharmony_ci SLuint32 *pStartTick, 2183523f5352Sopenharmony_ci SLuint32 *pNumTicks 2184523f5352Sopenharmony_ci ); 2185523f5352Sopenharmony_ci}; 2186523f5352Sopenharmony_ci 2187523f5352Sopenharmony_ci 2188523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2189523f5352Sopenharmony_ci/* Audio Decoder Capabilities Interface */ 2190523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2191523f5352Sopenharmony_ci 2192523f5352Sopenharmony_ci/*Audio Codec related defines*/ 2193523f5352Sopenharmony_ci 2194523f5352Sopenharmony_ci#define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001) 2195523f5352Sopenharmony_ci#define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002) 2196523f5352Sopenharmony_ci 2197523f5352Sopenharmony_ci#define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001) 2198523f5352Sopenharmony_ci#define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002) 2199523f5352Sopenharmony_ci#define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003) 2200523f5352Sopenharmony_ci#define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004) 2201523f5352Sopenharmony_ci#define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005) 2202523f5352Sopenharmony_ci#define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006) 2203523f5352Sopenharmony_ci#define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007) 2204523f5352Sopenharmony_ci#define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008) 2205523f5352Sopenharmony_ci 2206523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001) 2207523f5352Sopenharmony_ci 2208523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001) 2209523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002) 2210523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003) 2211523f5352Sopenharmony_ci 2212523f5352Sopenharmony_ci#define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001) 2213523f5352Sopenharmony_ci#define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002) 2214523f5352Sopenharmony_ci#define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003) 2215523f5352Sopenharmony_ci#define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004) 2216523f5352Sopenharmony_ci 2217523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001) 2218523f5352Sopenharmony_ci 2219523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001) 2220523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002) 2221523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003) 2222523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004) 2223523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005) 2224523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006) 2225523f5352Sopenharmony_ci 2226523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001) 2227523f5352Sopenharmony_ci 2228523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001) 2229523f5352Sopenharmony_ci 2230523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001) 2231523f5352Sopenharmony_ci 2232523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001) 2233523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002) 2234523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003) 2235523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004) 2236523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005) 2237523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006) 2238523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007) 2239523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008) 2240523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009) 2241523f5352Sopenharmony_ci#define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A) 2242523f5352Sopenharmony_ci 2243523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001) 2244523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002) 2245523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003) 2246523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004) 2247523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005) 2248523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006) 2249523f5352Sopenharmony_ci#define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007) 2250523f5352Sopenharmony_ci 2251523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001) 2252523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002) 2253523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003) 2254523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004) 2255523f5352Sopenharmony_ci 2256523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001) 2257523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002) 2258523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003) 2259523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004) 2260523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005) 2261523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006) 2262523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007) 2263523f5352Sopenharmony_ci#define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008) 2264523f5352Sopenharmony_ci 2265523f5352Sopenharmony_ci#define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001) 2266523f5352Sopenharmony_ci 2267523f5352Sopenharmony_ci#define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001) 2268523f5352Sopenharmony_ci#define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002) 2269523f5352Sopenharmony_ci#define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003) 2270523f5352Sopenharmony_ci#define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004) 2271523f5352Sopenharmony_ci 2272523f5352Sopenharmony_citypedef struct SLAudioCodecDescriptor_ { 2273523f5352Sopenharmony_ci SLuint32 maxChannels; 2274523f5352Sopenharmony_ci SLuint32 minBitsPerSample; 2275523f5352Sopenharmony_ci SLuint32 maxBitsPerSample; 2276523f5352Sopenharmony_ci SLmilliHertz minSampleRate; 2277523f5352Sopenharmony_ci SLmilliHertz maxSampleRate; 2278523f5352Sopenharmony_ci SLboolean isFreqRangeContinuous; 2279523f5352Sopenharmony_ci SLmilliHertz *pSampleRatesSupported; 2280523f5352Sopenharmony_ci SLuint32 numSampleRatesSupported; 2281523f5352Sopenharmony_ci SLuint32 minBitRate; 2282523f5352Sopenharmony_ci SLuint32 maxBitRate; 2283523f5352Sopenharmony_ci SLboolean isBitrateRangeContinuous; 2284523f5352Sopenharmony_ci SLuint32 *pBitratesSupported; 2285523f5352Sopenharmony_ci SLuint32 numBitratesSupported; 2286523f5352Sopenharmony_ci SLuint32 profileSetting; 2287523f5352Sopenharmony_ci SLuint32 modeSetting; 2288523f5352Sopenharmony_ci} SLAudioCodecDescriptor; 2289523f5352Sopenharmony_ci 2290523f5352Sopenharmony_ci/*Structure used to retrieve the profile and level settings supported by an audio encoder */ 2291523f5352Sopenharmony_ci 2292523f5352Sopenharmony_citypedef struct SLAudioCodecProfileMode_ { 2293523f5352Sopenharmony_ci SLuint32 profileSetting; 2294523f5352Sopenharmony_ci SLuint32 modeSetting; 2295523f5352Sopenharmony_ci} SLAudioCodecProfileMode; 2296523f5352Sopenharmony_ci 2297523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES; 2298523f5352Sopenharmony_ci 2299523f5352Sopenharmony_cistruct SLAudioDecoderCapabilitiesItf_; 2300523f5352Sopenharmony_citypedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf; 2301523f5352Sopenharmony_ci 2302523f5352Sopenharmony_cistruct SLAudioDecoderCapabilitiesItf_ { 2303523f5352Sopenharmony_ci SLresult (*GetAudioDecoders) ( 2304523f5352Sopenharmony_ci SLAudioDecoderCapabilitiesItf self, 2305523f5352Sopenharmony_ci SLuint32 * pNumDecoders , 2306523f5352Sopenharmony_ci SLuint32 *pDecoderIds 2307523f5352Sopenharmony_ci ); 2308523f5352Sopenharmony_ci SLresult (*GetAudioDecoderCapabilities) ( 2309523f5352Sopenharmony_ci SLAudioDecoderCapabilitiesItf self, 2310523f5352Sopenharmony_ci SLuint32 decoderId, 2311523f5352Sopenharmony_ci SLuint32 *pIndex, 2312523f5352Sopenharmony_ci SLAudioCodecDescriptor *pDescriptor 2313523f5352Sopenharmony_ci ); 2314523f5352Sopenharmony_ci}; 2315523f5352Sopenharmony_ci 2316523f5352Sopenharmony_ci 2317523f5352Sopenharmony_ci 2318523f5352Sopenharmony_ci 2319523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2320523f5352Sopenharmony_ci/* Audio Encoder Capabilities Interface */ 2321523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2322523f5352Sopenharmony_ci 2323523f5352Sopenharmony_ci/* Structure used when setting audio encoding parameters */ 2324523f5352Sopenharmony_ci 2325523f5352Sopenharmony_citypedef struct SLAudioEncoderSettings_ { 2326523f5352Sopenharmony_ci SLuint32 encoderId; 2327523f5352Sopenharmony_ci SLuint32 channelsIn; 2328523f5352Sopenharmony_ci SLuint32 channelsOut; 2329523f5352Sopenharmony_ci SLmilliHertz sampleRate; 2330523f5352Sopenharmony_ci SLuint32 bitRate; 2331523f5352Sopenharmony_ci SLuint32 bitsPerSample; 2332523f5352Sopenharmony_ci SLuint32 rateControl; 2333523f5352Sopenharmony_ci SLuint32 profileSetting; 2334523f5352Sopenharmony_ci SLuint32 levelSetting; 2335523f5352Sopenharmony_ci SLuint32 channelMode; 2336523f5352Sopenharmony_ci SLuint32 streamFormat; 2337523f5352Sopenharmony_ci SLuint32 encodeOptions; 2338523f5352Sopenharmony_ci SLuint32 blockAlignment; 2339523f5352Sopenharmony_ci} SLAudioEncoderSettings; 2340523f5352Sopenharmony_ci 2341523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES; 2342523f5352Sopenharmony_ci 2343523f5352Sopenharmony_cistruct SLAudioEncoderCapabilitiesItf_; 2344523f5352Sopenharmony_citypedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf; 2345523f5352Sopenharmony_ci 2346523f5352Sopenharmony_cistruct SLAudioEncoderCapabilitiesItf_ { 2347523f5352Sopenharmony_ci SLresult (*GetAudioEncoders) ( 2348523f5352Sopenharmony_ci SLAudioEncoderCapabilitiesItf self, 2349523f5352Sopenharmony_ci SLuint32 *pNumEncoders , 2350523f5352Sopenharmony_ci SLuint32 *pEncoderIds 2351523f5352Sopenharmony_ci ); 2352523f5352Sopenharmony_ci SLresult (*GetAudioEncoderCapabilities) ( 2353523f5352Sopenharmony_ci SLAudioEncoderCapabilitiesItf self, 2354523f5352Sopenharmony_ci SLuint32 encoderId, 2355523f5352Sopenharmony_ci SLuint32 *pIndex, 2356523f5352Sopenharmony_ci SLAudioCodecDescriptor * pDescriptor 2357523f5352Sopenharmony_ci ); 2358523f5352Sopenharmony_ci}; 2359523f5352Sopenharmony_ci 2360523f5352Sopenharmony_ci 2361523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2362523f5352Sopenharmony_ci/* Audio Encoder Interface */ 2363523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2364523f5352Sopenharmony_ci 2365523f5352Sopenharmony_ci 2366523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_AUDIOENCODER; 2367523f5352Sopenharmony_ci 2368523f5352Sopenharmony_cistruct SLAudioEncoderItf_; 2369523f5352Sopenharmony_citypedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf; 2370523f5352Sopenharmony_ci 2371523f5352Sopenharmony_cistruct SLAudioEncoderItf_ { 2372523f5352Sopenharmony_ci SLresult (*SetEncoderSettings) ( 2373523f5352Sopenharmony_ci SLAudioEncoderItf self, 2374523f5352Sopenharmony_ci SLAudioEncoderSettings *pSettings 2375523f5352Sopenharmony_ci ); 2376523f5352Sopenharmony_ci SLresult (*GetEncoderSettings) ( 2377523f5352Sopenharmony_ci SLAudioEncoderItf self, 2378523f5352Sopenharmony_ci SLAudioEncoderSettings *pSettings 2379523f5352Sopenharmony_ci ); 2380523f5352Sopenharmony_ci}; 2381523f5352Sopenharmony_ci 2382523f5352Sopenharmony_ci 2383523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2384523f5352Sopenharmony_ci/* Bass Boost Interface */ 2385523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2386523f5352Sopenharmony_ci 2387523f5352Sopenharmony_ci 2388523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_BASSBOOST; 2389523f5352Sopenharmony_ci 2390523f5352Sopenharmony_cistruct SLBassBoostItf_; 2391523f5352Sopenharmony_citypedef const struct SLBassBoostItf_ * const * SLBassBoostItf; 2392523f5352Sopenharmony_ci 2393523f5352Sopenharmony_cistruct SLBassBoostItf_ { 2394523f5352Sopenharmony_ci SLresult (*SetEnabled)( 2395523f5352Sopenharmony_ci SLBassBoostItf self, 2396523f5352Sopenharmony_ci SLboolean enabled 2397523f5352Sopenharmony_ci ); 2398523f5352Sopenharmony_ci SLresult (*IsEnabled)( 2399523f5352Sopenharmony_ci SLBassBoostItf self, 2400523f5352Sopenharmony_ci SLboolean *pEnabled 2401523f5352Sopenharmony_ci ); 2402523f5352Sopenharmony_ci SLresult (*SetStrength)( 2403523f5352Sopenharmony_ci SLBassBoostItf self, 2404523f5352Sopenharmony_ci SLpermille strength 2405523f5352Sopenharmony_ci ); 2406523f5352Sopenharmony_ci SLresult (*GetRoundedStrength)( 2407523f5352Sopenharmony_ci SLBassBoostItf self, 2408523f5352Sopenharmony_ci SLpermille *pStrength 2409523f5352Sopenharmony_ci ); 2410523f5352Sopenharmony_ci SLresult (*IsStrengthSupported)( 2411523f5352Sopenharmony_ci SLBassBoostItf self, 2412523f5352Sopenharmony_ci SLboolean *pSupported 2413523f5352Sopenharmony_ci ); 2414523f5352Sopenharmony_ci}; 2415523f5352Sopenharmony_ci 2416523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2417523f5352Sopenharmony_ci/* Pitch Interface */ 2418523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2419523f5352Sopenharmony_ci 2420523f5352Sopenharmony_ci 2421523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_PITCH; 2422523f5352Sopenharmony_ci 2423523f5352Sopenharmony_cistruct SLPitchItf_; 2424523f5352Sopenharmony_citypedef const struct SLPitchItf_ * const * SLPitchItf; 2425523f5352Sopenharmony_ci 2426523f5352Sopenharmony_cistruct SLPitchItf_ { 2427523f5352Sopenharmony_ci SLresult (*SetPitch) ( 2428523f5352Sopenharmony_ci SLPitchItf self, 2429523f5352Sopenharmony_ci SLpermille pitch 2430523f5352Sopenharmony_ci ); 2431523f5352Sopenharmony_ci SLresult (*GetPitch) ( 2432523f5352Sopenharmony_ci SLPitchItf self, 2433523f5352Sopenharmony_ci SLpermille *pPitch 2434523f5352Sopenharmony_ci ); 2435523f5352Sopenharmony_ci SLresult (*GetPitchCapabilities) ( 2436523f5352Sopenharmony_ci SLPitchItf self, 2437523f5352Sopenharmony_ci SLpermille *pMinPitch, 2438523f5352Sopenharmony_ci SLpermille *pMaxPitch 2439523f5352Sopenharmony_ci ); 2440523f5352Sopenharmony_ci}; 2441523f5352Sopenharmony_ci 2442523f5352Sopenharmony_ci 2443523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2444523f5352Sopenharmony_ci/* Rate Pitch Interface */ 2445523f5352Sopenharmony_ci/* RatePitchItf is an interface for controlling the rate a sound is played */ 2446523f5352Sopenharmony_ci/* back. A change in rate will cause a change in pitch. */ 2447523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2448523f5352Sopenharmony_ci 2449523f5352Sopenharmony_ci 2450523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_RATEPITCH; 2451523f5352Sopenharmony_ci 2452523f5352Sopenharmony_cistruct SLRatePitchItf_; 2453523f5352Sopenharmony_citypedef const struct SLRatePitchItf_ * const * SLRatePitchItf; 2454523f5352Sopenharmony_ci 2455523f5352Sopenharmony_cistruct SLRatePitchItf_ { 2456523f5352Sopenharmony_ci SLresult (*SetRate) ( 2457523f5352Sopenharmony_ci SLRatePitchItf self, 2458523f5352Sopenharmony_ci SLpermille rate 2459523f5352Sopenharmony_ci ); 2460523f5352Sopenharmony_ci SLresult (*GetRate) ( 2461523f5352Sopenharmony_ci SLRatePitchItf self, 2462523f5352Sopenharmony_ci SLpermille *pRate 2463523f5352Sopenharmony_ci ); 2464523f5352Sopenharmony_ci SLresult (*GetRatePitchCapabilities) ( 2465523f5352Sopenharmony_ci SLRatePitchItf self, 2466523f5352Sopenharmony_ci SLpermille *pMinRate, 2467523f5352Sopenharmony_ci SLpermille *pMaxRate 2468523f5352Sopenharmony_ci ); 2469523f5352Sopenharmony_ci}; 2470523f5352Sopenharmony_ci 2471523f5352Sopenharmony_ci 2472523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2473523f5352Sopenharmony_ci/* Virtualizer Interface */ 2474523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2475523f5352Sopenharmony_ci 2476523f5352Sopenharmony_ci 2477523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_VIRTUALIZER; 2478523f5352Sopenharmony_ci 2479523f5352Sopenharmony_cistruct SLVirtualizerItf_; 2480523f5352Sopenharmony_citypedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf; 2481523f5352Sopenharmony_ci 2482523f5352Sopenharmony_cistruct SLVirtualizerItf_ { 2483523f5352Sopenharmony_ci SLresult (*SetEnabled)( 2484523f5352Sopenharmony_ci SLVirtualizerItf self, 2485523f5352Sopenharmony_ci SLboolean enabled 2486523f5352Sopenharmony_ci ); 2487523f5352Sopenharmony_ci SLresult (*IsEnabled)( 2488523f5352Sopenharmony_ci SLVirtualizerItf self, 2489523f5352Sopenharmony_ci SLboolean *pEnabled 2490523f5352Sopenharmony_ci ); 2491523f5352Sopenharmony_ci SLresult (*SetStrength)( 2492523f5352Sopenharmony_ci SLVirtualizerItf self, 2493523f5352Sopenharmony_ci SLpermille strength 2494523f5352Sopenharmony_ci ); 2495523f5352Sopenharmony_ci SLresult (*GetRoundedStrength)( 2496523f5352Sopenharmony_ci SLVirtualizerItf self, 2497523f5352Sopenharmony_ci SLpermille *pStrength 2498523f5352Sopenharmony_ci ); 2499523f5352Sopenharmony_ci SLresult (*IsStrengthSupported)( 2500523f5352Sopenharmony_ci SLVirtualizerItf self, 2501523f5352Sopenharmony_ci SLboolean *pSupported 2502523f5352Sopenharmony_ci ); 2503523f5352Sopenharmony_ci}; 2504523f5352Sopenharmony_ci 2505523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2506523f5352Sopenharmony_ci/* Visualization Interface */ 2507523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2508523f5352Sopenharmony_ci 2509523f5352Sopenharmony_ci 2510523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_VISUALIZATION; 2511523f5352Sopenharmony_ci 2512523f5352Sopenharmony_cistruct SLVisualizationItf_; 2513523f5352Sopenharmony_citypedef const struct SLVisualizationItf_ * const * SLVisualizationItf; 2514523f5352Sopenharmony_ci 2515523f5352Sopenharmony_citypedef void (SLAPIENTRY *slVisualizationCallback) ( 2516523f5352Sopenharmony_ci void *pContext, 2517523f5352Sopenharmony_ci const SLuint8 waveform[], 2518523f5352Sopenharmony_ci const SLuint8 fft[], 2519523f5352Sopenharmony_ci SLmilliHertz samplerate 2520523f5352Sopenharmony_ci); 2521523f5352Sopenharmony_ci 2522523f5352Sopenharmony_cistruct SLVisualizationItf_{ 2523523f5352Sopenharmony_ci SLresult (*RegisterVisualizationCallback)( 2524523f5352Sopenharmony_ci SLVisualizationItf self, 2525523f5352Sopenharmony_ci slVisualizationCallback callback, 2526523f5352Sopenharmony_ci void *pContext, 2527523f5352Sopenharmony_ci SLmilliHertz rate 2528523f5352Sopenharmony_ci ); 2529523f5352Sopenharmony_ci SLresult (*GetMaxRate)( 2530523f5352Sopenharmony_ci SLVisualizationItf self, 2531523f5352Sopenharmony_ci SLmilliHertz* pRate 2532523f5352Sopenharmony_ci ); 2533523f5352Sopenharmony_ci}; 2534523f5352Sopenharmony_ci 2535523f5352Sopenharmony_ci 2536523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2537523f5352Sopenharmony_ci/* Engine Interface */ 2538523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2539523f5352Sopenharmony_ci 2540523f5352Sopenharmony_ci 2541523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_ENGINE; 2542523f5352Sopenharmony_ci 2543523f5352Sopenharmony_cistruct SLEngineItf_; 2544523f5352Sopenharmony_citypedef const struct SLEngineItf_ * const * SLEngineItf; 2545523f5352Sopenharmony_ci 2546523f5352Sopenharmony_ci 2547523f5352Sopenharmony_cistruct SLEngineItf_ { 2548523f5352Sopenharmony_ci 2549523f5352Sopenharmony_ci SLresult (*CreateLEDDevice) ( 2550523f5352Sopenharmony_ci SLEngineItf self, 2551523f5352Sopenharmony_ci SLObjectItf * pDevice, 2552523f5352Sopenharmony_ci SLuint32 deviceID, 2553523f5352Sopenharmony_ci SLuint32 numInterfaces, 2554523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2555523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2556523f5352Sopenharmony_ci ); 2557523f5352Sopenharmony_ci SLresult (*CreateVibraDevice) ( 2558523f5352Sopenharmony_ci SLEngineItf self, 2559523f5352Sopenharmony_ci SLObjectItf * pDevice, 2560523f5352Sopenharmony_ci SLuint32 deviceID, 2561523f5352Sopenharmony_ci SLuint32 numInterfaces, 2562523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2563523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2564523f5352Sopenharmony_ci ); 2565523f5352Sopenharmony_ci SLresult (*CreateAudioPlayer) ( 2566523f5352Sopenharmony_ci SLEngineItf self, 2567523f5352Sopenharmony_ci SLObjectItf * pPlayer, 2568523f5352Sopenharmony_ci SLDataSource *pAudioSrc, 2569523f5352Sopenharmony_ci SLDataSink *pAudioSnk, 2570523f5352Sopenharmony_ci SLuint32 numInterfaces, 2571523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2572523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2573523f5352Sopenharmony_ci ); 2574523f5352Sopenharmony_ci SLresult (*CreateAudioRecorder) ( 2575523f5352Sopenharmony_ci SLEngineItf self, 2576523f5352Sopenharmony_ci SLObjectItf * pRecorder, 2577523f5352Sopenharmony_ci SLDataSource *pAudioSrc, 2578523f5352Sopenharmony_ci SLDataSink *pAudioSnk, 2579523f5352Sopenharmony_ci SLuint32 numInterfaces, 2580523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2581523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2582523f5352Sopenharmony_ci ); 2583523f5352Sopenharmony_ci SLresult (*CreateMidiPlayer) ( 2584523f5352Sopenharmony_ci SLEngineItf self, 2585523f5352Sopenharmony_ci SLObjectItf * pPlayer, 2586523f5352Sopenharmony_ci SLDataSource *pMIDISrc, 2587523f5352Sopenharmony_ci SLDataSource *pBankSrc, 2588523f5352Sopenharmony_ci SLDataSink *pAudioOutput, 2589523f5352Sopenharmony_ci SLDataSink *pVibra, 2590523f5352Sopenharmony_ci SLDataSink *pLEDArray, 2591523f5352Sopenharmony_ci SLuint32 numInterfaces, 2592523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2593523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2594523f5352Sopenharmony_ci ); 2595523f5352Sopenharmony_ci SLresult (*CreateListener) ( 2596523f5352Sopenharmony_ci SLEngineItf self, 2597523f5352Sopenharmony_ci SLObjectItf * pListener, 2598523f5352Sopenharmony_ci SLuint32 numInterfaces, 2599523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2600523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2601523f5352Sopenharmony_ci ); 2602523f5352Sopenharmony_ci SLresult (*Create3DGroup) ( 2603523f5352Sopenharmony_ci SLEngineItf self, 2604523f5352Sopenharmony_ci SLObjectItf * pGroup, 2605523f5352Sopenharmony_ci SLuint32 numInterfaces, 2606523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2607523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2608523f5352Sopenharmony_ci ); 2609523f5352Sopenharmony_ci SLresult (*CreateOutputMix) ( 2610523f5352Sopenharmony_ci SLEngineItf self, 2611523f5352Sopenharmony_ci SLObjectItf * pMix, 2612523f5352Sopenharmony_ci SLuint32 numInterfaces, 2613523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2614523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2615523f5352Sopenharmony_ci ); 2616523f5352Sopenharmony_ci SLresult (*CreateMetadataExtractor) ( 2617523f5352Sopenharmony_ci SLEngineItf self, 2618523f5352Sopenharmony_ci SLObjectItf * pMetadataExtractor, 2619523f5352Sopenharmony_ci SLDataSource * pDataSource, 2620523f5352Sopenharmony_ci SLuint32 numInterfaces, 2621523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2622523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2623523f5352Sopenharmony_ci ); 2624523f5352Sopenharmony_ci SLresult (*CreateExtensionObject) ( 2625523f5352Sopenharmony_ci SLEngineItf self, 2626523f5352Sopenharmony_ci SLObjectItf * pObject, 2627523f5352Sopenharmony_ci void * pParameters, 2628523f5352Sopenharmony_ci SLuint32 objectID, 2629523f5352Sopenharmony_ci SLuint32 numInterfaces, 2630523f5352Sopenharmony_ci const SLInterfaceID * pInterfaceIds, 2631523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2632523f5352Sopenharmony_ci ); 2633523f5352Sopenharmony_ci SLresult (*QueryNumSupportedInterfaces) ( 2634523f5352Sopenharmony_ci SLEngineItf self, 2635523f5352Sopenharmony_ci SLuint32 objectID, 2636523f5352Sopenharmony_ci SLuint32 * pNumSupportedInterfaces 2637523f5352Sopenharmony_ci ); 2638523f5352Sopenharmony_ci SLresult (*QuerySupportedInterfaces) ( 2639523f5352Sopenharmony_ci SLEngineItf self, 2640523f5352Sopenharmony_ci SLuint32 objectID, 2641523f5352Sopenharmony_ci SLuint32 index, 2642523f5352Sopenharmony_ci SLInterfaceID * pInterfaceId 2643523f5352Sopenharmony_ci ); 2644523f5352Sopenharmony_ci SLresult (*QueryNumSupportedExtensions) ( 2645523f5352Sopenharmony_ci SLEngineItf self, 2646523f5352Sopenharmony_ci SLuint32 * pNumExtensions 2647523f5352Sopenharmony_ci ); 2648523f5352Sopenharmony_ci SLresult (*QuerySupportedExtension) ( 2649523f5352Sopenharmony_ci SLEngineItf self, 2650523f5352Sopenharmony_ci SLuint32 index, 2651523f5352Sopenharmony_ci SLchar * pExtensionName, 2652523f5352Sopenharmony_ci SLint16 * pNameLength 2653523f5352Sopenharmony_ci ); 2654523f5352Sopenharmony_ci SLresult (*IsExtensionSupported) ( 2655523f5352Sopenharmony_ci SLEngineItf self, 2656523f5352Sopenharmony_ci const SLchar * pExtensionName, 2657523f5352Sopenharmony_ci SLboolean * pSupported 2658523f5352Sopenharmony_ci ); 2659523f5352Sopenharmony_ci}; 2660523f5352Sopenharmony_ci 2661523f5352Sopenharmony_ci 2662523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2663523f5352Sopenharmony_ci/* Engine Capabilities Interface */ 2664523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2665523f5352Sopenharmony_ci 2666523f5352Sopenharmony_ci 2667523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_ENGINECAPABILITIES; 2668523f5352Sopenharmony_ci 2669523f5352Sopenharmony_cistruct SLEngineCapabilitiesItf_; 2670523f5352Sopenharmony_citypedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf; 2671523f5352Sopenharmony_ci 2672523f5352Sopenharmony_cistruct SLEngineCapabilitiesItf_ { 2673523f5352Sopenharmony_ci SLresult (*QuerySupportedProfiles) ( 2674523f5352Sopenharmony_ci SLEngineCapabilitiesItf self, 2675523f5352Sopenharmony_ci SLuint16 *pProfilesSupported 2676523f5352Sopenharmony_ci ); 2677523f5352Sopenharmony_ci SLresult (*QueryAvailableVoices) ( 2678523f5352Sopenharmony_ci SLEngineCapabilitiesItf self, 2679523f5352Sopenharmony_ci SLuint16 voiceType, 2680523f5352Sopenharmony_ci SLint16 *pNumMaxVoices, 2681523f5352Sopenharmony_ci SLboolean *pIsAbsoluteMax, 2682523f5352Sopenharmony_ci SLint16 *pNumFreeVoices 2683523f5352Sopenharmony_ci ); 2684523f5352Sopenharmony_ci SLresult (*QueryNumberOfMIDISynthesizers) ( 2685523f5352Sopenharmony_ci SLEngineCapabilitiesItf self, 2686523f5352Sopenharmony_ci SLint16 *pNumMIDIsynthesizers 2687523f5352Sopenharmony_ci ); 2688523f5352Sopenharmony_ci SLresult (*QueryAPIVersion) ( 2689523f5352Sopenharmony_ci SLEngineCapabilitiesItf self, 2690523f5352Sopenharmony_ci SLint16 *pMajor, 2691523f5352Sopenharmony_ci SLint16 *pMinor, 2692523f5352Sopenharmony_ci SLint16 *pStep 2693523f5352Sopenharmony_ci ); 2694523f5352Sopenharmony_ci SLresult (*QueryLEDCapabilities) ( 2695523f5352Sopenharmony_ci SLEngineCapabilitiesItf self, 2696523f5352Sopenharmony_ci SLuint32 *pIndex, 2697523f5352Sopenharmony_ci SLuint32 *pLEDDeviceID, 2698523f5352Sopenharmony_ci SLLEDDescriptor *pDescriptor 2699523f5352Sopenharmony_ci ); 2700523f5352Sopenharmony_ci SLresult (*QueryVibraCapabilities) ( 2701523f5352Sopenharmony_ci SLEngineCapabilitiesItf self, 2702523f5352Sopenharmony_ci SLuint32 *pIndex, 2703523f5352Sopenharmony_ci SLuint32 *pVibraDeviceID, 2704523f5352Sopenharmony_ci SLVibraDescriptor *pDescriptor 2705523f5352Sopenharmony_ci ); 2706523f5352Sopenharmony_ci SLresult (*IsThreadSafe) ( 2707523f5352Sopenharmony_ci SLEngineCapabilitiesItf self, 2708523f5352Sopenharmony_ci SLboolean *pIsThreadSafe 2709523f5352Sopenharmony_ci ); 2710523f5352Sopenharmony_ci}; 2711523f5352Sopenharmony_ci 2712523f5352Sopenharmony_ci/*---------------------------------------------------------------------------*/ 2713523f5352Sopenharmony_ci/* Thread Sync Interface */ 2714523f5352Sopenharmony_ci/* --------------------------------------------------------------------------*/ 2715523f5352Sopenharmony_ci 2716523f5352Sopenharmony_ci 2717523f5352Sopenharmony_ciextern const SLInterfaceID SL_IID_THREADSYNC; 2718523f5352Sopenharmony_ci 2719523f5352Sopenharmony_cistruct SLThreadSyncItf_; 2720523f5352Sopenharmony_citypedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf; 2721523f5352Sopenharmony_ci 2722523f5352Sopenharmony_ci 2723523f5352Sopenharmony_cistruct SLThreadSyncItf_ { 2724523f5352Sopenharmony_ci SLresult (*EnterCriticalSection) ( 2725523f5352Sopenharmony_ci SLThreadSyncItf self 2726523f5352Sopenharmony_ci ); 2727523f5352Sopenharmony_ci SLresult (*ExitCriticalSection) ( 2728523f5352Sopenharmony_ci SLThreadSyncItf self 2729523f5352Sopenharmony_ci ); 2730523f5352Sopenharmony_ci}; 2731523f5352Sopenharmony_ci 2732523f5352Sopenharmony_ci 2733523f5352Sopenharmony_ci/*****************************************************************************/ 2734523f5352Sopenharmony_ci/* SL engine constructor */ 2735523f5352Sopenharmony_ci/*****************************************************************************/ 2736523f5352Sopenharmony_ci 2737523f5352Sopenharmony_ci#define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001) 2738523f5352Sopenharmony_ci#define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002) 2739523f5352Sopenharmony_ci 2740523f5352Sopenharmony_citypedef struct SLEngineOption_ { 2741523f5352Sopenharmony_ci SLuint32 feature; 2742523f5352Sopenharmony_ci SLuint32 data; 2743523f5352Sopenharmony_ci} SLEngineOption; 2744523f5352Sopenharmony_ci 2745523f5352Sopenharmony_ci 2746523f5352Sopenharmony_ciSLresult SLAPIENTRY slCreateEngine( 2747523f5352Sopenharmony_ci SLObjectItf *pEngine, 2748523f5352Sopenharmony_ci SLuint32 numOptions, 2749523f5352Sopenharmony_ci const SLEngineOption *pEngineOptions, 2750523f5352Sopenharmony_ci SLuint32 numInterfaces, 2751523f5352Sopenharmony_ci const SLInterfaceID *pInterfaceIds, 2752523f5352Sopenharmony_ci const SLboolean * pInterfaceRequired 2753523f5352Sopenharmony_ci); 2754523f5352Sopenharmony_ci 2755523f5352Sopenharmony_ciSLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces( 2756523f5352Sopenharmony_ci SLuint32 * pNumSupportedInterfaces 2757523f5352Sopenharmony_ci); 2758523f5352Sopenharmony_ci 2759523f5352Sopenharmony_ciSLresult SLAPIENTRY slQuerySupportedEngineInterfaces( 2760523f5352Sopenharmony_ci SLuint32 index, 2761523f5352Sopenharmony_ci SLInterfaceID * pInterfaceId 2762523f5352Sopenharmony_ci); 2763523f5352Sopenharmony_ci 2764523f5352Sopenharmony_ci#ifdef __cplusplus 2765523f5352Sopenharmony_ci} /* extern "C" */ 2766523f5352Sopenharmony_ci#endif 2767523f5352Sopenharmony_ci 2768523f5352Sopenharmony_ci#endif /* OPENSL_ES_H_ */ 2769