Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __SP_AUDIO_SOUNDDEVICE_OPENSLES_H__
00009 #define __SP_AUDIO_SOUNDDEVICE_OPENSLES_H__
00010
00011
00012 #include "Base/spStandard.hpp"
00013
00014 #if defined(SP_COMPILE_WITH_OPENSLES)
00015
00016
00017 #include "SoundSystem/spSoundDevice.hpp"
00018 #include "SoundSystem/OpenSLES/spOpenSLESSound.hpp"
00019
00020
00021 namespace sp
00022 {
00023 namespace audio
00024 {
00025
00026
00027 class SP_EXPORT OpenSLESSoundDevice : public SoundDevice
00028 {
00029
00030 public:
00031
00032 OpenSLESSoundDevice();
00033 ~OpenSLESSoundDevice();
00034
00035
00036
00037 io::stringc getInterface() const;
00038
00039 Sound* createSound();
00040
00041 private:
00042
00043 friend class OpenSLESSound;
00044
00045
00046
00047 bool createSoundEngine();
00048 bool createOutputMixer();
00049
00050 static bool checkForError(
00051 const SLresult Result, const io::stringc &ErrorMessage = "OpenSL|ES audio error"
00052 );
00053
00054 static bool objectRealize(
00055 SLObjectItf &Object, const io::stringc &ObjectName = "OpenSL|ES object"
00056 );
00057 static bool objectGetInterface(
00058 SLObjectItf &Object, const SLInterfaceID ID, void* Interface, const io::stringc &ObjectName = "OpenSL|ES object"
00059 );
00060
00061 static void releaseObject(SLObjectItf &Object);
00062
00063
00064
00065 SLEngineItf Engine_;
00066 SLObjectItf EngineObject_;
00067
00068 SLObjectItf OutputMixer_;
00069 SLEnvironmentalReverbItf EnvReverbInterface_;
00070
00071 };
00072
00073
00074 }
00075
00076 }
00077
00078
00079 #endif
00080
00081 #endif
00082
00083
00084
00085