AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Macros | Functions | Variables
WavUtils.cpp File Reference
#include <limits>
#include <fstream>
#include "AVSCommon/Utils/Endian.h"
#include "AVSCommon/Utils/Logger/Logger.h"
#include "AVSCommon/Utils/WavUtils.h"
Include dependency graph for WavUtils.cpp:

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::avsCommon
 
 alexaClientSDK::avsCommon::utils
 

Macros

#define LX(event)   alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)
 

Functions

static const std::string alexaClientSDK::avsCommon::utils::TAG ("WavUtils")
 
static void alexaClientSDK::avsCommon::utils::writeToWavHeader (uint16_t input, ByteVector *header)
 
static void alexaClientSDK::avsCommon::utils::writeToWavHeader (uint32_t input, ByteVector *header)
 
static void alexaClientSDK::avsCommon::utils::writeToWavHeader (const char *input, ByteVector *header)
 
static uint16_t alexaClientSDK::avsCommon::utils::readShortFromHeader (char *buffer, unsigned int offset)
 
static uint32_t alexaClientSDK::avsCommon::utils::readLongFromHeader (char *buffer, unsigned int offset)
 
static uint32_t alexaClientSDK::avsCommon::utils::readFourCharFromHeader (char *buffer, unsigned int offset)
 
ByteVector alexaClientSDK::avsCommon::utils::generateWavHeader (unsigned int bytesPerSample, unsigned int channels, unsigned int rate, std::chrono::milliseconds totalDuration, bool isPCM=true)
 
bool alexaClientSDK::avsCommon::utils::readWAVFile (const std::string &absoluteFilePath, std::vector< uint16_t > *audioBuffer, WavHeader &wavHeader, bool isPCM=true)
 

Variables

static const int alexaClientSDK::avsCommon::utils::SHORT_CHUNK_SIZE = 2
 
static const int alexaClientSDK::avsCommon::utils::LONG_CHUNK_SIZE = 4
 

Macro Definition Documentation

◆ LX

#define LX (   event)    alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)

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