stdex Additional custom or not Standard C++ covered algorithms

Loading...
Searching...
No Matches
Public Types | Public Attributes | Friends | List of all members
stdex::wav::format Struct Reference

Waveform format. More...

`#include <stdex/wav.hpp>`

## Public Types
enum class | compression_t : uint16_t { unknown = 0x0000 , pcm = 0x0001 , microsoft_adpcm = 0x0002 , pcm_float = 0x0003 , itu_g711_a_law = 0x0006 , itu_g711_mu_law = 0x0007 , ima_adpcm = 0x0011 , itu_g_723_adpcm = 0x0016 , gsm_6_10 = 0x0031 , itu_g_721_adpcm = 0x0040 , mpeg = 0x0050 , experimental = 0xffff }
using | record = stdex::idrec::record<format, id_t, 0x20746D66 , length_t, align>

## Public Attributes
enum stdex::wav::format::compression_t | compression = compression_t::unknown
| Waveform compression.
uint16_t | num_channels = 0
| The number of channels specifies how many separate audio signals that are encoded in the wave data chunk (1 - mono, 2 - stereo)
uint32_t | sample_rate = 0
| The number of sample slices per second (Hz). This value is unaffected by the number of channels.
uint32_t | bytes_per_second = 0
| How many bytes of wave data must be streamed to a D/A converter per second in order to play the wave file. This information is useful when determining if data can be streamed from the source fast enough to keep up with playback. This value can be easily calculated with the formula: `sample_rate * block_align`
uint16_t | block_align = 0
| The number of bytes per sample slice (all channels). This value is not affected by the number of channels and can be calculated with the formula: `bits_per_channel / 8 * num_channels`
uint16_t | bits_per_channel = 0
| The number of bits used to define each sample. This value is usually 8, 16, 24 or 32. If the number of bits is not byte aligned (a multiple of 8) then the number of bytes used per sample is rounded up to the nearest byte size and the unused bytes are set to 0 and ignored.
stdex::stream::memory_file | extra
| Additional format data.

## Friends
stdex::stream::basic & | operator<< (stdex::stream::basic &dat, const format &data)
stdex::stream::basic & | operator>> (stdex::stream::basic &dat, format &data)

## Detailed Description

Waveform format.

## Member Enumeration Documentation

## ◆ compression_t

enum class stdex::wav::format::compression_t : uint16_t
| strong

Enumerator
unknown | Unknown.
pcm | PCM/uncompressed integral.
microsoft_adpcm | Microsoft ADPCM.
pcm_float | PCM/uncompressed floating point.
itu_g711_a_law | ITU G.711 a-law.
itu_g711_mu_law | ITU G.711 µ-law.
ima_adpcm | IMA ADPCM.
itu_g_723_adpcm | ITU G.723 ADPCM (Yamaha)
gsm_6_10 | GSM 6.10.
itu_g_721_adpcm | ITU G.721 ADPCM.
mpeg | MPEG.
experimental | Experimental.

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

- include/stdex/wav.hpp