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

#include <EqualizerLinearBandMapper.h>

Inheritance diagram for alexaClientSDK::equalizer::EqualizerLinearBandMapper:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::equalizer::EqualizerLinearBandMapper:
Collaboration graph
[legend]

Static Public Member Functions

static std::shared_ptr< EqualizerLinearBandMappercreate (int numberOfTargetBands)
 

EqualizerBandMapperInterface methods

void mapEqualizerBands (const avsCommon::sdkInterfaces::audio::EqualizerBandLevelMap &bandLevelMap, std::function< void(int, int)> setBandCallback) override
 

Additional Inherited Members

- Public Member Functions inherited from alexaClientSDK::equalizer::EqualizerBandMapperInterface
virtual ~EqualizerBandMapperInterface ()=default
 

Detailed Description

Provides linear mapping from AVS provided bands to target number of bands. Target bands are assumed to be equally distributed among whole spectrum of equalization frequencies starting from basses to treble. I.e. if there are 10 target bands, band with index 0 would be the lowest frequency while band with index 9 will be the highest frequency. AVS bands are also assumed to be distributed equally among the whole spectrum. I.e. if TREBLE is the only one band provided, it will cover top third of target frequencies. All other bands will be assumed to have have equalization level equal to 0 dB, meaning no equalization. This value will be distributed among target bands for lower two thirds.

Member Function Documentation

◆ create()

std::shared_ptr< EqualizerLinearBandMapper > alexaClientSDK::equalizer::EqualizerLinearBandMapper::create ( int  numberOfTargetBands)
static

Factory method that creates a linear band mapper given the number of target bands.

Parameters
numberOfTargetBands
Returns

◆ mapEqualizerBands()

void alexaClientSDK::equalizer::EqualizerLinearBandMapper::mapEqualizerBands ( const avsCommon::sdkInterfaces::audio::EqualizerBandLevelMap bandLevelMap,
std::function< void(int, int)>  setBandCallback 
)
overridevirtual

Maps AVS band levels to the target equalizer bands. Number of target bands and mapping method are implementation specific. All supported bands should be defined. It is up to the implementation to decide what levels to use for missing bands.

Parameters
bandLevelMapMap of AVS bands and their levels.
setBandCallbackCallback receiving the target band index and the level to be applied. It is up to the user to set up implementation properly to be able to map index to the band. No particular order of indices is guaranteed. The signature of the callback is void callback(int bandIndex, int level);

Implements alexaClientSDK::equalizer::EqualizerBandMapperInterface.


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

AlexaClientSDK 1.20.1 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0