VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions
makRadio::DtRadioAudioManager Class Reference

The Audio Manager ensures the application's current audio settings are applied.

The manager ensure the following audio settings are applied:

Public Member Functions

 DtRadioAudioManager ()
 
virtual ~DtRadioAudioManager ()
 
virtual bool init (const DtRadioSystemInitializer &)
 
virtual bool playbackDeviceInitialized ()
 
virtual bool captureDeviceInitialized ()
 
virtual bool isEnabled ()
 
virtual void setEnabled (bool enable)
 
virtual double soundVolume ()
 
virtual void setSoundVolume (double volume)
 
virtual makAudio::DtAudioBuffer * nextBuffer ()
 
virtual float maximumOutputDecibelCapability ()
 
virtual void setMaximumOutputDecibelCapability (float max)
 
virtual std::vector< std::string > playbackDeviceList () const
 
virtual std::string playbackDeviceName () const
 
virtual std::vector< std::string > captureDeviceList () const
 
virtual std::string captureDeviceName () const
 
makAudio::DtAudioManager * audioManager () const
 
makAudio::DtAudioCapture * audioCaptureManager () const
 
ALCcontext * context () const
 
virtual bool captureInitialized () const
 
virtual bool changePlaybackDevice (const std::string &device)
 
virtual bool changeCaptureDevice (const std::string &device)
 
virtual void tick (double t)
 
virtual void shutdown ()
 

Public Attributes

boost::signals2::signal< void()> signal_playbackDeviceInitialized
 
boost::signals2::signal< void()> signal_captureDeviceInitialized
 

Protected Member Functions

virtual void initializeAudioDevicesIfNeeded ()
 
virtual void slot_audioEnabledUpdated (bool enabled)
 
virtual void slot_showCaptureDeviceSettingsUpdated (bool show)
 
virtual void slot_maximumOutputDecibelCapabilityUpdated (double decibel)
 

Protected Attributes

bool myPlaybackDeviceInitialized = false
 
bool myCaptureDeviceInitialized = false
 
makAudio::DtAudioManager * myAudioManager = nullptr
 
makAudio::DtAudioCapture * myAudioCaptureManager = nullptr
 
DtRadioSystemInitializer myRadioSystemInitializer
 

Private Member Functions

 DtRadioAudioManager (const DtRadioAudioManager &)
 
DtRadioAudioManager & operator= (const DtRadioAudioManager &)
 

Constructor & Destructor Documentation

makRadio::DtRadioAudioManager::DtRadioAudioManager ( )

CTOR.

virtual makRadio::DtRadioAudioManager::~DtRadioAudioManager ( )
virtual

DTOR.

makRadio::DtRadioAudioManager::DtRadioAudioManager ( const DtRadioAudioManager &  )
private

Copy Constructor not implemented � Copy not allowed.

Member Function Documentation

virtual bool makRadio::DtRadioAudioManager::init ( const DtRadioSystemInitializer &  )
virtual

Inits the sound system and create the audio context.

Returns
return false if it failed to init.
virtual bool makRadio::DtRadioAudioManager::playbackDeviceInitialized ( )
virtual

Return whether the playback device is initialized.

virtual bool makRadio::DtRadioAudioManager::captureDeviceInitialized ( )
virtual

Return whether the capture device is initialized.

virtual bool makRadio::DtRadioAudioManager::isEnabled ( )
virtual

Return whether the audio manager is enabled.

virtual void makRadio::DtRadioAudioManager::setEnabled ( bool  enable)
virtual

Sets whether the audio manager is enabled. If set to false, audio manage will stop playing any sound.

virtual double makRadio::DtRadioAudioManager::soundVolume ( )
virtual

Return the volume of the sound.

virtual void makRadio::DtRadioAudioManager::setSoundVolume ( double  volume)
virtual

Sets the volume of the sound.

virtual makAudio::DtAudioBuffer* makRadio::DtRadioAudioManager::nextBuffer ( )
virtual

Returns the next audio buffer for output from the appropriate capture device.

virtual float makRadio::DtRadioAudioManager::maximumOutputDecibelCapability ( )
virtual

Gets the maximum decibel. The maximum decibel output of the sound system that the application is being played on. Used to tune the sound falloff distances to match the loudness of the system so that they sound realistic within the capabilities of the speakers being used. This defaults to 70 decibels, which is about the level a desktop computer will play loud audio at (or headphones). If the audio system is capable of playing louder than 70 dB, then increase this to the expected maximum output of the system.

virtual void makRadio::DtRadioAudioManager::setMaximumOutputDecibelCapability ( float  max)
virtual

Sets the maximum decibel. The maximum decibel output of the sound system that the application is being played on. Used to tune the sound falloff distances to match the loudness of the system so that they sound realistic within the capabilities of the speakers being used. This defaults to 70 decibels, which is about the level a desktop computer will play loud audio at (or headphones). If the audio system is capable of playing louder than 70 dB, then increase this to the expected maximum output of the system.

virtual std::vector<std::string> makRadio::DtRadioAudioManager::playbackDeviceList ( ) const
virtual

Get the list of audio playback devices available.

virtual std::string makRadio::DtRadioAudioManager::playbackDeviceName ( ) const
virtual

Get the current playback device.

virtual std::vector<std::string> makRadio::DtRadioAudioManager::captureDeviceList ( ) const
virtual

Get the list of audio capture devices available.

virtual std::string makRadio::DtRadioAudioManager::captureDeviceName ( ) const
virtual
makAudio::DtAudioManager* makRadio::DtRadioAudioManager::audioManager ( ) const
inline
makAudio::DtAudioCapture* makRadio::DtRadioAudioManager::audioCaptureManager ( ) const
inline
ALCcontext* makRadio::DtRadioAudioManager::context ( ) const
virtual bool makRadio::DtRadioAudioManager::captureInitialized ( ) const
virtual
virtual bool makRadio::DtRadioAudioManager::changePlaybackDevice ( const std::string &  device)
virtual

Slot when the playback device changes.

virtual bool makRadio::DtRadioAudioManager::changeCaptureDevice ( const std::string &  device)
virtual

Slot when the capture device changes.

virtual void makRadio::DtRadioAudioManager::tick ( double  t)
virtual

Updates the sound system per tick. Mainly update the listener and sounds.

virtual void makRadio::DtRadioAudioManager::shutdown ( )
virtual

Shut down the sound system, destory the context and release all the sound resources.

virtual void makRadio::DtRadioAudioManager::initializeAudioDevicesIfNeeded ( )
protectedvirtual

Initialize the playback and/or capture device if either device is not already initialized. This function does nothing if both devices have already been successfully initialized.

virtual void makRadio::DtRadioAudioManager::slot_audioEnabledUpdated ( bool  enabled)
protectedvirtual

Methods connected to audio signals.

Slot when enables/disables the audio.

virtual void makRadio::DtRadioAudioManager::slot_showCaptureDeviceSettingsUpdated ( bool  show)
protectedvirtual

Slot when show/hide the capture device settings.

virtual void makRadio::DtRadioAudioManager::slot_maximumOutputDecibelCapabilityUpdated ( double  decibel)
protectedvirtual

Slot when the maximum output decibel allowed changes.

DtRadioAudioManager& makRadio::DtRadioAudioManager::operator= ( const DtRadioAudioManager &  )
private

Assignment Operator not implemented � Copy not allowed.

Member Data Documentation

boost::signals2::signal<void()> makRadio::DtRadioAudioManager::signal_playbackDeviceInitialized
boost::signals2::signal<void()> makRadio::DtRadioAudioManager::signal_captureDeviceInitialized
bool makRadio::DtRadioAudioManager::myPlaybackDeviceInitialized = false
protected
bool makRadio::DtRadioAudioManager::myCaptureDeviceInitialized = false
protected
makAudio::DtAudioManager* makRadio::DtRadioAudioManager::myAudioManager = nullptr
protected
makAudio::DtAudioCapture* makRadio::DtRadioAudioManager::myAudioCaptureManager = nullptr
protected
DtRadioSystemInitializer makRadio::DtRadioAudioManager::myRadioSystemInitializer
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)