![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AndroidSLESEngine.h>
Public Member Functions | |
std::unique_ptr< AndroidSLESMicrophone > | createAndroidMicrophone (std::shared_ptr< avsCommon::avs::AudioInputStream > stream) |
std::unique_ptr< AndroidSLESObject > | createAudioRecorder () |
void | createAudioRecorder (SLObjectItf &recorderObject) |
std::unique_ptr< AndroidSLESObject > | createPlayer (SLDataSource &source, SLDataSink &sink, bool requireEqualizer) const |
std::unique_ptr< AndroidSLESObject > | createOutputMix () const |
~AndroidSLESEngine () | |
Static Public Member Functions | |
static std::shared_ptr< AndroidSLESEngine > | create () |
Class that represents the OpenSL ES engine object + interfaces.
The engine is used to create other OpenSL ES objects, and each application should only have one engine. Furthermore, the engine should be the first OpenSL ES object to be created and the last to be destroyed.
The create
method ensures that the application has only one engine.
alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESEngine::~AndroidSLESEngine | ( | ) |
Destructor.
|
static |
Creates an AndroidSLESEngine
. This method will only succeed if there is no other engine alive.
AndroidSLESEngine
object if succeeds; otherwise return nullptr
. std::unique_ptr<AndroidSLESMicrophone> alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESEngine::createAndroidMicrophone | ( | std::shared_ptr< avsCommon::avs::AudioInputStream > | stream | ) |
Creates a microphone wrapper for an OpenSL ES audio recorder.
stream | The new microphone will write the audio recorded to this stream. |
AndroidSLESMicrophone
object if succeeds; otherwise return nullptr
. std::unique_ptr<AndroidSLESObject> alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESEngine::createAudioRecorder | ( | ) |
Creates an OpenSL ES audio recorder.
void alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESEngine::createAudioRecorder | ( | SLObjectItf & | recorderObject | ) |
Creates an OpenSL ES audio recorder.
[in] | recorderObject | The new OpenSL ES audio recorder. |
std::unique_ptr<AndroidSLESObject> alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESEngine::createOutputMix | ( | ) | const |
Creates an OpenSL ES output mix.
AndroidSLESObject
object if succeeds; otherwise return nullptr
. std::unique_ptr<AndroidSLESObject> alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESEngine::createPlayer | ( | SLDataSource & | source, |
SLDataSink & | sink, | ||
bool | requireEqualizer | ||
) | const |
Creates an OpenSL ES audio player. Although the parameters are read-only, we cannot use const because android's API expects non-constant parameters.
[in] | source | The audio data source specification (Read-Only). |
[in] | sink | The audio data sink specification (Read-Only). |
[in] | requireEqualizer | set to true if equalizer support is required. |
AndroidSLESObject
object if succeeds; otherwise return nullptr
. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0