/*
* Copyright (c) 2007-2009 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and /or associated documentation files (the "Materials "), to
* deal in the Materials without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Materials, and to permit persons to whom the Materials are
* furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE
* MATERIALS.
*
* OpenSLES.h - OpenSL ES version 1.0.1
*
*/
/****************************************************************************/
/* NOTE: This file is a standard OpenSL ES header file and should not be */
/* modified in any way. */
/****************************************************************************/
#ifndef OPENSL_ES_H_
#define OPENSL_ES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "OpenSLES_Platform.h"
/*****************************************************************************/
/* Common types, structures, and defines */
/*****************************************************************************/
#ifndef _KHRONOS_KEYS_
#define _KHRONOS_KEYS_
#define KHRONOS_TITLE "KhronosTitle"
#define KHRONOS_ALBUM "KhronosAlbum"
#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
#define KHRONOS_ARTIST "KhronosArtist"
#define KHRONOS_GENRE "KhronosGenre"
#define KHRONOS_YEAR "KhronosYear"
#define KHRONOS_COMMENT "KhronosComment"
#define KHRONOS_ARTIST_URL "KhronosArtistURL"
#define KHRONOS_CONTENT_URL "KhronosContentURL"
#define KHRONOS_RATING "KhronosRating"
#define KHRONOS_ALBUM_ART "KhronosAlbumArt"
#define KHRONOS_COPYRIGHT "KhronosCopyright"
#endif
/* remap common types to SL types for clarity */
typedef sl_int8_t SLint8; /* 8 bit signed integer */
typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */
typedef sl_int16_t SLint16; /* 16 bit signed integer */
typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */
typedef sl_int32_t SLint32; /* 32 bit signed integer */
typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */
typedef SLuint32 SLboolean;
#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000)
#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001)
typedef SLuint8 SLchar; /* UTF-8 is to be used */
typedef SLint16 SLmillibel;
typedef SLuint32 SLmillisecond;
typedef SLuint32 SLmilliHertz;
typedef SLint32 SLmillimeter;
typedef SLint32 SLmillidegree;
typedef SLint16 SLpermille;
typedef SLuint32 SLmicrosecond;
typedef SLuint32 SLresult;
#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))
#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF)
#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF)
/** Interface ID defined as a UUID */
typedef const struct SLInterfaceID_ {
SLuint32 time_low;
SLuint16 time_mid;
SLuint16 time_hi_and_version;
SLuint16 clock_seq;
SLuint8 node[6];
} * SLInterfaceID;
/* Forward declaration for the object interface */
struct SLObjectItf_;
typedef const struct SLObjectItf_ * const * SLObjectItf;
/* Objects ID's */
#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001)
#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002)
#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003)
#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004)
#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005)
#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006)
#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007)
#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008)
#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009)
#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A)
/* SL Profiles */
#define SL_PROFILES_PHONE ((SLuint16) 0x0001)
#define SL_PROFILES_MUSIC ((SLuint16) 0x0002)
#define SL_PROFILES_GAME ((SLuint16) 0x0004)
/* Types of voices supported by the system */
#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001)
#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002)
#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004)
#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008)
/* Convenient macros representing various different priority levels, for use with the SetPriority method */
#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1))
#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000)
#define SL_PRIORITY_LOW ((SLint32) -0x40000000)
#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000)
#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000)
#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000)
#define SL_PRIORITY_HIGH ((SLint32) 0x40000000)
#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000)
#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF)
/** These macros list the various sample formats that are possible on audio input and output devices. */
#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008)
#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010)
#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014)
#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018)
#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C)
#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020)
/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */
#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000)
#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000)
#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000)
#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000)
#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000)
#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000)
#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000)
#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000)
#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000)
#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000)
#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000)
#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000)
#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000)
#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000)
/*****************************************************************************/
/* Errors