|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
Class handling application support for audio volume management. More...
#include <ApplicationVolumeHandling.h>
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 ReplayGainSettings & | GetReplayGainSettings () const |
| bool | Load (const TiXmlNode *settings) |
| bool | Save (TiXmlNode *settings) const |
| void | OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override |
| The value of the given setting has changed. | |
| bool | OnAction (const CAction &action) |
| Handle the mute, passthrough and volume actions. | |
Public Member Functions inherited from IApplicationComponent | |
| virtual | ~IApplicationComponent ()=default |
Public Member Functions inherited from ISettingCallback | |
| virtual | ~ISettingCallback ()=default |
| virtual bool | OnSettingChanging (const std::shared_ptr< const CSetting > &setting) |
| The value of the given setting is being changed. | |
| virtual void | OnSettingAction (const std::shared_ptr< const CSetting > &setting) |
| The given setting has been activated. | |
| virtual bool | OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) |
| The given setting needs to be updated. | |
| virtual void | OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName) |
| The given property of the given setting has changed. | |
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 | TogglePassthrough () |
| void | ChangeVolume (const CAction &action) |
Steps or sets the volume as action asks, unless a bitstream is playing without volume control. | |
| void | VolumeChanged () |
Protected Attributes | |
| bool | m_muted = false |
| float | m_volumeLevel = VOLUME_MAXIMUM |
| ReplayGainSettings | m_replayGainSettings |
Friends | |
| class | CApplication |
| class | CApplicationMessageHandling |
Class handling application support for audio volume management.
Steps or sets the volume as action asks, unless a bitstream is playing without volume control.
|
inline |
| float CApplicationVolumeHandling::GetVolumePercent | ( | ) | const |
| float CApplicationVolumeHandling::GetVolumeRatio | ( | ) | const |
| bool CApplicationVolumeHandling::IsMuted | ( | ) | const |
|
inlineprotected |
| bool CApplicationVolumeHandling::Load | ( | const TiXmlNode * | settings | ) |
|
protected |
Handle the mute, passthrough and volume actions.
action was one of them and has been handled
|
overridevirtual |
The value of the given setting has changed.
This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.
| setting | The setting whose value has been changed |
Reimplemented from ISettingCallback.
| bool CApplicationVolumeHandling::Save | ( | TiXmlNode * | settings | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |