zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Sounds.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 
32 #ifndef ZENI_SOUNDS_H
33 #define ZENI_SOUNDS_H
34 
35 #include <Zeni/Database.h>
36 #include <Zeni/Error.h>
37 #include <Zeni/Sound.h>
38 
39 namespace Zeni {
40 
41  class ZENI_AUDIO_DLL Sounds;
42 
43 #ifdef _WINDOWS
44  ZENI_AUDIO_EXT template class ZENI_AUDIO_DLL Singleton<Sounds>;
45  ZENI_AUDIO_EXT template class ZENI_AUDIO_DLL Database<Sound_Buffer>;
46 #endif
47 
48  class ZENI_AUDIO_DLL Sounds : public Singleton<Sounds>, public Database<Sound_Buffer> {
49  friend class Singleton<Sounds>;
50 
51  static Sounds * create();
52 
53 #ifdef _WINDOWS
54 #pragma warning( push )
55 #pragma warning( disable : 4251 )
56 #endif
57  static Uninit g_uninit;
58  static Reinit g_reinit;
59 #ifdef _WINDOWS
60 #pragma warning( pop )
61 #endif
62 
63  Sounds();
64  ~Sounds();
65 
66  // Undefined
67  Sounds(const Sounds &);
68  Sounds & operator=(const Sounds &);
69 
70  virtual Sound_Buffer * load(XML_Element_c &xml_element, const String &name, const String &filename);
71  };
72 
73  ZENI_AUDIO_DLL Sounds & get_Sounds();
74 
75 }
76 
77 #endif
Sounds & get_Sounds()
Get access to the singleton.
Definition: Sounds.cpp:62
EGLImageKHR EGLint * name
Definition: eglext.h:284
A Sound_Buffer Database Singleton.
Definition: Sounds.h:48
Stores Sound Data.
Definition: Sound_Buffer.h:83