#include <ChannelVolumeInterface.h>
ChannelVolumeInterface
provides an interface that allows control of speaker settings for the underlying SpeakerInterface
. Implementations of this interface must be thread safe.
◆ Type
This enum provides the type of the SpeakerInterface
.
Enumerator |
---|
AVS_SPEAKER_VOLUME | Volume type reflecting AVS Speaker API volume.
|
AVS_ALERTS_VOLUME | Volume type reflecting AVS Alerts API volume.
|
◆ ~ChannelVolumeInterface()
virtual alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::~ChannelVolumeInterface |
( |
| ) |
|
|
virtualdefault |
◆ adjustUnduckedVolume()
bool alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::adjustUnduckedVolume |
( |
int8_t |
delta | ) |
|
|
inlinevirtual |
Adjust the volume of the underlying speaker. If the underlying SpeakerInterface
is ducked when this API is invoked, the corresponding unduckedVolume setting adjustment is reflected upon the next stopDucking call.
- Parameters
-
delta | the delta to change the volume by. |
- Returns
true
if the operation succeeded, false
otherwise.
No-op if delta is zero.
◆ getId()
virtual std::size_t alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::getId |
( |
| ) |
const |
|
inlinevirtual |
◆ getSpeakerSettings()
Returns a SpeakerSettings
object to indicate the current settings of the underlying speaker
. Note that if the underlying Channel is attenuated, the settings returned must still return the unducked volume of the underlying speaker, as set by the most recent call to the setUnduckedVolume API.
- Parameters
-
[out] | settings | A SpeakerSettings object if successful. |
- Returns
true
if the operation succeeded, false
otherwise.
Implemented in alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager.
◆ getSpeakerType()
virtual Type alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::getSpeakerType |
( |
| ) |
const |
|
pure virtual |
◆ setMute()
virtual bool alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::setMute |
( |
bool |
mute | ) |
|
|
pure virtual |
◆ setUnduckedVolume()
virtual bool alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::setUnduckedVolume |
( |
int8_t |
volume | ) |
|
|
pure virtual |
Set the volume of the underlying speaker. This reflects the baseline volume settings for underlying Channel when it is not attenuated. If the underlying SpeakerInterface
is ducked when this API is invoked, the corresponding unduckedVolume setting change is reflected upon the next stopDucking call.
- Parameters
-
volume | the volume level to be set. |
- Returns
true
if the operation succeeded, false
otherwise.
Implemented in alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager.
◆ startDucking()
virtual bool alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::startDucking |
( |
| ) |
|
|
pure virtual |
Start channel volume attenuation for the underlying speaker. The interface consults the volume curve function set in ChannelVolumeManager
to determine the desired attenuated channel volume.
- Returns
true
if the operation succeeded, false
otherwise. The API returns true, if the channel is already attenuated.
Implemented in alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager.
◆ stopDucking()
virtual bool alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::stopDucking |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file:
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0