zenilib: zenilib/jni/external/zenilib/zeni_audio/Zeni/Sound_Renderer_SLES.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Sound_Renderer_SLES.h
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2 * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3 *
4 * zenilib is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * zenilib is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef ZENI_SOUND_RENDERER_SLES_H
19 #define ZENI_SOUND_RENDERER_SLES_H
20
21 #include <Zeni/Sound_Renderer.h>
22
23 #ifdef ENABLE_SLES
24
25 #include <SLES/OpenSLES.h>
26 #ifdef ANDROID
27 #include <SLES/OpenSLES_Android.h>
28 #endif
29
30 namespace Zeni {
31
32 class ZENI_AUDIO_DLL Sound_Renderer_SLES : public Sound_Renderer {
33 friend class Sound;
34
35 Sound_Renderer_SLES();
36 ~Sound_Renderer_SLES();
37
38 // Undefined
39 Sound_Renderer_SLES(const Sound_Renderer_SLES &);
40 Sound_Renderer_SLES & operator=(const Sound_Renderer_SLES &);
41
42 public:
43 #ifdef ENABLE_SLES
44 SLEngineItf & get_engineEngine();
45 SLObjectItf & get_outputMixObject();
46 #endif
47
48 // Listener Functions
49 void set_listener_position(const Point3f &position);
50 void set_listener_velocity(const Vector3f &velocity);
51 void set_listener_forward_and_up(const Vector3f &forward, const Vector3f &up);
52 void set_listener_gain(const float &gain);
53
54 std::pair<Vector3f, Vector3f> get_listener_forward_and_up() const;
55
56 private:
57 // engine interfaces
58 SLObjectItf engineObject;
59 SLEngineItf engineEngine;
60
61 // output mix interfaces
62 SLObjectItf outputMixObject;
63
64 String m_bgmusic;
65 Sound_Buffer *m_bgm;
66 Sound_Source *m_bgm_source;
67 };
68
69 }
70
71 #endif
72
73 #endif
Sound_Renderer.h