|
HikoGUI
A low latency retained GUI
|
#include <ttauri/audio/audio_sample_format.hpp>
Public Member Functions | |
| float | pack_multiplier () const noexcept |
| How much to multiply float samples to create integer samples. | |
| float | unpack_multiplier () const noexcept |
| How much to multiply integer samples to create float samples. | |
| int | num_samples_per_chunk () const noexcept |
| The number of packed samples that are handled in a single 128 bit load or store. | |
| int | chunk_stride () const noexcept |
| The number of bytes to advance to the next chunk to be loaded or stored. | |
| int | num_chunks_per_quad () const noexcept |
| The number of chunks to load or store to handle 4 samples. | |
| size_t | num_fast_quads (size_t num_samples) const noexcept |
| Calculate the number of 4 sample-quads can be handled as chunked loads and stores. | |
| i8x16 | load_shuffle_indices () const noexcept |
| Return a shuffle indices for loading samples into 32 bit integers. | |
| i8x16 | store_shuffle_indices () const noexcept |
| Return a shuffle indices for storing 32 bit samples into packed samples. | |
| i8x16 | concat_shuffle_indices () const noexcept |
| Return a shuffle indices to shift previous loaded samples for concatenation. | |
| bool | is_valid () const noexcept |
| Is the audio sample format valid. | |
Data Fields | |
| int | num_bytes |
| The number of bytes of the container. | |
| int | num_guard_bits |
| The number of bits used for the integer part of a fixed point number. | |
| int | num_bits |
| The number of significant bits of the sample format. | |
| bool | is_float |
| The numeric type is floating point. | |
| std::endian | endian |
| The endian order of the bytes in the container. | |
| int | stride |
| The number of bytes to step to the next sample of the same channel. | |
Audio sample format.
Audio samples described by this type can be in three different formats.
num_integer_bits is set to zero. This is the format used in most audio file formats.Sample values are aligned to the most significant bits of the container described by num_bytes. The bottom bits are set to zero.
|
noexcept |
The number of bytes to advance to the next chunk to be loaded or stored.
|
noexcept |
Return a shuffle indices to shift previous loaded samples for concatenation.
|
noexcept |
Is the audio sample format valid.
|
noexcept |
Return a shuffle indices for loading samples into 32 bit integers.
|
noexcept |
The number of chunks to load or store to handle 4 samples.
|
noexcept |
Calculate the number of 4 sample-quads can be handled as chunked loads and stores.
|
noexcept |
The number of packed samples that are handled in a single 128 bit load or store.
Always one of: 1, 2 or 4.
|
noexcept |
How much to multiply float samples to create integer samples.
|
noexcept |
Return a shuffle indices for storing 32 bit samples into packed samples.
|
noexcept |
How much to multiply integer samples to create float samples.
| std::endian tt::audio_sample_format::endian |
The endian order of the bytes in the container.
| bool tt::audio_sample_format::is_float |
The numeric type is floating point.
Otherwise it is a signed integer or fixed point number.
| int tt::audio_sample_format::num_bits |
The number of significant bits of the sample format.
This value is excluding the sign. (1 << num_bits) - 1 is the maximum sample value.
Examples:
| int tt::audio_sample_format::num_bytes |
The number of bytes of the container.
Must be either 1, 2, 3 or 4
| int tt::audio_sample_format::num_guard_bits |
The number of bits used for the integer part of a fixed point number.
This value is zero for signed integer and float samples.
| int tt::audio_sample_format::stride |
The number of bytes to step to the next sample of the same channel.