This is simply a place for storing all the Sound utilities and functions. More...
#include <audiomanager.h>
Public Member Functions | |
| AudioManager (bool DefaultSettings=true) | |
| Class Constructor. | |
| virtual | ~AudioManager () |
| Class Destructor. | |
| virtual void | AddSoundToSoundSet (const String &SoundSetName, Audio::Sound *SoundInst) |
| Add's a sound to the defined set. | |
| virtual void | ClearLogs () |
| This empties logs that the audio subystem creates. | |
| virtual Audio::Sound * | CreateAmbientSound (ConstString &SoundName, ConstString &FileName, ConstString &Group) |
| Creates an ambient sound instance from a file that can be used to play sounds. | |
| virtual Audio::Sound * | CreateDialogSound (ConstString &SoundName, ConstString &FileName, ConstString &Group) |
| Creates an dialog sound instance from a file that can be used to play sounds. | |
| virtual Audio::Sound * | CreateEffectSound (ConstString &SoundName, ConstString &FileName, ConstString &Group) |
| Creates an effect sound instance from a file that can be used to play sounds. | |
| virtual Audio::Sound * | CreateMusicSound (ConstString &SoundName, ConstString &FileName, ConstString &Group) |
| Creates an music sound instance from a file that can be used to play sounds. | |
| virtual Audio::SoundSet * | CreateSoundSet (const String &SoundSetName) |
| Creates a sound set. | |
| virtual void | DestroyAllSounds () |
| Deletes all stored sounds. | |
| virtual void | DestroySound (Audio::Sound *ToBeDestroyed) |
| Deletes a Sound. | |
| virtual void | DoMainLoopItems () |
| virtual Real | GetAmbientVolume () const |
| Gets the currently set Ambient volume. | |
| virtual Whole | GetAvailableDeviceCount () const |
| Gets the number of available devices. | |
| virtual String | GetAvailableDeviceNameByIndex (const Whole &Index) const |
| Gets the name of an available device. | |
| virtual cAudio::IAudioManager * | GetcAudioManager () const |
| Gets the internal cAudioManager this manager is based on. | |
| virtual String | GetDefaultDeviceName () const |
| Gets the name of the default device. | |
| virtual Real | GetDialogVolume () const |
| Gets the currently set Dialog volume. | |
| virtual Real | GetEffectVolume () const |
| Gets the currently set Effect volume. | |
| virtual Audio::Listener * | GetListener () const |
| Retrieve's the listener for this sound manager. | |
| virtual std::stringstream * | GetLogs () const |
| This gets the logs that the audio subystem creates. | |
| virtual Real | GetMasterVolume () const |
| Gets the currently set Master volume. | |
| virtual Audio::MusicPlayer * | GetMusicPlayer () const |
| Gets the Music Player for this sound manager. | |
| virtual Real | GetMusicVolume () const |
| Gets the currently set Music volume. | |
| virtual Audio::Sound * | GetSoundByName (const String &SoundName) const |
| Gets a sound by it's name. | |
| virtual Audio::SoundSet * | GetSoundSet (const String &SoundSetName) const |
| Gets an existing sound set. | |
| virtual ManagerBase::ManagerTypeName | GetType () const |
| virtual void | Initialize () |
| virtual void | InitializeManager (ConstString &DeviceName, int OutputFrequency=-1, int EAXEffectSlots=4) |
| Initializes the Manager. | |
| virtual bool | IsMuted () const |
| Gets whether or not the Audio subsystem is muted. | |
| virtual void | Mute (bool Enable) |
| Sets whether or not to mute all Audio. | |
| virtual void | SetAmbientVolume (const Real &Ambient) |
| Sets the volume for all stored Ambient sounds. | |
| virtual void | SetDialogVolume (const Real &Dialog) |
| Sets the volume for all stored Dialog sounds. | |
| virtual void | SetEffectVolume (const Real &Effect) |
| Sets the volume for all stored Effect sounds. | |
| virtual void | SetMasterVolume (const Real &Master) |
| Sets the volume for all stored sounds. | |
| virtual void | SetMusicVolume (const Real &Music) |
| Sets the volume for all stored Music sounds. | |
| virtual void | UpdateAllVolumes () |
| Calls on all sounds stored in this manager to update their volume after a settings change. | |
Protected Attributes | |
| std::vector< Audio::Sound * > | AmbientSounds |
| Real | AmbientVolume |
| cAudio::IAudioManager * | cAudioManager |
| std::vector< Audio::Sound * > | DialogSounds |
| Real | DialogVolume |
| std::vector< Audio::Sound * > | EffectSounds |
| Real | EffectVolume |
| Audio::Listener * | Listener |
| Real | MasterVolume |
| Audio::MusicPlayer * | MusicPlayer |
| std::vector< Audio::Sound * > | MusicSounds |
| Real | MusicVolume |
| bool | Muted |
| Real | MuteStandby |
| std::map< String, Audio::Sound * > | Sounds |
|
std::map< String, Audio::SoundSet * > | SoundSets |
This is simply a place for storing all the Sound utilities and functions.
This is a place for loading, storing, and running sound files as necessary in a given game.
Definition at line 77 of file audiomanager.h.
| Mezzanine::AudioManager::AudioManager | ( | bool | DefaultSettings = true | ) |
Class Constructor.
This is the class constructor. It gives you the option to start up the manager with default values if you choose. If not then you'll need to setup and initialize the manager yourself after it is constructed.
| DefaultSettings | Whether or not to load default settings and initialize the manager immediately. |
Definition at line 55 of file audiomanager.cpp.
| Mezzanine::AudioManager::~AudioManager | ( | ) | [virtual] |
| void Mezzanine::AudioManager::AddSoundToSoundSet | ( | const String & | SoundSetName, |
| Audio::Sound * | SoundInst | ||
| ) | [virtual] |
Add's a sound to the defined set.
This function will add a sound instance to a created sound set.
| SoundName | The sound instance to be added. |
Definition at line 151 of file audiomanager.cpp.
| void Mezzanine::AudioManager::ClearLogs | ( | ) | [virtual] |
This empties logs that the audio subystem creates.
Internally the Mezzanine engine currently uses cAudio to process 3d sound. It has it's own logging system that we have customized to work with our logger. This clears that data allow us to work with it as we need
Definition at line 277 of file audiomanager.cpp.
| Audio::Sound * Mezzanine::AudioManager::CreateAmbientSound | ( | ConstString & | SoundName, |
| ConstString & | FileName, | ||
| ConstString & | Group | ||
| ) | [virtual] |
Creates an ambient sound instance from a file that can be used to play sounds.
| SoundName | The name of the Sound instance. |
| FileName | The name of the file. |
| Group | The resource group in which the file resides. |
Definition at line 75 of file audiomanager.cpp.
| Audio::Sound * Mezzanine::AudioManager::CreateDialogSound | ( | ConstString & | SoundName, |
| ConstString & | FileName, | ||
| ConstString & | Group | ||
| ) | [virtual] |
Creates an dialog sound instance from a file that can be used to play sounds.
| SoundName | The name of the Sound instance. |
| FileName | The name of the file. |
| Group | The resource group in which the file resides. |
Definition at line 83 of file audiomanager.cpp.
| Audio::Sound * Mezzanine::AudioManager::CreateEffectSound | ( | ConstString & | SoundName, |
| ConstString & | FileName, | ||
| ConstString & | Group | ||
| ) | [virtual] |
Creates an effect sound instance from a file that can be used to play sounds.
| SoundName | The name of the Sound instance. |
| FileName | The name of the file. |
| Group | The resource group in which the file resides. |
Definition at line 91 of file audiomanager.cpp.
| Audio::Sound * Mezzanine::AudioManager::CreateMusicSound | ( | ConstString & | SoundName, |
| ConstString & | FileName, | ||
| ConstString & | Group | ||
| ) | [virtual] |
Creates an music sound instance from a file that can be used to play sounds.
| SoundName | The name of the Sound instance. |
| FileName | The name of the file. |
| Group | The resource group in which the file resides. |
Definition at line 99 of file audiomanager.cpp.
| Audio::SoundSet * Mezzanine::AudioManager::CreateSoundSet | ( | const String & | SoundSetName | ) | [virtual] |
Creates a sound set.
This function will create a sound set vector you can use to store similiar sound instances.
| SoundSetName | The name you wish the sound set to have. |
Definition at line 137 of file audiomanager.cpp.
| void Mezzanine::AudioManager::DestroySound | ( | Audio::Sound * | ToBeDestroyed | ) | [virtual] |
Deletes a Sound.
| SoundName | A pointer to the Sound you want deleted. |
Definition at line 114 of file audiomanager.cpp.
| void Mezzanine::AudioManager::DoMainLoopItems | ( | ) | [virtual] |
The main loop calls this once per frame.
This is where each manager is expected to put anything that needs to be run each iteration of the main loop
Implements Mezzanine::ManagerBase.
Definition at line 305 of file audiomanager.cpp.
| Real Mezzanine::AudioManager::GetAmbientVolume | ( | ) | const [virtual] |
Gets the currently set Ambient volume.
Definition at line 166 of file audiomanager.cpp.
| Whole Mezzanine::AudioManager::GetAvailableDeviceCount | ( | ) | const [virtual] |
Gets the number of available devices.
This function will return the total number of available devices, including the default.
Definition at line 267 of file audiomanager.cpp.
| String Mezzanine::AudioManager::GetAvailableDeviceNameByIndex | ( | const Whole & | Index | ) | const [virtual] |
Gets the name of an available device.
This function will retrieve the name of a device by it's index on the sound managers device list.
| Index | The position on the device list you wish to access the name of. |
Definition at line 253 of file audiomanager.cpp.
| cAudio::IAudioManager * Mezzanine::AudioManager::GetcAudioManager | ( | ) | const [virtual] |
Gets the internal cAudioManager this manager is based on.
Definition at line 297 of file audiomanager.cpp.
| String Mezzanine::AudioManager::GetDefaultDeviceName | ( | ) | const [virtual] |
Gets the name of the default device.
This function will return the name of the system default device.
Definition at line 260 of file audiomanager.cpp.
| Real Mezzanine::AudioManager::GetDialogVolume | ( | ) | const [virtual] |
Gets the currently set Dialog volume.
Definition at line 180 of file audiomanager.cpp.
| Real Mezzanine::AudioManager::GetEffectVolume | ( | ) | const [virtual] |
Gets the currently set Effect volume.
Definition at line 194 of file audiomanager.cpp.
| Audio::Listener * Mezzanine::AudioManager::GetListener | ( | ) | const [virtual] |
Retrieve's the listener for this sound manager.
This function will return the listener for this manager which can be used to help create 3D sound.
Definition at line 287 of file audiomanager.cpp.
| std::stringstream * Mezzanine::AudioManager::GetLogs | ( | ) | const [virtual] |
This gets the logs that the audio subystem creates.
Internally the Mezzanine engine currently uses cAudio to process 3d sound. It has it's own logging system that we have customized to work with our logger.
Definition at line 272 of file audiomanager.cpp.
| Real Mezzanine::AudioManager::GetMasterVolume | ( | ) | const [virtual] |
Gets the currently set Master volume.
Definition at line 219 of file audiomanager.cpp.
| Audio::MusicPlayer * Mezzanine::AudioManager::GetMusicPlayer | ( | ) | const [virtual] |
Gets the Music Player for this sound manager.
Definition at line 292 of file audiomanager.cpp.
| Real Mezzanine::AudioManager::GetMusicVolume | ( | ) | const [virtual] |
Gets the currently set Music volume.
Definition at line 208 of file audiomanager.cpp.
| Audio::Sound * Mezzanine::AudioManager::GetSoundByName | ( | const String & | SoundName | ) | const [virtual] |
Gets a sound by it's name.
Definition at line 107 of file audiomanager.cpp.
| Audio::SoundSet * Mezzanine::AudioManager::GetSoundSet | ( | const String & | SoundSetName | ) | const [virtual] |
Gets an existing sound set.
This function will find the specified sound set and return a pointer to it.
| SoundSetName | The name of the sound set to retrieve. |
Definition at line 144 of file audiomanager.cpp.
| ManagerBase::ManagerTypeName Mezzanine::AudioManager::GetType | ( | ) | const [virtual] |
This returns the type of this manager.
This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.
Implements Mezzanine::ManagerBase.
Definition at line 308 of file audiomanager.cpp.
| void Mezzanine::AudioManager::Initialize | ( | ) | [virtual] |
Configure Items requiring other Managers.
If you are using the Mezzanine::World this is called when Mezzanine::World::GameInit() is called. It is expected that by the time this is called either ManagerBase::ManagerBase(World*) or ManagerBase::SetGameWorld(World*) will have been called. This is where all configuration that requires atleast one other manager on the Mezzanine::World to exist.
Yes we know it is spelled wrong, but are Zs cooler anyway.
Implements Mezzanine::ManagerBase.
Definition at line 302 of file audiomanager.cpp.
| void Mezzanine::AudioManager::InitializeManager | ( | ConstString & | DeviceName, |
| int | OutputFrequency = -1, |
||
| int | EAXEffectSlots = 4 |
||
| ) | [virtual] |
Initializes the Manager.
This function will initialize the manager using the device and parameters provided. You need to call this function if you passed false into the sound manager constructor before you can use the manager.
| DeviceName | The name of the device you wish to have this manager interface with/use. |
| OutputFrequency | Frequency of the output audio, -1 for the devices default. |
| EAXEffectSlots | The number of effects per sound allowed to be applied. |
Definition at line 282 of file audiomanager.cpp.
| bool Mezzanine::AudioManager::IsMuted | ( | ) | const [virtual] |
Gets whether or not the Audio subsystem is muted.
Definition at line 240 of file audiomanager.cpp.
| void Mezzanine::AudioManager::Mute | ( | bool | Enable | ) | [virtual] |
Sets whether or not to mute all Audio.
| Enable | Whether or not all sounds should be muted. |
Definition at line 224 of file audiomanager.cpp.
| void Mezzanine::AudioManager::SetAmbientVolume | ( | const Real & | Ambient | ) | [virtual] |
Sets the volume for all stored Ambient sounds.
| Ambient | The volume to apply to all Ambient sounds. |
Definition at line 157 of file audiomanager.cpp.
| void Mezzanine::AudioManager::SetDialogVolume | ( | const Real & | Dialog | ) | [virtual] |
Sets the volume for all stored Dialog sounds.
| Dialog | The volume to apply to all Dialog sounds. |
Definition at line 171 of file audiomanager.cpp.
| void Mezzanine::AudioManager::SetEffectVolume | ( | const Real & | Effect | ) | [virtual] |
Sets the volume for all stored Effect sounds.
| Effect | The volume to apply to all Effect sounds. |
Definition at line 185 of file audiomanager.cpp.
| void Mezzanine::AudioManager::SetMasterVolume | ( | const Real & | Master | ) | [virtual] |
Sets the volume for all stored sounds.
| Music | The volume to apply to all sounds. |
Definition at line 213 of file audiomanager.cpp.
| void Mezzanine::AudioManager::SetMusicVolume | ( | const Real & | Music | ) | [virtual] |
Sets the volume for all stored Music sounds.
| Music | The volume to apply to all Music sounds. |
Definition at line 199 of file audiomanager.cpp.
| void Mezzanine::AudioManager::UpdateAllVolumes | ( | ) | [virtual] |
Calls on all sounds stored in this manager to update their volume after a settings change.
Definition at line 245 of file audiomanager.cpp.
1.7.3