![]() |
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <ChannelVolumeManager.h>
Public Member Functions | |
avsCommon::sdkInterfaces::ChannelVolumeInterface::Type | getSpeakerType () const override |
size_t | getId () const override |
bool | startDucking () override |
bool | stopDucking () override |
bool | setUnduckedVolume (int8_t volume) override |
bool | setMute (bool mute) override |
bool | getSpeakerSettings (avsCommon::sdkInterfaces::SpeakerInterface::SpeakerSettings *settings) const override |
![]() | |
virtual bool | adjustUnduckedVolume (int8_t delta) |
virtual | ~ChannelVolumeInterface ()=default |
Static Public Member Functions | |
static std::shared_ptr< ChannelVolumeManager > | create (std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > speaker, avsCommon::sdkInterfaces::ChannelVolumeInterface::Type type=avsCommon::sdkInterfaces::ChannelVolumeInterface::Type::AVS_SPEAKER_VOLUME, std::function< int8_t(int8_t)> volumeCurve=nullptr) |
Additional Inherited Members | |
![]() | |
enum | Type { Type::AVS_SPEAKER_VOLUME, Type::AVS_ALERTS_VOLUME } |
ChannelVolumeManager provides a concrete implementation of the ChannelVolumeInterface It controls an underlying SpeakerInterface
object and provides functionality to be able to set SpeakerSettings and control Channel Volume Attenuation for this underlying SpeakerInterface.
|
static |
Creates a ChannelVolumeManager that manages a single SpeakerInterface
.
speaker | The SpeakerInterface associated with this instance. |
type | The ChannelVolumeInterface type associated with this instance. |
volumeCurve | The volume curve mapping to be used for channel attenuation. |
Retrieve initial volume setting from underlying speakers
|
overridevirtual |
Get the unique identifier of the ChannelVolumeInterface
.
Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.
|
overridevirtual |
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.
[out] | settings | A SpeakerSettings object if successful. |
true
if the operation succeeded, false
otherwise. Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.
|
overridevirtual |
ChannelVolumeInterface Functions.
Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.
|
overridevirtual |
Set the mute state of the underlying speaker.
mute | the mute state to be set. |
true
if the operation succeeded, false
otherwise. Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.
|
overridevirtual |
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.
volume | the volume level to be set. |
true
if the operation succeeded, false
otherwise. Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.
|
overridevirtual |
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.
true
if the operation succeeded, false
otherwise. The API returns true, if the channel is already attenuated. Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.
|
overridevirtual |
Restores the channel volume for the underlying speaker.
true
if the operation succeeded, false
otherwise. The API returns true, if the channel was not attenuated. Implements alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface.
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0