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, uint8_t channel_index, float volume, units::sample_u32_t start_offset, std::source_location source_location)

Data Fields

UnmutableSampleSpan buf_
 Samples to play for a single channel.
uint8_t channel_index_
 Channel index to play this sample at.
units::sample_u64_t offset_
 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).
units::sample_u32_t start_offset_
 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 35 of file audio_sample_processor.h.

Member Typedef Documentation

◆ UnmutableSampleSpan

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

Definition at line 37 of file audio_sample_processor.h.

Constructor & Destructor Documentation

◆ PlayableSampleSingleChannel()

zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::PlayableSampleSingleChannel ( UnmutableSampleSpan buf,
uint8_t channel_index,
float volume,
units::sample_u32_t start_offset,
std::source_location source_location )
inline

Definition at line 38 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 49 of file audio_sample_processor.h.

◆ channel_index_

uint8_t zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::channel_index_

Channel index to play this sample at.

Definition at line 54 of file audio_sample_processor.h.

◆ offset_

units::sample_u64_t zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::offset_

The current offset in the buffer.

Definition at line 57 of file audio_sample_processor.h.

◆ source_location_

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

Definition at line 68 of file audio_sample_processor.h.

◆ start_offset_

units::sample_u32_t zrythm::dsp::AudioSampleProcessor::PlayableSampleSingleChannel::start_offset_

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

Definition at line 65 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 61 of file audio_sample_processor.h.


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