Beatmup
Beatmup::Audio::WAV::Header Class Reference

WAV file header. More...

#include <wav_utilities.h>

Public Member Functions

void set (uint32_t sampleRate, uint16_t bitsPerSample, uint16_t channelCount, uint32_t dataSize)
 

Public Attributes

uint32_t m_RIFF
 
uint32_t chunkSize
 
uint32_t m_WAVE
 
uint32_t m_fmt_
 
uint32_t __16
 
uint16_t audioFormat
 
uint16_t numChannels
 
uint32_t sampleRate
 
uint32_t byteRate
 
uint16_t blockAlign
 
uint16_t bitsPerSample
 
uint32_t m_data
 
uint32_t dataSizeBytes
 

Static Public Attributes

static const uint32_t __RIFF = 1179011410
 
static const uint32_t __WAVE = 1163280727
 
static const uint32_t __fmt_ = 544501094
 
static const uint32_t __data = 1635017060
 

Detailed Description

WAV file header.

Definition at line 34 of file wav_utilities.h.

Member Function Documentation

◆ set()

void Header::set ( uint32_t  sampleRate,
uint16_t  bitsPerSample,
uint16_t  channelCount,
uint32_t  dataSize 
)

Definition at line 24 of file wav_utilities.cpp.

24  {
25  m_RIFF = __RIFF;
26  m_WAVE = __WAVE;
27  m_fmt_ = __fmt_;
28  m_data = __data;
29  __16 = 16;
30  audioFormat = 1;
31  this->sampleRate = sampleRate;
33  this->numChannels = channelCount;
34  blockAlign = channelCount * bitsPerSample / 8;
36  dataSizeBytes = 0;
37  this->dataSizeBytes = dataSize;
38  this->chunkSize = sizeof(Header) + dataSize - 8;
39 }
static const uint32_t __RIFF
Definition: wav_utilities.h:56
static const uint32_t __fmt_
Definition: wav_utilities.h:58
static const uint32_t __WAVE
Definition: wav_utilities.h:57
static const uint32_t __data
Definition: wav_utilities.h:59

Member Data Documentation

◆ m_RIFF

uint32_t Beatmup::Audio::WAV::Header::m_RIFF

Definition at line 37 of file wav_utilities.h.

◆ chunkSize

uint32_t Beatmup::Audio::WAV::Header::chunkSize

Definition at line 38 of file wav_utilities.h.

◆ m_WAVE

uint32_t Beatmup::Audio::WAV::Header::m_WAVE

Definition at line 39 of file wav_utilities.h.

◆ m_fmt_

uint32_t Beatmup::Audio::WAV::Header::m_fmt_

Definition at line 40 of file wav_utilities.h.

◆ __16

uint32_t Beatmup::Audio::WAV::Header::__16

Definition at line 41 of file wav_utilities.h.

◆ audioFormat

uint16_t Beatmup::Audio::WAV::Header::audioFormat

Definition at line 43 of file wav_utilities.h.

◆ numChannels

uint16_t Beatmup::Audio::WAV::Header::numChannels

Definition at line 44 of file wav_utilities.h.

◆ sampleRate

uint32_t Beatmup::Audio::WAV::Header::sampleRate

Definition at line 46 of file wav_utilities.h.

◆ byteRate

uint32_t Beatmup::Audio::WAV::Header::byteRate

Definition at line 47 of file wav_utilities.h.

◆ blockAlign

uint16_t Beatmup::Audio::WAV::Header::blockAlign

Definition at line 49 of file wav_utilities.h.

◆ bitsPerSample

uint16_t Beatmup::Audio::WAV::Header::bitsPerSample

Definition at line 50 of file wav_utilities.h.

◆ m_data

uint32_t Beatmup::Audio::WAV::Header::m_data

Definition at line 52 of file wav_utilities.h.

◆ dataSizeBytes

uint32_t Beatmup::Audio::WAV::Header::dataSizeBytes

Definition at line 53 of file wav_utilities.h.

◆ __RIFF

const uint32_t Beatmup::Audio::WAV::Header::__RIFF = 1179011410
static

Definition at line 56 of file wav_utilities.h.

◆ __WAVE

const uint32_t Beatmup::Audio::WAV::Header::__WAVE = 1163280727
static

Definition at line 57 of file wav_utilities.h.

◆ __fmt_

const uint32_t Beatmup::Audio::WAV::Header::__fmt_ = 544501094
static

Definition at line 58 of file wav_utilities.h.

◆ __data

const uint32_t Beatmup::Audio::WAV::Header::__data = 1635017060
static

Definition at line 59 of file wav_utilities.h.


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