A non-owning wrapper for a byte buffer containing a WAV file.
More...
#include <wav.h>
|
enum class | offset : std::size_t {
RIFF_SEG = 0
, SEG_SIZE = 4
, WAVE_SEG = 8
, FMT_SEG = 12
,
FMT_SIZE = 16
, FORMAT = 20
, CHANNELS = 22
, RATE = 24
,
BYTES_PER_SEC = 28
, BLOCK_ALIGN = 32
, BITS_PER_SAMPLE = 34
, DATA_SEG = 36
,
DATA_SIZE = 40
, DATA = HEADER_SIZE
, RIFF_SEG = 0
, SEG_SIZE = 4
,
WAVE_SEG = 8
, FMT_SEG = 12
, FMT_SIZE = 16
, FORMAT = 20
,
CHANNELS = 22
, RATE = 24
, BYTES_PER_SEC = 28
, BLOCK_ALIGN = 32
,
BITS_PER_SAMPLE = 34
, DATA_SEG = 36
, DATA_SIZE = 40
, DATA = HEADER_SIZE
} |
|
enum class | offset : std::size_t {
RIFF_SEG = 0
, SEG_SIZE = 4
, WAVE_SEG = 8
, FMT_SEG = 12
,
FMT_SIZE = 16
, FORMAT = 20
, CHANNELS = 22
, RATE = 24
,
BYTES_PER_SEC = 28
, BLOCK_ALIGN = 32
, BITS_PER_SAMPLE = 34
, DATA_SEG = 36
,
DATA_SIZE = 40
, DATA = HEADER_SIZE
, RIFF_SEG = 0
, SEG_SIZE = 4
,
WAVE_SEG = 8
, FMT_SEG = 12
, FMT_SIZE = 16
, FORMAT = 20
,
CHANNELS = 22
, RATE = 24
, BYTES_PER_SEC = 28
, BLOCK_ALIGN = 32
,
BITS_PER_SAMPLE = 34
, DATA_SEG = 36
, DATA_SIZE = 40
, DATA = HEADER_SIZE
} |
|
|
constexpr std::span< std::byte > | subspan (offset o, std::size_t n) const |
|
template<typename T > |
constexpr T | read (offset o) const |
|
template<typename T > |
constexpr void | write (offset o, const T &x) const |
|
constexpr std::size_t | size (void) const |
|
constexpr std::span< std::byte > | subspan (offset o, std::size_t n) const |
|
template<typename T > |
constexpr T | read (offset o) const |
|
template<typename T > |
constexpr void | write (offset o, const T &x) const |
|
constexpr std::size_t | size (void) const |
|
|
std::span< std::byte > | b = {} |
|
A non-owning wrapper for a byte buffer containing a WAV file.
◆ offset [1/2]
Enumerator |
---|
RIFF_SEG | |
SEG_SIZE | |
WAVE_SEG | |
FMT_SEG | |
FMT_SIZE | |
FORMAT | |
CHANNELS | |
RATE | |
BYTES_PER_SEC | |
BLOCK_ALIGN | |
BITS_PER_SAMPLE | |
DATA_SEG | |
DATA_SIZE | |
DATA | |
RIFF_SEG | |
SEG_SIZE | |
WAVE_SEG | |
FMT_SEG | |
FMT_SIZE | |
FORMAT | |
CHANNELS | |
RATE | |
BYTES_PER_SEC | |
BLOCK_ALIGN | |
BITS_PER_SAMPLE | |
DATA_SEG | |
DATA_SIZE | |
DATA | |
◆ offset [2/2]
Enumerator |
---|
RIFF_SEG | |
SEG_SIZE | |
WAVE_SEG | |
FMT_SEG | |
FMT_SIZE | |
FORMAT | |
CHANNELS | |
RATE | |
BYTES_PER_SEC | |
BLOCK_ALIGN | |
BITS_PER_SAMPLE | |
DATA_SEG | |
DATA_SIZE | |
DATA | |
RIFF_SEG | |
SEG_SIZE | |
WAVE_SEG | |
FMT_SEG | |
FMT_SIZE | |
FORMAT | |
CHANNELS | |
RATE | |
BYTES_PER_SEC | |
BLOCK_ALIGN | |
BITS_PER_SAMPLE | |
DATA_SEG | |
DATA_SIZE | |
DATA | |
◆ WAV() [1/4]
Constructs an empty object, must be initialized before it is used.
◆ WAV() [2/4]
constexpr nngn::WAV::WAV |
( |
std::span< std::byte > |
buffer | ) |
|
|
inlineexplicitconstexpr |
◆ WAV() [3/4]
Constructs an empty object, must be initialized before it is used.
◆ WAV() [4/4]
constexpr nngn::WAV::WAV |
( |
std::span< std::byte > |
buffer | ) |
|
|
explicitconstexpr |
◆ bits_per_sample() [1/2]
constexpr u16 nngn::WAV::bits_per_sample |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ bits_per_sample() [2/2]
constexpr u16 nngn::WAV::bits_per_sample |
( |
void |
| ) |
const |
|
constexpr |
◆ channels() [1/2]
constexpr u16 nngn::WAV::channels |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ channels() [2/2]
constexpr u16 nngn::WAV::channels |
( |
void |
| ) |
const |
|
constexpr |
◆ check() [1/2]
bool nngn::WAV::check |
( |
void |
| ) |
const |
◆ check() [2/2]
bool nngn::WAV::check |
( |
void |
| ) |
const |
◆ data() [1/2]
constexpr std::span< std::byte > nngn::WAV::data |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ data() [2/2]
constexpr std::span< std::byte > nngn::WAV::data |
( |
void |
| ) |
const |
|
constexpr |
◆ fill() [1/2]
constexpr void nngn::WAV::fill |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ fill() [2/2]
constexpr void nngn::WAV::fill |
( |
void |
| ) |
const |
|
constexpr |
◆ fmt_size() [1/2]
constexpr u32 nngn::WAV::fmt_size |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ fmt_size() [2/2]
constexpr u32 nngn::WAV::fmt_size |
( |
void |
| ) |
const |
|
constexpr |
◆ format() [1/2]
constexpr u16 nngn::WAV::format |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ format() [2/2]
constexpr u16 nngn::WAV::format |
( |
void |
| ) |
const |
|
constexpr |
◆ n_samples() [1/2]
constexpr std::size_t nngn::WAV::n_samples |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ n_samples() [2/2]
constexpr std::size_t nngn::WAV::n_samples |
( |
void |
| ) |
const |
|
constexpr |
◆ rate() [1/2]
constexpr u32 nngn::WAV::rate |
( |
void |
| ) |
const |
|
inlineconstexpr |
◆ rate() [2/2]
constexpr u32 nngn::WAV::rate |
( |
void |
| ) |
const |
|
constexpr |
◆ read() [1/2]
constexpr T nngn::WAV::read |
( |
offset |
o | ) |
const |
|
constexprprivate |
◆ read() [2/2]
constexpr T nngn::WAV::read |
( |
offset |
o | ) |
const |
|
constexprprivate |
◆ set_channels() [1/2]
constexpr void nngn::WAV::set_channels |
( |
u16 |
c | ) |
const |
|
inlineconstexpr |
◆ set_channels() [2/2]
constexpr void nngn::WAV::set_channels |
( |
u16 |
c | ) |
const |
|
constexpr |
◆ set_rate() [1/2]
constexpr void nngn::WAV::set_rate |
( |
u32 |
r | ) |
const |
|
inlineconstexpr |
◆ set_rate() [2/2]
constexpr void nngn::WAV::set_rate |
( |
u32 |
r | ) |
const |
|
constexpr |
◆ set_size() [1/2]
constexpr void nngn::WAV::set_size |
( |
u32 |
s | ) |
const |
|
inlineconstexpr |
◆ set_size() [2/2]
constexpr void nngn::WAV::set_size |
( |
u32 |
s | ) |
const |
|
constexpr |
◆ size() [1/2]
constexpr std::size_t nngn::WAV::size |
( |
void |
| ) |
const |
|
inlineconstexprprivate |
◆ size() [2/2]
constexpr std::size_t nngn::WAV::size |
( |
void |
| ) |
const |
|
constexprprivate |
◆ subspan() [1/2]
constexpr std::span< std::byte > nngn::WAV::subspan |
( |
offset |
o, |
|
|
std::size_t |
n |
|
) |
| const |
|
inlineconstexprprivate |
◆ subspan() [2/2]
constexpr std::span< std::byte > nngn::WAV::subspan |
( |
offset |
o, |
|
|
std::size_t |
n |
|
) |
| const |
|
constexprprivate |
◆ write() [1/2]
constexpr void nngn::WAV::write |
( |
offset |
o, |
|
|
const T & |
x |
|
) |
| const |
|
constexprprivate |
◆ write() [2/2]
constexpr void nngn::WAV::write |
( |
offset |
o, |
|
|
const T & |
x |
|
) |
| const |
|
constexprprivate |
std::span< std::byte > nngn::WAV::b = {} |
|
private |
◆ HEADER_SIZE
static constexpr std::size_t nngn::WAV::HEADER_SIZE = 44 |
|
staticconstexpr |
The documentation for this class was generated from the following files: