NDEVR
API Documentation
QTSoundManager

Adds Sound generated via the Qt Framework to the application. More...

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

Public Member Functions

virtual Buffer< SoundavailableSounds () override
 Gets all available sound effects.
virtual void enableTextToSpeech (bool enable) override
 Enables or disables text-to-speech.
bool playSound (const StringView &sound) override
 Plays a sound by identifier.
QSoundEffect * soundEffect (const StringView &sound)
 Gets or creates a QSoundEffect for the given sound identifier.
SoundEffectTask * soundEffectTask (const StringView &sound)
 Gets or creates a threaded sound effect task for the given sound.
virtual bool supportsTextToSpeech () const override
 Checks whether text-to-speech is supported on this system.
bool textToSpeech (const TextToSpeechRequest &speech) override
 Speaks the given text using text-to-speech.
virtual bool textToSpeechEnabled () const override
 Checks whether text-to-speech is currently enabled.

Static Public Member Functions

static void SetupSystem ()
 Sets up the Qt sound system and registers this factory.

Detailed Description

Adds Sound generated via the Qt Framework to the application.


Definition at line 43 of file QTSoundManager.h.

Member Function Documentation

◆ availableSounds()

virtual Buffer< Sound > QTSoundManager::availableSounds ( )
overridevirtual

Gets all available sound effects.

Returns
A buffer of available Sound objects.

Implements SoundFactory.

◆ enableTextToSpeech()

virtual void QTSoundManager::enableTextToSpeech ( bool enable)
overridevirtual

Enables or disables text-to-speech.

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

Implements SoundFactory.

◆ playSound()

bool QTSoundManager::playSound ( const StringView & sound)
overridevirtual

Plays a sound by identifier.

Parameters
[in]soundThe sound identifier to play.
Returns
True if the sound was played successfully.

Implements SoundFactory.

◆ soundEffect()

QSoundEffect * QTSoundManager::soundEffect ( const StringView & sound)

Gets or creates a QSoundEffect for the given sound identifier.

Parameters
[in]soundThe sound identifier.
Returns
A pointer to the QSoundEffect.

◆ soundEffectTask()

SoundEffectTask * QTSoundManager::soundEffectTask ( const StringView & sound)

Gets or creates a threaded sound effect task for the given sound.

Parameters
[in]soundThe sound identifier.
Returns
A pointer to the SoundEffectTask.

◆ supportsTextToSpeech()

virtual bool QTSoundManager::supportsTextToSpeech ( ) const
overridevirtual

Checks whether text-to-speech is supported on this system.

Returns
True if text-to-speech is available.

Implements SoundFactory.

◆ textToSpeech()

bool QTSoundManager::textToSpeech ( const TextToSpeechRequest & speech)
overridevirtual

Speaks the given text using text-to-speech.

Parameters
[in]speechThe text-to-speech request containing the text and parameters.
Returns
True if the speech was initiated successfully.

Implements SoundFactory.

◆ textToSpeechEnabled()

virtual bool QTSoundManager::textToSpeechEnabled ( ) const
overridevirtual

Checks whether text-to-speech is currently enabled.

Returns
True if text-to-speech is enabled.

Implements SoundFactory.


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