AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Macros | Typedefs | Functions | Variables
AndroidSLESSpeakerTest.cpp File Reference
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <SLES/OpenSLES.h>
#include <AVSCommon/AVS/SpeakerConstants/SpeakerConstants.h>
#include <AndroidUtilities/MockAndroidSLESObject.h>
#include "AndroidSLESMediaPlayer/AndroidSLESSpeaker.h"
Include dependency graph for AndroidSLESSpeakerTest.cpp:

Classes

class  alexaClientSDK::mediaPlayer::android::test::AndroidSLESSpeakerTest
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::mediaPlayer
 
 alexaClientSDK::mediaPlayer::android
 
 alexaClientSDK::mediaPlayer::android::test
 

Macros

#define TAG   "AndroidSLESSpeakerTest"
 String to identify log entries originating from this file. More...
 
#define LX(event)   alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)
 

Typedefs

using alexaClientSDK::mediaPlayer::android::test::MockVolumeInterface = MockInterfaceImpl< SLVolumeItf_ >
 

Functions

static SLresult alexaClientSDK::mediaPlayer::android::test::mockGetVolume (SLVolumeItf self, SLmillibel *volume)
 Mock GetVolume succeeds. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockGetVolumeFailed (SLVolumeItf self, SLmillibel *volume)
 Mock GetVolume fails. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockSetVolume (SLVolumeItf self, SLmillibel volume)
 Mock SetVolume succeeds. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockSetVolumeFailed (SLVolumeItf self, SLmillibel volume)
 Mock SetVolume fails. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockGetMute (SLVolumeItf self, SLboolean *mute)
 Mock GetMute succeeds. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockGetMuteFailed (SLVolumeItf self, SLboolean *mute)
 Mock GetMute fails. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockSetMute (SLVolumeItf self, SLboolean mute)
 Mock SetMute succeeds. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockSetMuteFailed (SLVolumeItf self, SLboolean mute)
 Mock SetMute fails. More...
 
static SLresult alexaClientSDK::mediaPlayer::android::test::mockGetMaxVolume (SLVolumeItf self, SLmillibel *volume)
 Mock GetMaxVolume succeeds. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_createNullEngine)
 Test speaker create with null engine. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_createNullSpeaker)
 Test speaker create with null output mix. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_createInterfaceUnavailable)
 Test speaker create with null engine. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_createInvalidMaxVolume)
 Test speaker create with invalid device configuration. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_setVolumeSucceed)
 Test set and get volume succeed. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_setVolumeFailed)
 Test set volume failed. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_getVolumeFailed)
 Test get volume failed. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_setMuteSucceed)
 Test set and get mute succeed. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_setMuteFailed)
 Test set mute failed. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_getMuteFailed)
 Test get mute failed. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_setVolumeAccuracy)
 Test set and get volume on values in different ranges to guarantee accuracy. More...
 
 alexaClientSDK::mediaPlayer::android::test::TEST_F (AndroidSLESSpeakerTest, test_setDeviceVolume)
 Test that the conversion from avs volume to device volume. More...
 

Variables

static constexpr SLmillibel alexaClientSDK::mediaPlayer::android::test::INVALID_MAX_VOLUME = -10
 Represents an invalid device maximum value. OpenSL ES determines that device max volume is 0 or above. More...
 
static SLmillibel alexaClientSDK::mediaPlayer::android::test::g_volume
 
static SLmillibel alexaClientSDK::mediaPlayer::android::test::g_maxVolume
 
static SLboolean alexaClientSDK::mediaPlayer::android::test::g_mute
 

Macro Definition Documentation

◆ LX

#define LX (   event)    alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)

Create a LogEntry using this file's TAG and the specified event string.

Parameters
Theevent string for this LogEntry.

◆ TAG

#define TAG   "AndroidSLESSpeakerTest"

String to identify log entries originating from this 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