Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ChannelFormatConverterStreamT< T > Class Template Reference

Converter for reducing or increasing the number of Channels. More...

#include <AudioStreamsConverter.h>

Inheritance diagram for ChannelFormatConverterStreamT< T >:
ReformatBaseStream AudioStream Stream AudioInfoSupport AudioInfoSource Print

Public Member Functions

 ChannelFormatConverterStreamT (ChannelFormatConverterStreamT const &)=delete
 ChannelFormatConverterStreamT (Print &print)
 ChannelFormatConverterStreamT (Stream &stream)
virtual AudioInfo audioInfo () override
virtual int available () override
virtual int availableForWrite () override
virtual bool begin ()
bool begin (int fromChannels, int toChannels)
virtual void end ()
virtual void flush () override
virtual PrintgetPrint ()
virtual StreamgetStream ()
 operator bool ()
ChannelFormatConverterStreamToperator= (ChannelFormatConverterStreamT const &)=delete
size_t readBytes (uint8_t *data, size_t size) override
virtual size_t readSilence (uint8_t *buffer, size_t length)
 Source to generate silence: just sets the buffer to 0.
void setAudioInfo (AudioInfo cfg) override
virtual void setNotifyAudioChange (AudioInfoSupport &bi) override
virtual void setStream (Print &print)
virtual void setStream (Stream &stream)
void setupReader ()
virtual bool validate (AudioInfo &info)
virtual size_t write (const uint8_t *data, size_t size) override
virtual size_t write (uint8_t ch) override
virtual void writeSilence (size_t len)
 Writes len bytes of silence (=0).

Protected Member Functions

size_t convert (const uint8_t *in_data, size_t size)
virtual int not_supported (int out, const char *msg="")
void refillReadBuffer ()

Protected Attributes

Vector< T > buffer {0}
Vector< uint8_t > bufferTmp {0}
ChannelConverter< T > converter
float factor = 1
int from_channels = 2
AudioInfo info
AudioInfoSupportp_notify =nullptr
Printp_print = nullptr
Streamp_stream = nullptr
TransformationReader< ReformatBaseStreamreader
RingBuffer< uint8_t > tmp_in {0}
RingBuffer< uint8_t > tmp_out {0}
int to_channels = 2

Detailed Description

template<typename T>
class audio_tools::ChannelFormatConverterStreamT< T >

Converter for reducing or increasing the number of Channels.

Phil Schatzmann

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