]> git.mxchange.org Git - simgear.git/blob - simgear/sound/soundmgr_openal_private.hxx
cppbind: automatic conversion of SGReferenced derived pointers.
[simgear.git] / simgear / sound / soundmgr_openal_private.hxx
1 // soundmgr_openal_prviate.hxx -- Implementation details of the soung manager
2 //
3 // Sound manager initially written by David Findlay
4 // <david_j_findlay@yahoo.com.au> 2001
5 //
6 // C++-ified by Curtis Olson, started March 2001.
7 // Modified for the new SoundSystem by Erik Hofman, October 2009
8 //
9 // Copyright (C) 2001  Curtis L. Olson - http://www.flightgear.org/~curt
10 // Copyright (C) 2009 Erik Hofman <erik@ehofman.com>
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License as
14 // published by the Free Software Foundation; either version 2 of the
15 // License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 // General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
25 //
26 // $Id$
27
28
29 #ifndef _SG_SOUNDMGR_OPENAL_PRIVATE_HXX
30 #define _SG_SOUNDMGR_OPENAL_PRIVATE_HXX 1
31
32 #include <string>
33 #include <vector>
34 #include <map>
35
36 #if defined(__APPLE__)
37 # include <OpenAL/al.h>
38 # include <OpenAL/alc.h>
39 #elif defined(OPENALSDK)
40 # include <al.h>
41 # include <alc.h>
42 #else
43 # include <AL/al.h>
44 # include <AL/alc.h>
45 #endif
46
47 struct refUint {
48     unsigned int refctr;
49     ALuint id;
50
51     refUint() { refctr = 0; id = (ALuint)-1; };
52     refUint(ALuint i) { refctr = 1; id = i; };
53     ~refUint() {};
54 };
55
56 typedef std::map < std::string, refUint > buffer_map;
57 typedef buffer_map::iterator buffer_map_iterator;
58 typedef buffer_map::const_iterator  const_buffer_map_iterator;
59
60 typedef std::map < std::string, SGSharedPtr<SGSampleGroup> > sample_group_map;
61 typedef sample_group_map::iterator sample_group_map_iterator;
62 typedef sample_group_map::const_iterator const_sample_group_map_iterator;
63
64 #endif // _SG_SOUNDMGR_OPENAL_PRIVATE_HXX
65
66