AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESObject Class Reference

#include <AndroidSLESObject.h>

Public Member Functions

 ~AndroidSLESObject ()
bool getInterface (SLInterfaceID interfaceID, void *retObject)
SLObjectItf get () const

Static Public Member Functions

static std::unique_ptr< AndroidSLESObjectcreate (SLObjectItf slObject)

Detailed Description

This class will represent an OpenSL ES object.

This class will abstract the object states as well as interface relationship from Open SL to be more C++ friendly. For more details see

Constructor & Destructor Documentation

◆ ~AndroidSLESObject()

alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESObject::~AndroidSLESObject ( )

AndroidSLESObject destructor. It will be responsible for destroying the underlying SLObjectItf.

Member Function Documentation

◆ create()

static std::unique_ptr<AndroidSLESObject> alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESObject::create ( SLObjectItf  slObject)

This method will create an AndroidSLESObject and perform a synchronous realization.

At the end of this method, the internal SLObjectItf will be ready to be used.

slObjectThe C object that the new instance will wrap and own.
A unique_ptr with a valid AndroidSLESObject if creation was successful, nullptr otherwise.

◆ get()

SLObjectItf alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESObject::get ( ) const

Get a raw pointer to the internal C object.

A pointer to the internal C object.
Avoid storing the SLObjectItf since the parent OpenSLObject owns the underlying object.

◆ getInterface()

bool alexaClientSDK::applicationUtilities::androidUtilities::AndroidSLESObject::getInterface ( SLInterfaceID  interfaceID,
void *  retObject 

Get the object C interface.

interfaceIDThe object C interface ID.
[out]retObjectThe returned object.
true if it succeeds and false if it fails.
The object interface is actually a pointer to the OpenSLObject internal object. Make sure that its lifecycle is not longer than the parent OpenSLObject.

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

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0