|
Ardour
9.0-pre0-1952-gc5e0b21049
|
Samplerate converter. More...
#include <sr_converter.h>
Public Member Functions | |
| SampleRateConverter (uint32_t channels) | |
| Constructor. RT safe. More... | |
| ~SampleRateConverter () | |
| void | init (samplecnt_t in_rate, samplecnt_t out_rate, int quality=0) |
| Init converter Not RT safe. More... | |
| samplecnt_t | allocate_buffers (samplecnt_t max_samples) |
| Returns max amount of samples that will be output RT safe. More... | |
| void | process (ProcessContext< float > const &c) |
Public Member Functions inherited from AudioGrapher::ListedSource< float > | |
| void | add_output (typename Source< float >::SinkPtr output) |
| void | clear_outputs () |
| Removes all outputs added. More... | |
| void | remove_output (typename Source< float >::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... | |
Public Member Functions inherited from AudioGrapher::Sink< float > | |
| virtual | ~Sink () |
| virtual void | process (ProcessContext< float > &context) |
Private Member Functions | |
| void | set_end_of_input (ProcessContext< float > const &c) |
| void | reset () |
Private Attributes | |
| bool | active |
| uint32_t | channels |
| samplecnt_t | max_samples_in |
| float * | leftover_data |
| samplecnt_t | leftover_samples |
| samplecnt_t | max_leftover_samples |
| float * | data_out |
| samplecnt_t | data_out_size |
| SRC_DATA | src_data |
| SRC_STATE * | src_state |
Additional Inherited Members | |
Public Types inherited from AudioGrapher::Source< T > | |
| typedef std::shared_ptr< Sink< T > > | SinkPtr |
Public Types inherited from AudioGrapher::FlagDebuggable< L > | |
| typedef FlagField::Flag | Flag |
Protected Types inherited from AudioGrapher::ListedSource< float > | |
| typedef std::list< typename Source< float >::SinkPtr > | SinkList |
Protected Member Functions inherited from AudioGrapher::ListedSource< float > | |
| void | output (ProcessContext< float > const &c) |
| Helper for derived classes. More... | |
| void | output (ProcessContext< float > &c) |
| bool | output_size_is_one () |
Protected Member Functions inherited from AudioGrapher::FlagDebuggable< L > | |
| void | add_supported_flag (Flag flag) |
| Adds a flag to the set of flags supported. More... | |
| template<typename SelfType , typename ContextType > | |
| void | check_flags (SelfType &self, ProcessContext< ContextType > context) |
| Prints debug output if context contains flags that are not supported by this class. More... | |
Protected Member Functions inherited from AudioGrapher::Debuggable< DebugNone > | |
| Debuggable (std::ostream &debug_stream=std::cerr) | |
| bool | debug_level (DebugLevel level) |
| std::ostream & | debug_stream () |
Protected Member Functions inherited from AudioGrapher::Throwing< L > | |
| Throwing () | |
| bool | throw_level (ThrowLevel level) |
Protected Attributes inherited from AudioGrapher::ListedSource< float > | |
| SinkList | outputs |
Samplerate converter.
Definition at line 17 of file sr_converter.h.
| AudioGrapher::SampleRateConverter::SampleRateConverter | ( | uint32_t | channels | ) |
Constructor.
RT safe.
| AudioGrapher::SampleRateConverter::~SampleRateConverter | ( | ) |
| samplecnt_t AudioGrapher::SampleRateConverter::allocate_buffers | ( | samplecnt_t | max_samples | ) |
Returns max amount of samples that will be output
RT safe.
| void AudioGrapher::SampleRateConverter::init | ( | samplecnt_t | in_rate, |
| samplecnt_t | out_rate, | ||
| int | quality = 0 |
||
| ) |
Init converter
Not RT safe.
|
virtual |
Does sample rate conversion. Note that outpt size may vary a lot. May or may not output several contexts of data.
Should be RT safe.
Implements AudioGrapher::Sink< float >.
|
private |
|
private |
|
private |
Definition at line 47 of file sr_converter.h.
|
private |
Definition at line 48 of file sr_converter.h.
|
private |
Definition at line 55 of file sr_converter.h.
|
private |
Definition at line 56 of file sr_converter.h.
|
private |
Definition at line 51 of file sr_converter.h.
|
private |
Definition at line 52 of file sr_converter.h.
|
private |
Definition at line 53 of file sr_converter.h.
|
private |
Definition at line 49 of file sr_converter.h.
|
private |
Definition at line 58 of file sr_converter.h.
|
private |
Definition at line 59 of file sr_converter.h.