Vital
Loading...
Searching...
No Matches
vital::Sample::SampleData Struct Reference

Holds the actual audio buffers (left/right) for multiple band-limited versions (both looped and non-looped), and associated metadata like length and sample rate. More...

#include <sample_source.h>

Public Member Functions

 SampleData (int l, int sr, bool s)
 Constructs a SampleData with basic metadata.
 

Public Attributes

int length
 Number of samples in the base (original) buffer.
 
int sample_rate
 Original sample rate of the data.
 
bool stereo
 True if the sample is stereo, false if mono.
 
std::vector< std::unique_ptr< mono_float[]> > left_buffers
 Collection of band-limited upsample/downsample buffers for the left channel.
 
std::vector< std::unique_ptr< mono_float[]> > left_loop_buffers
 Collection of band-limited upsample/downsample loop buffers for the left channel.
 
std::vector< std::unique_ptr< mono_float[]> > right_buffers
 Collection of band-limited upsample/downsample buffers for the right channel (stereo only).
 
std::vector< std::unique_ptr< mono_float[]> > right_loop_buffers
 Collection of band-limited upsample/downsample loop buffers for the right channel (stereo only).
 

Detailed Description

Holds the actual audio buffers (left/right) for multiple band-limited versions (both looped and non-looped), and associated metadata like length and sample rate.

Constructor & Destructor Documentation

◆ SampleData()

vital::Sample::SampleData::SampleData ( int l,
int sr,
bool s )
inline

Constructs a SampleData with basic metadata.

Parameters
lThe sample length in frames.
srThe sample rate.
sWhether this sample is stereo (true) or mono (false).

Member Data Documentation

◆ left_buffers

std::vector<std::unique_ptr<mono_float[]> > vital::Sample::SampleData::left_buffers

Collection of band-limited upsample/downsample buffers for the left channel.

◆ left_loop_buffers

std::vector<std::unique_ptr<mono_float[]> > vital::Sample::SampleData::left_loop_buffers

Collection of band-limited upsample/downsample loop buffers for the left channel.

◆ length

int vital::Sample::SampleData::length

Number of samples in the base (original) buffer.

◆ right_buffers

std::vector<std::unique_ptr<mono_float[]> > vital::Sample::SampleData::right_buffers

Collection of band-limited upsample/downsample buffers for the right channel (stereo only).

◆ right_loop_buffers

std::vector<std::unique_ptr<mono_float[]> > vital::Sample::SampleData::right_loop_buffers

Collection of band-limited upsample/downsample loop buffers for the right channel (stereo only).

◆ sample_rate

int vital::Sample::SampleData::sample_rate

Original sample rate of the data.

◆ stereo

bool vital::Sample::SampleData::stereo

True if the sample is stereo, false if mono.


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