#include <audio_buffer.h>
|
| AudioBuffer (size_t capacity) |
|
| ~AudioBuffer () |
|
void | silence (samplecnt_t len, samplecnt_t offset=0) |
|
bool | silent_data () const |
|
void | read_from (const Sample *src, samplecnt_t len, sampleoffset_t dst_offset=0, sampleoffset_t src_offset=0) |
|
void | read_from (const Buffer &src, samplecnt_t len, sampleoffset_t dst_offset=0, sampleoffset_t src_offset=0) |
|
void | merge_from (const Buffer &src, samplecnt_t len, sampleoffset_t dst_offset=0, sampleoffset_t src_offset=0) |
|
void | accumulate_from (const AudioBuffer &src, samplecnt_t len, sampleoffset_t dst_offset=0, sampleoffset_t src_offset=0) |
|
void | accumulate_from (const Sample *src, samplecnt_t len, sampleoffset_t dst_offset=0, sampleoffset_t src_offset=0) |
|
void | accumulate_with_gain_from (const AudioBuffer &src, samplecnt_t len, gain_t gain_coeff, sampleoffset_t dst_offset=0, sampleoffset_t src_offset=0) |
|
void | accumulate_with_gain_from (const Sample *src_raw, samplecnt_t len, gain_t gain_coeff, sampleoffset_t dst_offset=0) |
|
void | accumulate_with_ramped_gain_from (const Sample *src, samplecnt_t len, gain_t initial, gain_t target, sampleoffset_t dst_offset=0) |
|
void | apply_gain (gain_t gain, samplecnt_t len) |
|
void | set_data (Sample *data, size_t size) |
|
void | resize (size_t nframes) |
|
const Sample * | data (samplecnt_t offset=0) const |
|
Sample * | data (samplecnt_t offset=0) |
|
bool | check_silence (pframes_t nframes, pframes_t &n) const |
|
void | prepare () |
|
bool | written () const |
|
void | set_written (bool w) |
|
| Buffer (const Buffer &)=delete |
|
Buffer & | operator= (const Buffer &)=delete |
|
virtual | ~Buffer () |
|
size_t | capacity () const |
|
DataType | type () const |
|
bool | silent () const |
|
virtual void | clear () |
|
Buffer containing audio data.
Definition at line 32 of file audio_buffer.h.
◆ AudioBuffer()
ARDOUR::AudioBuffer::AudioBuffer |
( |
size_t |
capacity | ) |
|
◆ ~AudioBuffer()
ARDOUR::AudioBuffer::~AudioBuffer |
( |
| ) |
|
◆ accumulate_from() [1/2]
Accumulate (add) len
samples from src
starting at src_offset
into self starting at dst_offset
Definition at line 99 of file audio_buffer.h.
◆ accumulate_from() [2/2]
Accumulate (add) len
samples of src
starting at src_offset
into self starting at dst_offset
Definition at line 118 of file audio_buffer.h.
◆ accumulate_with_gain_from() [1/2]
Accumulate (add) len
samples if src
starting at src_offset
into self starting at dst_offset
scaling by gain_coeff
Definition at line 135 of file audio_buffer.h.
◆ accumulate_with_gain_from() [2/2]
Accumulate (add) len
samples from the start of src_raw
into self at dst_offset
scaling by gain_coeff
Definition at line 156 of file audio_buffer.h.
◆ accumulate_with_ramped_gain_from()
Accumulate (add) len
samples from the start of src
into self at dst_offset
using a linear gain ramp from initial
to target
.
Definition at line 172 of file audio_buffer.h.
◆ apply_gain()
Apply a fixed gain factor to the audio buffer
- Parameters
-
gain | gain factor |
len | number of samples to amplify |
Definition at line 198 of file audio_buffer.h.
◆ check_silence()
Check buffer for silence
- Parameters
-
nframes | number of samples to check |
n | first non zero sample (if any) |
- Returns
- true if all samples are zero
◆ data() [1/2]
◆ data() [2/2]
◆ merge_from()
Accumulate (add) len
samples from src
starting at src_offset
into self starting at dst_offset
Implements ARDOUR::Buffer.
Definition at line 91 of file audio_buffer.h.
◆ prepare()
void ARDOUR::AudioBuffer::prepare |
( |
| ) |
|
|
inline |
◆ read_from() [1/2]
Copy samples from src buffer starting at src_offset into self starting at dst_offset
- Parameters
-
src | buffer to read from |
len | number of samples to copy |
dst_offset | offset in destination buffer |
src_offset | start offset in src buffer |
Implements ARDOUR::Buffer.
Definition at line 68 of file audio_buffer.h.
◆ read_from() [2/2]
Copy samples from src array starting at src_offset into self starting at dst_offset
- Parameters
-
src | array to read from |
len | number of samples to copy |
dst_offset | offset in destination buffer |
src_offset | start offset in src buffer |
Definition at line 52 of file audio_buffer.h.
◆ resize()
void ARDOUR::AudioBuffer::resize |
( |
size_t |
nframes | ) |
|
|
virtual |
Reallocate the buffer used internally to handle at least nframes
of data
Constructor MUST have been passed capacity!=0 or this will die (to prevent mem leaks).
Implements ARDOUR::Buffer.
◆ set_data()
void ARDOUR::AudioBuffer::set_data |
( |
Sample * |
data, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Set the data contained by this buffer manually (for setting directly to jack buffer).
Constructor MUST have been passed capacity=0 or this will die (to prevent mem leaks).
Definition at line 214 of file audio_buffer.h.
◆ set_written()
void ARDOUR::AudioBuffer::set_written |
( |
bool |
w | ) |
|
|
inline |
◆ silence()
silence buffer
- Parameters
-
len | number of samples to clear |
offset | start offset |
Implements ARDOUR::Buffer.
◆ silent_data()
bool ARDOUR::AudioBuffer::silent_data |
( |
| ) |
const |
|
virtual |
◆ written()
bool ARDOUR::AudioBuffer::written |
( |
| ) |
const |
|
inline |
◆ _data
Sample* ARDOUR::AudioBuffer::_data |
|
private |
◆ _owns_data
bool ARDOUR::AudioBuffer::_owns_data |
|
private |
◆ _written
bool ARDOUR::AudioBuffer::_written |
|
private |
The documentation for this class was generated from the following file: