OSDL::Rendering::AudioRenderer Class Reference

#include <OSDLAudioRenderer.h>

Inheritance diagram for OSDL::Rendering::AudioRenderer:

[legend]
Collaboration diagram for OSDL::Rendering::AudioRenderer:
[legend]
List of all members.

Detailed Description

This basic audio renderer manages the sound rendering of all registered views.

Its rendering is mainly triggered by the root renderer, if it exists and if this audio renderer has been registered to this root renderer.

Specialized audio renderers can take in charge for example sound propagation, multi-channel output and points of perception.

See also:
Ceylan::View

Definition at line 40 of file OSDLAudioRenderer.h.

Public Member Functions

 AudioRenderer (bool registerToRootRenderer=true) throw ( RenderingException )
 Constructs a new audio renderer.
virtual ~AudioRenderer () throw ()
 Virtual destructor, no view is destroyed.
virtual void render (Events::RenderingTick currentRenderingTick=0) throw ()
 Triggers the actual audio rendering of all views, for specified rendering tick, if any.
virtual void onRenderingSkipped (Events::RenderingTick skippedRenderingTick) throw ()
 Allows the audio renderer to be aware that a rendering step has to be skipped.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const throw ()
 Returns an user-friendly description of the state of this object.

Static Public Member Functions

static bool HasExistingRootRenderer () throw ()
 Tells whether a root renderer is available.
static RendererGetExistingRootRenderer () throw ( RenderingException )
 Returns the one and only one root renderer instance that may be already available.
static void DeleteExistingRootRenderer () throw ( RenderingException )
 Deletes the existing root renderer.
static void DeleteRootRenderer () throw ()
 Deletes the root renderer, if any.

Protected Attributes

RenderCount _renderingDone
 Counts the number of renderings achieved.
RenderCount _renderingSkipped
 Counts the number of renderings skipped.
Events::RenderingTick _lastRender
 Records the last rendering tick.

Private Member Functions

 AudioRenderer (const AudioRenderer &source) throw ()
 Copy constructor made private to ensure that it will be never called.
AudioRendereroperator= (const AudioRenderer &source) throw ()
 Assignment operator made private to ensure that it will be never called.


Constructor & Destructor Documentation

AudioRenderer::AudioRenderer ( bool  registerToRootRenderer = true  )  throw ( RenderingException ) [explicit]

Constructs a new audio renderer.

Parameters:
registerToRootRenderer iff true, this audio renderer will register itself automatically to the root renderer, which must implement the MultimediaRenderer interface so that this audio renderer can be plugged.
Exceptions:
RenderingException if registerToRootRenderer is true and no root renderer is available, or if the root renderer is not able to register audio renderers (which means it is not a Multimedia renderer).
See also:
MultimediaRenderer

Definition at line 31 of file OSDLAudioRenderer.cc.

AudioRenderer::~AudioRenderer (  )  throw () [virtual]

Virtual destructor, no view is destroyed.

Definition at line 74 of file OSDLAudioRenderer.cc.

OSDL::Rendering::AudioRenderer::AudioRenderer ( const AudioRenderer source  )  throw () [private]

Copy constructor made private to ensure that it will be never called.

The compiler should complain whenever this undefined constructor is called, implicitly or not.


Member Function Documentation

void AudioRenderer::render ( Events::RenderingTick  currentRenderingTick = 0  )  throw () [virtual]

Triggers the actual audio rendering of all views, for specified rendering tick, if any.

Parameters:
currentRenderingTick the rendering tick corresponding to this render step. If the renderer is called from a basic event loop (no scheduler is used), then the rendering tick is meaningless and is always zero.

Reimplemented from OSDL::Rendering::Renderer.

Definition at line 106 of file OSDLAudioRenderer.cc.

References OSDL_AUDIO_RENDER_LOG.

void AudioRenderer::onRenderingSkipped ( Events::RenderingTick  skippedRenderingTick  )  throw () [virtual]

Allows the audio renderer to be aware that a rendering step has to be skipped.

It may be a chance of it to trigger counter-measures, such as decreasing the level of detail in order not to slow down the whole process.

Parameters:
skippedRenderingTick the rendering tick that had to be skipped.

Reimplemented from OSDL::Rendering::Renderer.

Definition at line 121 of file OSDLAudioRenderer.cc.

References OSDL_AUDIO_RENDER_LOG.

const string AudioRenderer::toString ( Ceylan::VerbosityLevels  level = Ceylan::high  )  const throw () [virtual]

Returns an user-friendly description of the state of this object.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
Ceylan::TextDisplayable

Reimplemented from OSDL::Rendering::Renderer.

Definition at line 131 of file OSDLAudioRenderer.cc.

References OSDL::Video::Pixels::toString().

AudioRenderer& OSDL::Rendering::AudioRenderer::operator= ( const AudioRenderer source  )  throw () [private]

Assignment operator made private to ensure that it will be never called.

The compiler should complain whenever this undefined operator is called, implicitly or not.

bool Renderer::HasExistingRootRenderer (  )  throw () [static, inherited]

Tells whether a root renderer is available.

Returns:
true iff a root renderer is already available.

Definition at line 123 of file OSDLRenderer.cc.

References OSDL::Rendering::Renderer::_internalRootRenderer.

Referenced by OSDL::Events::EventsModule::enterBasicMainLoop().

Renderer & Renderer::GetExistingRootRenderer (  )  throw ( RenderingException ) [static, inherited]

Returns the one and only one root renderer instance that may be already available.

Note:
The returned value is a reference and not a pointer, to avoid any abnormal deallocation by its users, that should never deallocate the root renderer.
Exceptions:
RenderingException if there is no root renderer already available.
Note:
There is no 'GetRootRenderer' method that would create a root renderer if none was already set, since various renderers could be chosen as the root one.

Definition at line 131 of file OSDLRenderer.cc.

References OSDL::Rendering::Renderer::_internalRootRenderer.

Referenced by OSDL::Events::EventsModule::enterBasicMainLoop().

void Renderer::DeleteExistingRootRenderer (  )  throw ( RenderingException ) [static, inherited]

Deletes the existing root renderer.

Exceptions:
RenderingException if not renderer was available.

Definition at line 142 of file OSDLRenderer.cc.

References OSDL::Rendering::Renderer::_internalRootRenderer.

void Renderer::DeleteRootRenderer (  )  throw () [static, inherited]

Deletes the root renderer, if any.

Definition at line 157 of file OSDLRenderer.cc.

References OSDL::Rendering::Renderer::_internalRootRenderer.


Member Data Documentation

RenderCount OSDL::Rendering::Renderer::_renderingDone [protected, inherited]

Counts the number of renderings achieved.

Definition at line 221 of file OSDLRenderer.h.

RenderCount OSDL::Rendering::Renderer::_renderingSkipped [protected, inherited]

Counts the number of renderings skipped.

Definition at line 228 of file OSDLRenderer.h.

Events::RenderingTick OSDL::Rendering::Renderer::_lastRender [protected, inherited]

Records the last rendering tick.

Useful to check whether no rendering tick was missed.

Definition at line 237 of file OSDLRenderer.h.


The documentation for this class was generated from the following files:
Generated on Fri Mar 30 14:47:29 2007 for OSDL by  doxygen 1.5.1