Ardour
9.0-pre0-582-g084a23a80d
|
#include <sample_format_converter.h>
Public Member Functions | |
SampleFormatConverter (ChannelCount channels) | |
~SampleFormatConverter () | |
void | init (samplecnt_t max_samples, int type, int data_width) |
void | set_clip_floats (bool yn) |
Set whether or not clipping to [-1.0, 1.0] should occur when TOut = float. Clipping is off by default. More... | |
void | process (ProcessContext< float > const &c_in) |
Processes data without modifying it. More... | |
void | process (ProcessContext< float > &c_in) |
This version is only different in the case when TOut = float, and float clipping is on. More... | |
Public Member Functions inherited from AudioGrapher::Sink< float > | |
virtual | ~Sink () |
Public Member Functions inherited from AudioGrapher::ListedSource< TOut > | |
void | add_output (typename Source< TOut >::SinkPtr output) |
void | clear_outputs () |
Removes all outputs added. More... | |
void | remove_output (typename Source< TOut >::SinkPtr output) |
Public Member Functions inherited from AudioGrapher::Source< T > | |
virtual | ~Source () |
virtual void | add_output (SinkPtr output)=0 |
Adds an output to this source. All data generated is forwarded to output. More... | |
virtual void | remove_output (SinkPtr output)=0 |
Removes a specific output from this source. More... | |
Private Member Functions | |
void | reset () |
void | init_common (samplecnt_t max_samples) |
void | check_sample_and_channel_count (samplecnt_t samples, ChannelCount channels_) |
Private Attributes | |
ChannelCount | channels |
GDither | dither |
samplecnt_t | data_out_size |
TOut * | data_out |
bool | clip_floats |
Additional Inherited Members | |
Public Types inherited from AudioGrapher::Source< T > | |
typedef std::shared_ptr< Sink< T > > | SinkPtr |
Protected Types inherited from AudioGrapher::ListedSource< TOut > | |
typedef std::list< typename Source< TOut >::SinkPtr > | SinkList |
Protected Member Functions inherited from AudioGrapher::ListedSource< TOut > | |
void | output (ProcessContext< TOut > const &c) |
Helper for derived classes. More... | |
void | output (ProcessContext< TOut > &c) |
bool | output_size_is_one () |
Protected Member Functions inherited from AudioGrapher::Throwing< L > | |
Throwing () | |
bool | throw_level (ThrowLevel level) |
Protected Attributes inherited from AudioGrapher::ListedSource< TOut > | |
SinkList | outputs |
Sample format converter that does dithering. This class can only convert floats to either float, int32_t, int16_t, or uint8_t
Definition at line 25 of file sample_format_converter.h.
AudioGrapher::SampleFormatConverter< TOut >::SampleFormatConverter | ( | ChannelCount | channels | ) |
channels | number of channels in stream |
AudioGrapher::SampleFormatConverter< TOut >::~SampleFormatConverter | ( | ) |
|
private |
void AudioGrapher::SampleFormatConverter< TOut >::init | ( | samplecnt_t | max_samples, |
int | type, | ||
int | data_width | ||
) |
Initialize and allocate buffers for processing.
max_samples | maximum number of samples that is allowed to be used in calls to process() |
type | dither type from DitherType |
data_width | data with in bits |
|
private |
|
virtual |
This version is only different in the case when TOut = float, and float clipping is on.
Reimplemented from AudioGrapher::Sink< float >.
|
virtual |
Processes data without modifying it.
Implements AudioGrapher::Sink< float >.
|
private |
|
inline |
Set whether or not clipping to [-1.0, 1.0] should occur when TOut = float. Clipping is off by default.
Definition at line 47 of file sample_format_converter.h.
|
private |
Definition at line 60 of file sample_format_converter.h.
|
private |
Definition at line 65 of file sample_format_converter.h.
|
private |
Definition at line 63 of file sample_format_converter.h.
|
private |
Definition at line 62 of file sample_format_converter.h.
|
private |
Definition at line 61 of file sample_format_converter.h.