HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
hi::v1::audio_sample_packer Class Reference

Public Member Functions

 audio_sample_packer (audio_sample_format format, std::size_t stride) noexcept
 Audio sample packer One instance of this class can be used to pack multiple buffers either from one audio-proc to the next, or for each channel in a group of interleaved channels.
 
void operator() (float const *hi_restrict src, std::byte *hi_restrict dst, std::size_t num_samples) const noexcept
 Unpack samples.
 

Constructor & Destructor Documentation

◆ audio_sample_packer()

hi::v1::audio_sample_packer::audio_sample_packer ( audio_sample_format format,
std::size_t stride )
inlinenoexcept

Audio sample packer One instance of this class can be used to pack multiple buffers either from one audio-proc to the next, or for each channel in a group of interleaved channels.

Parameters
formatThe sample format.
strideNumber of bytes to step for the next sample of the same channel.

Member Function Documentation

◆ operator()()

void hi::v1::audio_sample_packer::operator() ( float const *hi_restrict src,
std::byte *hi_restrict dst,
std::size_t num_samples ) const
inlinenoexcept

Unpack samples.

Parameters
srcA pointer to an array of floating point samples of a single channel.
dstA pointer to a byte array to store the packed samples into.
num_samplesNumber of samples.

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