![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <InMemoryEqualizerConfiguration.h>
Public Member Functions | |
~InMemoryEqualizerConfiguration () override=default | |
EqualizerConfigurationInterface functions | |
bool | isEnabled () const override |
std::set< acsdkEqualizerInterfaces::EqualizerBand > | getSupportedBands () const override |
std::set< acsdkEqualizerInterfaces::EqualizerMode > | getSupportedModes () const override |
int | getMinBandLevel () const override |
int | getMaxBandLevel () const override |
int | getDefaultBandDelta () const override |
acsdkEqualizerInterfaces::EqualizerState | getDefaultState () const override |
bool | isBandSupported (acsdkEqualizerInterfaces::EqualizerBand band) const override |
bool | isModeSupported (acsdkEqualizerInterfaces::EqualizerMode mode) const override |
![]() | |
virtual | ~EqualizerConfigurationInterface ()=default |
Static Public Member Functions | |
static std::shared_ptr< InMemoryEqualizerConfiguration > | create (int minBandLevel, int maxBandLevel, int defaultDelta, const std::set< acsdkEqualizerInterfaces::EqualizerBand > &bandsSupported, const std::set< acsdkEqualizerInterfaces::EqualizerMode > &modesSupported, acsdkEqualizerInterfaces::EqualizerState defaultState) |
static std::shared_ptr< InMemoryEqualizerConfiguration > | createDisabled () |
static std::shared_ptr< InMemoryEqualizerConfiguration > | createDefault () |
Protected Member Functions | |
InMemoryEqualizerConfiguration (int minBandLevel, int maxBandLevel, int defaultDelta, const std::set< acsdkEqualizerInterfaces::EqualizerBand > &bandsSupported, const std::set< acsdkEqualizerInterfaces::EqualizerMode > &modesSupported, acsdkEqualizerInterfaces::EqualizerState defaultState) | |
InMemoryEqualizerConfiguration () | |
bool | validateConfiguration () |
bool | validateBandLevelMap (const acsdkEqualizerInterfaces::EqualizerBandLevelMap &bandLevelMap, bool validateValues) |
In-memory implementation for the equalizer configuration. The configuration is set during the creation and is not changed afterwards. This class also holds the hardcoded defaults used by SDK.
|
overridedefault |
Destructor.
|
protected |
Constructor.
minBandLevel | Minimum band level supported by the equalizer. |
maxBandLevel | Maximum band level supported by the equalizer. |
defaultDelta | Default delta value to adjust the equalizer. |
bandsSupported | A set of bands supported by the equalizer. |
modesSupported | A set of modes supported by the equalizer. |
defaultState | Default state of the equalizer used when there is no state stored in a persistent storage or when a band level is being reset. |
|
protected |
Constructor creating a disabled configuration.
|
static |
Factory to create an instance of InMemoryEqualizerConfiguration
from the parameters provided.
minBandLevel | Minimum band level supported by the equalizer. |
maxBandLevel | Maximum band level supported by the equalizer. |
defaultDelta | Default delta value to adjust the equalizer. |
bandsSupported | A set of bands supported by the equalizer. |
modesSupported | A set of modes supported by the equalizer. |
defaultState | Default state of the equalizer used when there is no state stored in a persistent storage or when a band level is being reset. |
InMemoryEqualizerConfiguration
on success, or nullptr
in case of invalid parameters or inconsistent configuration.
|
static |
A factory to create an instance of InMemoryEqualizerConfiguration
using the hardcoded defaults.
InMemoryEqualizerConfiguration
using the hardcoded defaults.
|
static |
Factory to create disabled version of the configuration.
|
overridevirtual |
Returns the default value of band value changes.
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Returns EqualizerState
object defining default values for equalizer mode and band levels. These values should be used when resetting any band to its default level.
EqualizerState
object representing the default state. Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Returns the maximum band value supported by the device.
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Returns the minimum band value supported by the device.
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Returns a set of EQ bands supported by the device.
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Returns a set of EQ modes supported by the device.
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Checks if band is supported by the device.
band | EqualizerBand to check. |
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Returns true if equalizer is enabled, false otherwise.
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
overridevirtual |
Checks if mode is supported by the device.
mode | EqualizerMode to check. |
Implements alexaClientSDK::acsdkEqualizerInterfaces::EqualizerConfigurationInterface.
|
protected |
Validates EqualizerBandLevelMap
for consistency.
bandLevelMap | A EqualizerBandLevelMap to validate. |
validateValues | A flag indicating whether to check band levels for the allowed range. This could be false for the case when allowed range is inconsistent and there is no point in validating against it. |
|
protected |
Validates the initialized configuration for consistency.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0