Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CApplicationVolumeHandling Class Reference

Class handling application support for audio volume management. More...

#include <ApplicationVolumeHandling.h>

Inheritance diagram for CApplicationVolumeHandling:
IApplicationComponent

Classes

struct  ReplayGainSettings
 

Public Member Functions

float GetVolumePercent () const
 
float GetVolumeRatio () const
 
bool IsMuted () const
 
void SetVolume (float iValue, bool isPercentage=true)
 
void SetMute (bool mute)
 
void ToggleMute (void)
 
const ReplayGainSettingsGetReplayGainSettings () const
 
bool Load (const TiXmlNode *settings)
 
bool Save (TiXmlNode *settings) const
 
bool OnSettingChanged (const CSetting &setting)
 
- Public Member Functions inherited from IApplicationComponent
virtual ~IApplicationComponent ()=default
 

Static Public Attributes

static constexpr float VOLUME_MINIMUM = 0.0f
 
static constexpr float VOLUME_MAXIMUM = 1.0f
 
static constexpr float VOLUME_DYNAMIC_RANGE = 90.0f
 

Protected Member Functions

bool IsMutedInternal () const
 
void ShowVolumeBar (const CAction *action=nullptr)
 
void CacheReplayGainSettings (const CSettings &settings)
 
void Mute ()
 
void UnMute ()
 
void SetHardwareVolume (float hardwareVolume)
 
void VolumeChanged ()
 

Protected Attributes

bool m_muted = false
 
float m_volumeLevel = VOLUME_MAXIMUM
 
ReplayGainSettings m_replayGainSettings
 

Friends

class CApplication
 

Detailed Description

Class handling application support for audio volume management.

Member Function Documentation

◆ CacheReplayGainSettings()

void CApplicationVolumeHandling::CacheReplayGainSettings ( const CSettings & settings)
protected

◆ GetReplayGainSettings()

const ReplayGainSettings & CApplicationVolumeHandling::GetReplayGainSettings ( ) const
inline

◆ GetVolumePercent()

float CApplicationVolumeHandling::GetVolumePercent ( ) const

◆ GetVolumeRatio()

float CApplicationVolumeHandling::GetVolumeRatio ( ) const

◆ IsMuted()

bool CApplicationVolumeHandling::IsMuted ( ) const

◆ IsMutedInternal()

bool CApplicationVolumeHandling::IsMutedInternal ( ) const
inlineprotected

◆ Load()

bool CApplicationVolumeHandling::Load ( const TiXmlNode * settings)

◆ Mute()

void CApplicationVolumeHandling::Mute ( )
protected

◆ OnSettingChanged()

bool CApplicationVolumeHandling::OnSettingChanged ( const CSetting & setting)

◆ Save()

bool CApplicationVolumeHandling::Save ( TiXmlNode * settings) const

◆ SetHardwareVolume()

void CApplicationVolumeHandling::SetHardwareVolume ( float hardwareVolume)
protected

◆ SetMute()

void CApplicationVolumeHandling::SetMute ( bool mute)

◆ SetVolume()

void CApplicationVolumeHandling::SetVolume ( float iValue,
bool isPercentage = true )

◆ ShowVolumeBar()

void CApplicationVolumeHandling::ShowVolumeBar ( const CAction * action = nullptr)
protected

◆ ToggleMute()

void CApplicationVolumeHandling::ToggleMute ( void )

◆ UnMute()

void CApplicationVolumeHandling::UnMute ( )
protected

◆ VolumeChanged()

void CApplicationVolumeHandling::VolumeChanged ( )
protected

Friends And Related Symbol Documentation

◆ CApplication

friend class CApplication
friend

Member Data Documentation

◆ m_muted

bool CApplicationVolumeHandling::m_muted = false
protected

◆ m_replayGainSettings

ReplayGainSettings CApplicationVolumeHandling::m_replayGainSettings
protected

◆ m_volumeLevel

float CApplicationVolumeHandling::m_volumeLevel = VOLUME_MAXIMUM
protected

◆ VOLUME_DYNAMIC_RANGE

float CApplicationVolumeHandling::VOLUME_DYNAMIC_RANGE = 90.0f
staticconstexpr

◆ VOLUME_MAXIMUM

float CApplicationVolumeHandling::VOLUME_MAXIMUM = 1.0f
staticconstexpr

◆ VOLUME_MINIMUM

float CApplicationVolumeHandling::VOLUME_MINIMUM = 0.0f
staticconstexpr

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