NDEVR
API Documentation
SoundManager

Handles iterating through sound factories until one is able to produce sound given the input sound resource. More...

Inheritance diagram for SoundManager:
[legend]
Collaboration diagram for SoundManager:
[legend]

Static Public Member Functions

static void AddSoundFactory (SoundFactory *factory)
 Registers a new sound factory with the manager.
static Buffer< SoundAvailableSounds ()
 Returns all available sounds from all registered factories.
static void EnableTextToSpeech (bool enable)
 Enables or disables text-to-speech across all registered factories.
static bool PlaySound (const StringView &s)
 Plays the sound identified by the given resource string using the first capable factory.
static bool SupportsTextToSpeech ()
 Returns whether any registered factory supports text-to-speech.
static bool TextToSpeech (const TextToSpeechRequest &s)
 Converts the given text-to-speech request into audible speech using available factories.

Static Public Attributes

static ApplicationOption< bool > enable_sound
 Application option controlling whether sound is enabled.
static ApplicationOption< bool > enable_text_to_speech
 Application option controlling whether text-to-speech is enabled.
static ApplicationOption< bool > grab_volume_keys
 Application option controlling whether the app captures volume key input.

Static Protected Attributes

static Buffer< SoundFactory * > s_sound_factories
 All registered sound factory instances.

Detailed Description

Handles iterating through sound factories until one is able to produce sound given the input sound resource.


Definition at line 73 of file SoundManager.h.

Member Function Documentation

◆ AddSoundFactory()

void SoundManager::AddSoundFactory ( SoundFactory * factory)
static

Registers a new sound factory with the manager.

Parameters
[in]factoryThe sound factory to register.

◆ AvailableSounds()

Buffer< Sound > SoundManager::AvailableSounds ( )
static

Returns all available sounds from all registered factories.

Returns
A buffer of available Sound entries.

◆ EnableTextToSpeech()

void SoundManager::EnableTextToSpeech ( bool enable)
static

Enables or disables text-to-speech across all registered factories.

Parameters
[in]enableTrue to enable, false to disable.

◆ PlaySound()

bool SoundManager::PlaySound ( const StringView & s)
static

Plays the sound identified by the given resource string using the first capable factory.

Parameters
[in]sThe sound resource identifier.
Returns
True if the sound was successfully played.

◆ SupportsTextToSpeech()

bool SoundManager::SupportsTextToSpeech ( )
static

Returns whether any registered factory supports text-to-speech.

Returns
True if text-to-speech is supported.

◆ TextToSpeech()

bool SoundManager::TextToSpeech ( const TextToSpeechRequest & s)
static

Converts the given text-to-speech request into audible speech using available factories.

Parameters
[in]sThe text-to-speech request.
Returns
True if the speech was successfully produced.

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