Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
SamplePlayback Struct Reference

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

#include <src/gui/dsp/sample_playback.h>

Public Member Functions

 SamplePlayback (std::shared_ptr< zrythm::utils::audio::AudioBuffer > buf, float volume, nframes_t start_offset, const char *file, const char *func, int lineno)

Data Fields

std::shared_ptr< zrythm::utils::audio::AudioBufferbuf_
 A pointer to the original buffer.
unsigned_frame_t offset_ = 0
 The number of channels.
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.
const char * file_ = nullptr
 Source file initialized from.
const char * func_ = nullptr
 Function initialized from.
int lineno_ = 0
 Line no initialized from.

Detailed Description

A sample playback handle to be used by the engine.

Definition at line 30 of file sample_playback.h.

Constructor & Destructor Documentation

◆ SamplePlayback()

SamplePlayback::SamplePlayback ( std::shared_ptr< zrythm::utils::audio::AudioBuffer > buf,
float volume,
nframes_t start_offset,
const char * file,
const char * func,
int lineno )
inline

Definition at line 34 of file sample_playback.h.

Field Documentation

◆ buf_

std::shared_ptr<zrythm::utils::audio::AudioBuffer> SamplePlayback::buf_

A pointer to the original buffer.

Definition at line 46 of file sample_playback.h.

◆ file_

const char* SamplePlayback::file_ = nullptr

Source file initialized from.

Definition at line 66 of file sample_playback.h.

◆ func_

const char* SamplePlayback::func_ = nullptr

Function initialized from.

Definition at line 69 of file sample_playback.h.

◆ lineno_

int SamplePlayback::lineno_ = 0

Line no initialized from.

Definition at line 72 of file sample_playback.h.

◆ offset_

unsigned_frame_t SamplePlayback::offset_ = 0

The number of channels.

The number of frames in the buffer. The current offset in the buffer.

Definition at line 55 of file sample_playback.h.

◆ start_offset_

nframes_t SamplePlayback::start_offset_ = 0

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

Definition at line 63 of file sample_playback.h.

◆ volume_

float SamplePlayback::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 59 of file sample_playback.h.


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