SAL
A C++ library for spatial audio.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
sal::MonoBuffer Class Reference

#include <audiobuffer.h>

Inheritance diagram for sal::MonoBuffer:
sal::Buffer

Public Member Functions

 MonoBuffer (const Int num_samples) noexcept
 
 MonoBuffer (Sample *data_referenced, const Int num_samples) noexcept
 
 MonoBuffer (Buffer &referenced_buffer, const Int channel_id) noexcept
 
void MultiplyAddSamples (const Int from_sample_id, const Int num_samples, const Sample *samples, const Sample constant) noexcept
 
void SetSample (const Int sample_id, const Sample sample_value) noexcept
 
void SetSamples (const Int from_sample_id, const Int num_samples, const Sample *samples) noexcept
 
void SetFrame (const Int frame_id, const Int frame_length, const Signal &signal)
 
Sample GetSample (const Int sample_id) const noexcept
 
const SampleGetReadPointer () const noexcept
 
SampleGetWritePointer () noexcept
 
void AddSamples (const Int from_sample_id, const Int num_samples, const Sample *samples) noexcept
 
virtual ~MonoBuffer ()
 
- Public Member Functions inherited from sal::Buffer
 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 SampleGetReadPointer (const Int channel_id) const noexcept
 
SampleGetWritePointer (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)
 
Bufferoperator= (const Buffer &other)
 
virtual ~Buffer ()
 

Static Public Member Functions

static MonoBuffer Unary (const Sample sample) noexcept
 
- Static Public Member Functions inherited from sal::Buffer
static bool Test ()
 

Additional Inherited Members

- Public Types inherited from sal::Buffer
enum  ChannelLabels { kMonoChannel = 0, kLeftChannel = 0, kRightChannel = 1 }
 

Constructor & Destructor Documentation

sal::MonoBuffer::MonoBuffer ( const Int  num_samples)
inlineexplicitnoexcept
sal::MonoBuffer::MonoBuffer ( Sample data_referenced,
const Int  num_samples 
)
inlinenoexcept
sal::MonoBuffer::MonoBuffer ( Buffer referenced_buffer,
const Int  channel_id 
)
inlinenoexcept

Constructs a mono buffer as a reference to a multichannel buffer. If constructed in this way, this object will not own the data.

Parameters
[in]referenced_bufferthe buffer structure which we are referencing to.
[in]channel_idthe channel id to be referenced.
virtual sal::MonoBuffer::~MonoBuffer ( )
inlinevirtual

Member Function Documentation

void sal::MonoBuffer::AddSamples ( const Int  from_sample_id,
const Int  num_samples,
const Sample samples 
)
inlinenoexcept
const Sample* sal::MonoBuffer::GetReadPointer ( ) const
inlinenoexcept
Sample sal::MonoBuffer::GetSample ( const Int  sample_id) const
inlinenoexcept
Sample* sal::MonoBuffer::GetWritePointer ( )
inlinenoexcept
void sal::MonoBuffer::MultiplyAddSamples ( const Int  from_sample_id,
const Int  num_samples,
const Sample samples,
const Sample  constant 
)
inlinenoexcept

This first multiplies all the input samples by a certain constant and then adds the result to the samples in the buffer.

void sal::MonoBuffer::SetFrame ( const Int  frame_id,
const Int  frame_length,
const Signal signal 
)
inline
void sal::MonoBuffer::SetSample ( const Int  sample_id,
const Sample  sample_value 
)
inlinenoexcept
void sal::MonoBuffer::SetSamples ( const Int  from_sample_id,
const Int  num_samples,
const Sample samples 
)
inlinenoexcept
static MonoBuffer sal::MonoBuffer::Unary ( const Sample  sample)
inlinestaticnoexcept

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