Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel Struct Reference

A sample playback handle to be used by the engine. More...

#include <src/dsp/audio_sample_processor.h>

Public Types

using UnmutableSampleSpan = std::span<const float>

Public Member Functions

 PlayableSampleSingleChannel (UnmutableSampleSpan buf, channels_t channel_index, float volume, nframes_t start_offset, std::source_location source_location)

Data Fields

UnmutableSampleSpan buf_
 Samples to play for a single channel.
channels_t channel_index_
 Channel index to play this sample at.
unsigned_frame_t offset_ = 0
 The current offset in the buffer.
float volume_ = 1.0f
 The volume to play the sample at (ratio from 0.0 to 2.0, where 1.0 is the normal volume).
nframes_t start_offset_ = 0
 Offset relative to the current processing cycle to start playing the sample.
std::source_location source_location_

Detailed Description

A sample playback handle to be used by the engine.

Audio with multiple channels should call this once for each channel.

Definition at line 37 of file audio_sample_processor.h.

Member Typedef Documentation

◆ UnmutableSampleSpan

using zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::UnmutableSampleSpan = std::span<const float>

Definition at line 39 of file audio_sample_processor.h.

Constructor & Destructor Documentation

◆ PlayableSampleSingleChannel()

zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::PlayableSampleSingleChannel ( UnmutableSampleSpan buf,
channels_t channel_index,
float volume,
nframes_t start_offset,
std::source_location source_location )
inline

Definition at line 40 of file audio_sample_processor.h.

Field Documentation

◆ buf_

UnmutableSampleSpan zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::buf_

Samples to play for a single channel.

Definition at line 51 of file audio_sample_processor.h.

◆ channel_index_

channels_t zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::channel_index_

Channel index to play this sample at.

Definition at line 56 of file audio_sample_processor.h.

◆ offset_

unsigned_frame_t zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::offset_ = 0

The current offset in the buffer.

Definition at line 59 of file audio_sample_processor.h.

◆ source_location_

std::source_location zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::source_location_

Definition at line 70 of file audio_sample_processor.h.

◆ start_offset_

nframes_t zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::start_offset_ = 0

Offset relative to the current processing cycle to start playing the sample.

Definition at line 67 of file audio_sample_processor.h.

◆ volume_

float zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::volume_ = 1.0f

The volume to play the sample at (ratio from 0.0 to 2.0, where 1.0 is the normal volume).

Definition at line 63 of file audio_sample_processor.h.


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