|
HikoGUI
A low latency retained GUI
|
#include <ttauri/audio/audio_block.hpp>
Public Member Functions | |
| ssize_t | number_of_samples () const noexcept |
| Number of samples in this audio block. | |
| std::span< float > | samples_for_channel (ssize_t index) noexcept |
| Sample data for a channel. | |
Data Fields | |
| ssize_t | number_of_vectors |
| Number of vector of samples in this audio block. | |
| ssize_t | number_of_channels |
| Number of channels in this audio block. | |
| std::span< float > | samples |
| Sample data. | |
| uint64_t | sample_position |
| The sample position of the first sample in this block since the start of the capture/render session. | |
| hires_utc_clock::time_point | timestamp |
| Timestamp when the sample first sample in this block was captured at the audio device input or when the first sample in this block will appear at the audio device output. | |
| double | word_clock_sample_rate |
| Sample rate of the word clock attached to the audio interface For example in some situation on film sets the audio interface sample rate is overdriven to 48048 Hz. | |
| double | device_sample_rate |
| Sample rate to what the audio device is configured to. | |
| bool | corrupt |
| The sample data in this block was corrupted Examples of how corruption could happen: | |
| bool | silent |
| This block of audio is silent. | |
Static Public Attributes | |
| static constexpr ssize_t | samples_per_vector = 16 |
| The number of samples in a vector. | |
A block of audio data.
This represents a block of audio data received from, or to be send to, an audio device.
The samples in this block are always in native floating point format for easy processing. The samples are stored continues for each channel so that processing can be done at a per-channel basis using SSE instructions, for this reason the samples are aligned and in a multiple of the largest vector instructions.
|
inlinenoexcept |
Number of samples in this audio block.
The number of samples is always a multiple of samples_per_vector.
|
inlinenoexcept |
Sample data for a channel.
The samples are aligned to samples_per_vector * sizeof(float) bytes.
silent or corrupt. | bool tt::audio_block::corrupt |
The sample data in this block was corrupted Examples of how corruption could happen:
If true data is nullptr.
| double tt::audio_block::device_sample_rate |
Sample rate to what the audio device is configured to.
| ssize_t tt::audio_block::number_of_channels |
Number of channels in this audio block.
| ssize_t tt::audio_block::number_of_vectors |
Number of vector of samples in this audio block.
| uint64_t tt::audio_block::sample_position |
The sample position of the first sample in this block since the start of the capture/render session.
| std::span<float> tt::audio_block::samples |
Sample data.
The samples are organized non-interleaved; continues samples of a single channel followed by continues samples of the next channel.
The samples are aligned to samples_per_vector * sizeof(float) bytes.
Samples is empty when silent or corrupt.
|
staticconstexpr |
The number of samples in a vector.
| bool tt::audio_block::silent |
This block of audio is silent.
If true data is nullptr.
| hires_utc_clock::time_point tt::audio_block::timestamp |
Timestamp when the sample first sample in this block was captured at the audio device input or when the first sample in this block will appear at the audio device output.
hires_utc_clock::time_point::max() when the timestamp is invalid.
| double tt::audio_block::word_clock_sample_rate |
Sample rate of the word clock attached to the audio interface For example in some situation on film sets the audio interface sample rate is overdriven to 48048 Hz.