Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::sndio::WavHeader Class Reference

WAV header. More...

#include <wav_header.h>

Classes

struct  WavHeaderData
 WAV header data. More...
 

Public Member Functions

 WavHeader (uint16_t num_channels, uint32_t sample_rate, uint16_t bits_per_sample)
 Initialize. More...
 
uint16_t num_channels () const
 Get number of channels. More...
 
uint32_t sample_rate () const
 Get sample rate. More...
 
uint16_t bits_per_sample () const
 Get number of bits per sample. More...
 
void reset_sample_counter (uint32_t num_samples)
 Resets samples counter. More...
 
const WavHeaderDataupdate_and_get_header (uint32_t num_samples)
 Updates samples num and returns header data. More...
 

Detailed Description

WAV header.

Remarks
Holds data of a WAV header Allows easy generation of WAV header

Definition at line 25 of file wav_header.h.

Constructor & Destructor Documentation

◆ WavHeader()

roc::sndio::WavHeader::WavHeader ( uint16_t  num_channels,
uint32_t  sample_rate,
uint16_t  bits_per_sample 
)

Initialize.

Member Function Documentation

◆ bits_per_sample()

uint16_t roc::sndio::WavHeader::bits_per_sample ( ) const

Get number of bits per sample.

◆ num_channels()

uint16_t roc::sndio::WavHeader::num_channels ( ) const

Get number of channels.

◆ reset_sample_counter()

void roc::sndio::WavHeader::reset_sample_counter ( uint32_t  num_samples)

Resets samples counter.

◆ sample_rate()

uint32_t roc::sndio::WavHeader::sample_rate ( ) const

Get sample rate.

◆ update_and_get_header()

const WavHeaderData& roc::sndio::WavHeader::update_and_get_header ( uint32_t  num_samples)

Updates samples num and returns header data.


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