Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::engine::sound::SoundSystem Class Reference

A class that handles the playback, processing, and mixing of sound for an engine context. More...

#include <omEngineSoundSystem.h>

Inheritance diagram for om::engine::sound::SoundSystem:
om::engine::base::EngineSystem

Public Member Functions

 SoundSystem ()
 Create a new sound system with the default state. More...
 
 ~SoundSystem ()
 Destroy a sound system and release all internal resources. More...
 
virtual void update (EngineContext &engine, const Time &dt)
 Update the state of the entities in the specified engine context for the given timestep. More...
 
virtual void addComponent (const ResourceType &type, void *component, EngineContext &engine)
 Update the internal state of the system for a component that was added to the engine. More...
 
virtual void removeComponent (const ResourceType &type, void *component, EngineContext &engine)
 Update the internal state of the system for a component that was removed from the engine. More...
 
- Public Member Functions inherited from om::engine::base::EngineSystem
virtual ~EngineSystem ()
 Destroy a system and release all internal resources. More...
 
virtual void addComponent (const ResourceType &type, void *component, EngineContext &engine)
 Update the internal state of the system for a component that was added to the engine. More...
 
virtual void removeComponent (const ResourceType &type, void *component, EngineContext &engine)
 Update the internal state of the system for a component that was removed from the engine. More...
 
const SystemTypegetType () const
 Return an enum value indicating the semantic type of this engine system. More...
 

Static Public Attributes

static const EventType PLAY_SOUND
 An event indicating that a sound should be played, with value of type SoundPlayback. More...
 
static const EventType PLAYED_SOUND
 An event indicating that a sound was started to be played, with value of type SoundPlaybackID. More...
 
static const EventType STOP_SOUND
 An event indicating that a currently playing sound should be stopped, with value of type SoundPlaybackID. More...
 
static const EventType STOP_ALL_SOUNDS
 An event indicating that all currently playing sounds should be stopped. More...
 
static const EventType PAUSE_SOUND
 An event indicating that a playing sound should be paused, with value of type SoundPlaybackID. More...
 
static const EventType PAUSE_ALL_SOUNDS
 An event indicating that all playing sounds should be paused. More...
 
static const EventType RESUME_SOUND
 An event indicating that a paused sound should be resumed, with value of type SoundPlaybackID. More...
 
static const EventType RESUME_ALL_SOUNDS
 An event indicating that all paused sounds should be resumed. More...
 
static const EventType UPDATE_SOUND
 An event indicating that the playback parameters for a sound should be updated, with value of type SoundPlaybackID. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::engine::base::EngineSystem
 EngineSystem ()
 Create a new engine system with the UNDEFINED system type. More...
 
 EngineSystem (const SystemType &newSystemType)
 Create a new engine system with the specified system type. More...
 

Detailed Description

A class that handles the playback, processing, and mixing of sound for an engine context.

Constructor & Destructor Documentation

om::engine::sound::SoundSystem::SoundSystem ( )

Create a new sound system with the default state.

om::engine::sound::SoundSystem::~SoundSystem ( )

Destroy a sound system and release all internal resources.

Member Function Documentation

virtual void om::engine::sound::SoundSystem::update ( EngineContext engine,
const Time dt 
)
virtual

Update the state of the entities in the specified engine context for the given timestep.

Reimplemented from om::engine::base::EngineSystem.

virtual void om::engine::sound::SoundSystem::addComponent ( const ResourceType &  type,
void *  component,
EngineContext engine 
)
virtual

Update the internal state of the system for a component that was added to the engine.

virtual void om::engine::sound::SoundSystem::removeComponent ( const ResourceType &  type,
void *  component,
EngineContext engine 
)
virtual

Update the internal state of the system for a component that was removed from the engine.

Member Data Documentation

const EventType om::engine::sound::SoundSystem::PLAY_SOUND
static

An event indicating that a sound should be played, with value of type SoundPlayback.

The value object contains parameters for the sound that should be played.

const EventType om::engine::sound::SoundSystem::PLAYED_SOUND
static

An event indicating that a sound was started to be played, with value of type SoundPlaybackID.

The value object contains the ID of the playing sound so that it can be referenced later.

const EventType om::engine::sound::SoundSystem::STOP_SOUND
static

An event indicating that a currently playing sound should be stopped, with value of type SoundPlaybackID.

The value object contains the ID of the sound that should be stopped. The stopped sound is completely removed from the playback system.

const EventType om::engine::sound::SoundSystem::STOP_ALL_SOUNDS
static

An event indicating that all currently playing sounds should be stopped.

All sounds are removed from playback and cannot be resumed.

const EventType om::engine::sound::SoundSystem::PAUSE_SOUND
static

An event indicating that a playing sound should be paused, with value of type SoundPlaybackID.

The value object contains the ID of the sound that should be paused. The paused sound is temporarily stopped from playback, but can be resumed using a RESUME_SOUND event.

const EventType om::engine::sound::SoundSystem::PAUSE_ALL_SOUNDS
static

An event indicating that all playing sounds should be paused.

All currently playing sounds that the system manages are temporarily paused.

const EventType om::engine::sound::SoundSystem::RESUME_SOUND
static

An event indicating that a paused sound should be resumed, with value of type SoundPlaybackID.

The value object contains the ID of the sound that should be resumed. The sound continues playback from the position where it was previously paused.

const EventType om::engine::sound::SoundSystem::RESUME_ALL_SOUNDS
static

An event indicating that all paused sounds should be resumed.

All currently paused sounds that the system manages are resumed for playback from the position where they were previously paused.

const EventType om::engine::sound::SoundSystem::UPDATE_SOUND
static

An event indicating that the playback parameters for a sound should be updated, with value of type SoundPlaybackID.

The value object contains the ID of the sound that should be resumed. The sound continues playback from the position where it was previously paused.


The documentation for this class was generated from the following file: