![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <FormattedAudioStreamAdapter.h>
Public Member Functions | |
FormattedAudioStreamAdapter (const AudioFormat &audioFormat) | |
AudioFormat | getAudioFormat () const |
void | setListener (std::shared_ptr< FormattedAudioStreamAdapterListener > listener) |
size_t | send (const unsigned char *buffer, size_t size) |
A class providing the way to receive a sequence of audio data blocks and a format associated with it.
This class should be used when you want to publish a real time audio stream of the specified format to zero or one recipient without buffering the data. The receiving party may start listening at any moment. With no listener set all the published data is lost.
|
explicit |
Constructor initializing the class with an AudioFormat
.
audioFormat | AudioFormat describing the data being sent. |
AudioFormat alexaClientSDK::avsCommon::utils::bluetooth::FormattedAudioStreamAdapter::getAudioFormat | ( | ) | const |
Get AudioFormat
associated with the class.
AudioFormat
associated with the class. size_t alexaClientSDK::avsCommon::utils::bluetooth::FormattedAudioStreamAdapter::send | ( | const unsigned char * | buffer, |
size_t | size | ||
) |
Publish data to the listener.
buffer | Buffer containing the data |
size | Size of the data block in bytes. The value must be greater than zero. |
void alexaClientSDK::avsCommon::utils::bluetooth::FormattedAudioStreamAdapter::setListener | ( | std::shared_ptr< FormattedAudioStreamAdapterListener > | listener | ) |
Set the listener to receive data.
listener | the listener to receive data. |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0