#include <audiobuffer.h>
|
| Buffer (const Int num_channels, const Int num_samples) |
|
| Buffer () |
|
| Buffer (Sample **data_referenced, const Int num_channels, const Int num_samples) noexcept |
|
virtual Int | num_channels () const noexcept |
|
virtual Int | num_samples () const noexcept |
|
Sample | GetSample (Int channel_id, Int sample_id) const noexcept |
|
bool | IsDataOwner () const noexcept |
|
void | SetSample (const Int channel_id, const Int sample_id, const Sample sample) noexcept |
|
void | SetSamples (const Int channel_id, const Int from_sample_id, const Int num_samples, const Sample *samples) noexcept |
|
void | SetSamples (const Buffer &other) noexcept |
|
void | AddSamples (const Int channel_id, const Int from_sample_id, const Int num_samples, const Sample *samples) noexcept |
|
void | MultiplyAddSamples (const Int channel_id, const Int from_sample_id, const Int num_samples, const Sample *samples, const Sample constant) noexcept |
|
void | FilterAddSamples (const Int channel_id, const Int from_sample_id, const Int num_samples, const Sample *samples, mcl::DigitalFilter &filter) noexcept |
|
const Sample * | GetReadPointer (const Int channel_id) const noexcept |
|
Sample * | GetWritePointer (const Int channel_id) noexcept |
|
Sample ** | GetWritePointers () noexcept |
|
virtual void | AddSamples (const Buffer &buffer) noexcept |
|
void | SetFrame (const Int channel_id, const Int frame_id, const Int frame_length, const Signal &signal) |
|
void | PrintData () |
|
virtual void | Reset () noexcept |
|
| Buffer (const Buffer &other) |
|
Buffer & | operator= (const Buffer &other) |
|
virtual | ~Buffer () |
|
- Enumerator:
kMonoChannel |
|
kLeftChannel |
|
kRightChannel |
|
sal::Buffer::Buffer |
( |
const Int |
num_channels, |
|
|
const Int |
num_samples |
|
) |
| |
|
inline |
Constructs a multichannel buffer.
sal::Buffer::Buffer |
( |
Sample ** |
data_referenced, |
|
|
const Int |
num_channels, |
|
|
const Int |
num_samples |
|
) |
| |
|
inlinenoexcept |
Constructs a multichannel buffer as a reference to another data structure. If constructed in this way, this object will not own the data.
- Parameters
-
[in] | data_referenced | the data structure which we are referencing to. |
[in] | num_channels | the number of channels for the data structure we are referencing to. |
[in] | num_samples | the number of samples for the data structure we are referencing to. |
sal::Buffer::Buffer |
( |
const Buffer & |
other | ) |
|
|
inline |
virtual sal::Buffer::~Buffer |
( |
| ) |
|
|
inlinevirtual |
void sal::Buffer::AddSamples |
( |
const Int |
channel_id, |
|
|
const Int |
from_sample_id, |
|
|
const Int |
num_samples, |
|
|
const Sample * |
samples |
|
) |
| |
|
inlinenoexcept |
Adds samples to current sample values in the buffer.
- Parameters
-
[in] | channel_id | The ID of the channel. |
[in] | from_sample_id | The index of the first sample we want to modify. |
[in] | num_samples | The number of samples we want to modify. |
[in] | samples | The new samples. |
virtual void sal::Buffer::AddSamples |
( |
const Buffer & |
buffer | ) |
|
|
inlinevirtualnoexcept |
Adds all the samples from another buffer. The buffer has to be of the same type and have the same number of channels and samples (checked only through debugging asserts).
void sal::Buffer::FilterAddSamples |
( |
const Int |
channel_id, |
|
|
const Int |
from_sample_id, |
|
|
const Int |
num_samples, |
|
|
const Sample * |
samples, |
|
|
mcl::DigitalFilter & |
filter |
|
) |
| |
|
inlinenoexcept |
const Sample* sal::Buffer::GetReadPointer |
( |
const Int |
channel_id | ) |
const |
|
inlinenoexcept |
Sample sal::Buffer::GetSample |
( |
Int |
channel_id, |
|
|
Int |
sample_id |
|
) |
| const |
|
inlinenoexcept |
Sample* sal::Buffer::GetWritePointer |
( |
const Int |
channel_id | ) |
|
|
inlinenoexcept |
Sample** sal::Buffer::GetWritePointers |
( |
| ) |
|
|
inlinenoexcept |
bool sal::Buffer::IsDataOwner |
( |
| ) |
const |
|
inlinenoexcept |
void sal::Buffer::MultiplyAddSamples |
( |
const Int |
channel_id, |
|
|
const Int |
from_sample_id, |
|
|
const Int |
num_samples, |
|
|
const Sample * |
samples, |
|
|
const Sample |
constant |
|
) |
| |
|
inlinenoexcept |
This method first multiplies all the input samples by a certain constant and then adds the result to the samples in the buffer.
virtual Int sal::Buffer::num_channels |
( |
| ) |
const |
|
inlinevirtualnoexcept |
virtual Int sal::Buffer::num_samples |
( |
| ) |
const |
|
inlinevirtualnoexcept |
Copy assignment operator. If you are trying to assign the object onto itself, this operator has no effect. Also, there is no effect if you try to assign a buffer that is referencing itself. For instance, if A is a buffer that owns the data, and B is a buffer that refers to A's data, then the assignment A = B has no effect.
void sal::Buffer::PrintData |
( |
| ) |
|
|
inline |
virtual void sal::Buffer::Reset |
( |
| ) |
|
|
inlinevirtualnoexcept |
Resets all the values to zero.
void sal::Buffer::SetFrame |
( |
const Int |
channel_id, |
|
|
const Int |
frame_id, |
|
|
const Int |
frame_length, |
|
|
const Signal & |
signal |
|
) |
| |
|
inline |
void sal::Buffer::SetSample |
( |
const Int |
channel_id, |
|
|
const Int |
sample_id, |
|
|
const Sample |
sample |
|
) |
| |
|
inlinenoexcept |
void sal::Buffer::SetSamples |
( |
const Int |
channel_id, |
|
|
const Int |
from_sample_id, |
|
|
const Int |
num_samples, |
|
|
const Sample * |
samples |
|
) |
| |
|
inlinenoexcept |
Reassigns the values of a set of contigous samples in the buffer.
- Parameters
-
[in] | channel_id | The ID of the channel. |
[in] | from_sample_id | The index of the first sample we want to modify. |
[in] | num_samples | The number of samples we want to modify. |
[in] | samples | The new samples. |
void sal::Buffer::SetSamples |
( |
const Buffer & |
other | ) |
|
|
inlinenoexcept |
bool sal::Buffer::Test |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following files: