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

#include <SpeakerInterface.h>

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

Classes

struct  SpeakerSettings
 

Public Member Functions

virtual bool setVolume (int8_t volume)=0
 
virtual bool setMute (bool mute)=0
 
virtual bool getSpeakerSettings (SpeakerSettings *settings)=0
 
virtual ~SpeakerInterface ()=default
 

Detailed Description

The SpeakerInterface is concerned with the control of volume and mute settings of a speaker. The two settings are independent of each other, and the respective APIs shall not affect the other setting in any way. Compound behaviors (such as unmuting when volume is adjusted) will be handled at a layer above this interface.

The methods in this interface MUST be implemented as thread safe implementations.

Constructor & Destructor Documentation

◆ ~SpeakerInterface()

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

Destructor.

Member Function Documentation

◆ getSpeakerSettings()

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

Return a SpeakerSettings object to indicate the current settings of the SpeakerInterface.

Parameters
[out]settingsA SpeakerSettings object if successful.
Returns
Whether the operation was successful.

Implemented in alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::mediaPlayer::android::AndroidSLESSpeaker, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockSpeaker.

◆ setMute()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::SpeakerInterface::setMute ( bool  mute)
pure virtual

Set the mute of the speaker.

Parameters
muteRepresents whether the speaker should be muted (true) or unmuted (false).
Returns
Whether the operation was successful.

Implemented in alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::mediaPlayer::android::AndroidSLESSpeaker, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockSpeaker.

◆ setVolume()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::SpeakerInterface::setVolume ( int8_t  volume)
pure virtual

Set the absolute volume of the speaker. volume will be [AVS_SET_VOLUME_MIN, AVS_SET_VOLUME_MAX], and implementers of the interface must normalize the volume to fit the needs of their drivers.

Parameters
volumeA volume to set the speaker to.
Returns
Whether the operation was successful.

Implemented in alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::mediaPlayer::android::AndroidSLESSpeaker, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockSpeaker.


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

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