Spinning Topp Logo BlackTopp Studios
inc
soundscapemanager.cpp
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU 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  The Mezzanine Engine 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 General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 #ifndef _audiosoundscapemanager_cpp
41 #define _audiosoundscapemanager_cpp
42 
43 #include "Audio/soundscapemanager.h"
44 
45 namespace Mezzanine
46 {
47  namespace Audio
48  {
50  WorldManager(Creator)
51  { }
52 
54  WorldManager(Creator)
55  { }
56 
58  { }
59 
60  ///////////////////////////////////////////////////////////////////////////////
61  // Utility
62 
63  ///////////////////////////////////////////////////////////////////////////////
64  // Listener Management
65 
66  ///////////////////////////////////////////////////////////////////////////////
67  // Proxy Management
68 
69  ///////////////////////////////////////////////////////////////////////////////
70  // Convenience Creation Methods
71 
73  { return this->CreateSoundProxy(Audio::ST_Ambient,AddToWorld); }
75  { return this->CreateSoundProxy(Audio::ST_Dialog,AddToWorld); }
77  { return this->CreateSoundProxy(Audio::ST_Effect,AddToWorld); }
79  { return this->CreateSoundProxy(Audio::ST_Music,AddToWorld); }
80 
82  { return this->CreateSoundProxy(Audio::ST_Ambient,Stream,Encode,AddToWorld); }
84  { return this->CreateSoundProxy(Audio::ST_Dialog,Stream,Encode,AddToWorld); }
86  { return this->CreateSoundProxy(Audio::ST_Effect,Stream,Encode,AddToWorld); }
88  { return this->CreateSoundProxy(Audio::ST_Music,Stream,Encode,AddToWorld); }
89 
91  { return this->CreateSoundProxy(Audio::ST_Ambient,Stream,Frequency,Config,AddToWorld); }
93  { return this->CreateSoundProxy(Audio::ST_Dialog,Stream,Frequency,Config,AddToWorld); }
95  { return this->CreateSoundProxy(Audio::ST_Effect,Stream,Frequency,Config,AddToWorld); }
97  { return this->CreateSoundProxy(Audio::ST_Music,Stream,Frequency,Config,AddToWorld); }
98 
99  SoundProxy* SoundScapeManager::CreateAmbientSoundProxy(const String& FileName, const String& Group, const Boole AddToWorld)
100  { return this->CreateSoundProxy(Audio::ST_Ambient,FileName,Group,AddToWorld); }
101  SoundProxy* SoundScapeManager::CreateDialogSoundProxy(const String& FileName, const String& Group, const Boole AddToWorld)
102  { return this->CreateSoundProxy(Audio::ST_Dialog,FileName,Group,AddToWorld); }
103  SoundProxy* SoundScapeManager::CreateEffectSoundProxy(const String& FileName, const String& Group, const Boole AddToWorld)
104  { return this->CreateSoundProxy(Audio::ST_Effect,FileName,Group,AddToWorld); }
105  SoundProxy* SoundScapeManager::CreateMusicSoundProxy(const String& FileName, const String& Group, const Boole AddToWorld)
106  { return this->CreateSoundProxy(Audio::ST_Music,FileName,Group,AddToWorld); }
107 
108  SoundProxy* SoundScapeManager::CreateAmbientSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const Audio::Encoding Encode, const Boole AddToWorld)
109  { return this->CreateSoundProxy(Audio::ST_Ambient,StreamName,Buffer,Length,Encode,AddToWorld); }
110  SoundProxy* SoundScapeManager::CreateDialogSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const Audio::Encoding Encode, const Boole AddToWorld)
111  { return this->CreateSoundProxy(Audio::ST_Dialog,StreamName,Buffer,Length,Encode,AddToWorld); }
112  SoundProxy* SoundScapeManager::CreateEffectSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const Audio::Encoding Encode, const Boole AddToWorld)
113  { return this->CreateSoundProxy(Audio::ST_Effect,StreamName,Buffer,Length,Encode,AddToWorld); }
114  SoundProxy* SoundScapeManager::CreateMusicSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const Audio::Encoding Encode, const Boole AddToWorld)
115  { return this->CreateSoundProxy(Audio::ST_Music,StreamName,Buffer,Length,Encode,AddToWorld); }
116 
117  SoundProxy* SoundScapeManager::CreateAmbientSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const UInt32 Frequency, const Audio::BitConfig Config, const Boole AddToWorld)
118  { return this->CreateSoundProxy(Audio::ST_Ambient,StreamName,Buffer,Length,Frequency,Config,AddToWorld); }
119  SoundProxy* SoundScapeManager::CreateDialogSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const UInt32 Frequency, const Audio::BitConfig Config, const Boole AddToWorld)
120  { return this->CreateSoundProxy(Audio::ST_Dialog,StreamName,Buffer,Length,Frequency,Config,AddToWorld); }
121  SoundProxy* SoundScapeManager::CreateEffectSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const UInt32 Frequency, const Audio::BitConfig Config, const Boole AddToWorld)
122  { return this->CreateSoundProxy(Audio::ST_Effect,StreamName,Buffer,Length,Frequency,Config,AddToWorld); }
123  SoundProxy* SoundScapeManager::CreateMusicSoundProxy(const String& StreamName, Char8* Buffer, const UInt32 Length, const UInt32 Frequency, const Audio::BitConfig Config, const Boole AddToWorld)
124  { return this->CreateSoundProxy(Audio::ST_Music,StreamName,Buffer,Length,Frequency,Config,AddToWorld); }
125 
126  ///////////////////////////////////////////////////////////////////////////////
127  // Inherited from Managerbase
128 
130  { return ManagerBase::MT_SoundScapeManager; }
131  }//Audio
132 }//Mezzanine
133 
134 #endif
virtual SoundProxy * CreateSoundProxy(const UInt16 Type, const Boole AddToWorld)=0
Creates a blank SoundProxy without a stream attached to it.
This is a proxy class for representing a sound being played in 3D space.
Definition: soundproxy.h:57
virtual SoundProxy * CreateAmbientSoundProxy(const Boole AddToWorld)
Creates a blank Ambient SoundProxy without a stream attached to it.
virtual SoundProxy * CreateDialogSoundProxy(const Boole AddToWorld)
Creates a blank Dialog SoundProxy without a stream attached to it.
bool Boole
Generally acts a single bit, true or false.
Definition: datatypes.h:173
ManagerType
A listing of Manager Types.
Definition: managerbase.h:65
Various effects such as objects colliding, explosions, guns firing, etc.
Environmental sounds. Bird's chirping, water washing against rocks, etc.
A simple reference counting pointer.
Definition: countedptr.h:70
Self explanitory. The game SoundTrack.
virtual ManagerType GetInterfaceType() const
This returns the type of this manager.
char Char8
A datatype to represent one character.
Definition: datatypes.h:169
A light-weight handle for manipulating nodes in DOM tree.
Definition: node.h:89
uint32_t UInt32
An 32-bit unsigned integer.
Definition: datatypes.h:126
virtual SoundProxy * CreateEffectSoundProxy(const Boole AddToWorld)
Creates a blank Effect SoundProxy without a stream attached to it.
This is the base class for all managers that belong to a single world instance.
Definition: worldmanager.h:55
SoundScapeManager(World *Creator)
Class constructor.
Encoding
The encoding to use when reading or writing an audio buffer.
Character sounds and speech.
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
This class represents a world for objects to interact within.
Definition: world.h:74
virtual ~SoundScapeManager()
Class destructor.
virtual SoundProxy * CreateMusicSoundProxy(const Boole AddToWorld)
Creates a blank Music SoundProxy without a stream attached to it.
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159
BitConfig
Used to describe the different bit configurations supported by this audio system. ...