AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Typedefs | Functions | Variables
WavUtils.h File Reference
#include <chrono>
#include <string>
#include <vector>
Include dependency graph for WavUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  alexaClientSDK::avsCommon::utils::WavHeader
 

Namespaces

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

Typedefs

using alexaClientSDK::avsCommon::utils::ByteVector = std::vector< unsigned char >
 

Functions

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

constexpr const char * alexaClientSDK::avsCommon::utils::ID_RIFF = "RIFF"
 
constexpr const char * alexaClientSDK::avsCommon::utils::ID_WAVE = "WAVE"
 
constexpr const char * alexaClientSDK::avsCommon::utils::ID_FMT = "fmt "
 
constexpr const char * alexaClientSDK::avsCommon::utils::ID_DATA = "data"
 
constexpr uint32_t alexaClientSDK::avsCommon::utils::PCM_SUBCHUNK_SZ = 16
 
constexpr uint16_t alexaClientSDK::avsCommon::utils::FORMAT_PCM = 1
 
constexpr uint16_t alexaClientSDK::avsCommon::utils::BITS_PER_BYTE = 8
 
constexpr uint16_t alexaClientSDK::avsCommon::utils::PLAY_BITS_PER_SAMPLE = 16
 
constexpr uint16_t alexaClientSDK::avsCommon::utils::FORMAT_IEEE_FLOAT = 3
 
constexpr uint32_t alexaClientSDK::avsCommon::utils::FLOAT_SUBCHUNK_SZ = 18
 
constexpr uint32_t alexaClientSDK::avsCommon::utils::FACT_CHUNK_SZ = 4
 
constexpr const char * alexaClientSDK::avsCommon::utils::ID_FACT = "fact"
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::PCM_HEADER_SIZE = 44
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::NON_PCM_HEADER_SIZE = 58
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::RIFF_ID_OFFSET = 0
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::RIFF_SZ_OFFSET = 4
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::RIFF_FMT_OFFSET = 8
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::FMT_ID_OFFSET = 12
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::FMT_SZ_OFFSET = 16
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::AUDIO_FORMAT_OFFSET = 20
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::NUM_CHANNELS_OFFSET = 22
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::SAMPLE_RATE_OFFSET = 24
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::BYTE_RATE_OFFSET = 28
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::BLOCK_ALIGN_OFFSET = 32
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::BITS_PER_SAMPLE_OFFSET = 34
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::DATA_ID_OFFSET = 36
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::DATA_SZ_OFFSET = 40
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::CB_SZ_OFFSET = 36
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::FACT_ID_OFFSET = 38
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::FACT_SZ_OFFSET = 42
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::FACT_SAMPLE_LEN_OFFSET = 46
 
constexpr unsigned int alexaClientSDK::avsCommon::utils::NON_PCM_OFFSET = 14
 

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