AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <Normalizer.h>
Public Member Functions | |
bool | normalize (const double &unnormalizedInput, double *normalizedOutput) |
Static Public Member Functions | |
static std::unique_ptr< Normalizer > | create (const double &sourceMin, const double &sourceMax, const double &normalizedMin, const double &normalizedMax) |
This class performs a linear transform between two ranges [sourceMin, sourceMax] -> [normalizedMin, normalizedMax]. This is used by the MediaPlayer to convert between different volume ranges. MediaPlayer internally uses GStreamer, whose volume element takes in a gdouble
.
|
static |
Creates a unique_ptr to a Normalizer
class.
sourceMin | The minimum value in the source space. |
sourceMax | The maximum value in the source space. |
normalizedMin | The minimum value in the normalized space. |
normalizedMax | The maximum value in the normalized space. |
bool alexaClientSDK::mediaPlayer::Normalizer::normalize | ( | const double & | unnormalizedInput, |
double * | normalizedOutput | ||
) |
Performs feature scaling from [srcMin, srcMax] to [normalizedMin, normalizedMax].
unnormalizedInput | The input value to normalize. | |
[out] | normalizedOutput | The result after normalization. |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0