AlexaClientSDK  1.22.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface Class Referenceabstract

#include <ChannelVolumeInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface:
Inheritance graph
[legend]

Public Types

enum  Type { Type::AVS_SPEAKER_VOLUME, Type::AVS_ALERTS_VOLUME }
 

Public Member Functions

virtual bool startDucking ()=0
 
virtual bool stopDucking ()=0
 
virtual bool setUnduckedVolume (int8_t volume)=0
 
virtual bool adjustUnduckedVolume (int8_t delta)
 
virtual bool setMute (bool mute)=0
 
virtual bool getSpeakerSettings (avsCommon::sdkInterfaces::SpeakerInterface::SpeakerSettings *settings) const =0
 
virtual Type getSpeakerType () const =0
 
virtual std::size_t getId () const
 
virtual ~ChannelVolumeInterface ()=default
 

Detailed Description

ChannelVolumeInterface provides an interface that allows control of speaker settings for the underlying SpeakerInterface. Implementations of this interface must be thread safe.

Member Enumeration Documentation

◆ 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.

Constructor & Destructor Documentation

◆ ~ChannelVolumeInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::~ChannelVolumeInterface ( )
virtualdefault

Destructor

Member Function Documentation

◆ 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
deltathe 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()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::getSpeakerSettings ( avsCommon::sdkInterfaces::SpeakerInterface::SpeakerSettings settings) const
pure virtual

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]settingsA SpeakerSettings object if successful.
Returns
true if the operation succeeded, false otherwise.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::ChannelVolumeManager, and 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

Set the mute state of the underlying speaker.

Parameters
mutethe mute state to be set.
Returns
true if the operation succeeded, false otherwise.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::ChannelVolumeManager, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager.

◆ 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
volumethe volume level to be set.
Returns
true if the operation succeeded, false otherwise.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::ChannelVolumeManager, and 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::capabilityAgents::speakerManager::ChannelVolumeManager, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager.

◆ stopDucking()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::ChannelVolumeInterface::stopDucking ( )
pure virtual

Restores the channel volume for the underlying speaker.

Returns
true if the operation succeeded, false otherwise. The API returns true, if the channel was not attenuated.

Implemented in alexaClientSDK::capabilityAgents::speakerManager::ChannelVolumeManager, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockChannelVolumeManager.


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

AlexaClientSDK 1.22.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0