arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
audio_tools::NumberFormatConverterStream Class Reference

Converter which converts between bits_per_sample and 16 bits. More...

#include <AudioStreamsConverter.h>

Inheritance diagram for audio_tools::NumberFormatConverterStream:
audio_tools::AudioStreamX audio_tools::AudioStream audio_tools::Stream audio_tools::AudioBaseInfoDependent audio_tools::AudioBaseInfoSource audio_tools::Print

Public Member Functions

 NumberFormatConverterStream (Print &print)
 
 NumberFormatConverterStream (Stream &stream)
 
virtual int available () override
 
virtual int availableForWrite () override
 
bool begin (int from_bit_per_samples, int to_bit_per_samples)
 
size_t readBytes (uint8_t *data, size_t size) override
 
void setStream (Print &print)
 
void setStream (Stream &stream)
 
virtual size_t write (const uint8_t *data, size_t size) override
 
- Public Member Functions inherited from audio_tools::AudioStreamX
 AudioStreamX (AudioStreamX const &)=delete
 
virtual int available () override
 
AudioStreamXoperator= (AudioStreamX const &)=delete
 
virtual int peek () override
 
virtual int read () override
 
virtual size_t readBytes (uint8_t *buffer, size_t length) override
 
virtual size_t write (const uint8_t *buffer, size_t size) override
 
virtual size_t write (uint8_t) override
 
- Public Member Functions inherited from audio_tools::AudioStream
 AudioStream (AudioStream const &)=delete
 
virtual AudioBaseInfo audioInfo () override
 
virtual int availableForWrite () override
 
virtual bool begin ()
 
virtual void end ()
 
virtual void flush () override
 
 operator bool ()
 
AudioStreamoperator= (AudioStream const &)=delete
 
virtual size_t readBytes (char *buffer, size_t length)
 
virtual size_t readBytes (uint8_t *buffer, size_t length) STREAM_WRITE_OVERRIDE=0
 
virtual void setAudioInfo (AudioBaseInfo info) override
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi) override
 
virtual StreamtoStreamPointer ()
 
virtual size_t write (const uint8_t *buffer, size_t size) override=0
 
- Public Member Functions inherited from audio_tools::Stream
virtual int available ()
 
virtual int peek ()
 
virtual int read ()
 
virtual size_t readBytes (uint8_t *buffer, size_t len)
 
virtual void setTimeout (size_t t)
 
- Public Member Functions inherited from audio_tools::Print
virtual int availableForWrite ()
 
virtual void flush ()
 
virtual int print (char c, PrintCharFmt spec)
 
virtual int print (const char *msg)
 
virtual int print (int number)
 
virtual int println (const char *msg="")
 
virtual size_t write (const char *buffer, size_t size)
 
virtual size_t write (const char *str)
 
virtual size_t write (const uint8_t *buffer, size_t size)
 
virtual size_t write (uint8_t ch)
 
- Public Member Functions inherited from audio_tools::AudioBaseInfoDependent
virtual AudioBaseInfo audioInfo ()=0
 
virtual void setAudioInfo (AudioBaseInfo info)=0
 
virtual bool validate (AudioBaseInfo &info)
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)=0
 

Protected Member Functions

void setupStream ()
 
- Protected Member Functions inherited from audio_tools::AudioStream
virtual int not_supported (int out)
 

Protected Attributes

void * converter =nullptr
 
int from_bit_per_samples =0
 
Printp_print =nullptr
 
Streamp_stream =nullptr
 
int to_bit_per_samples =0
 
- Protected Attributes inherited from audio_tools::AudioStream
AudioBaseInfo info
 
AudioBaseInfoDependentp_notify =nullptr
 

Detailed Description

Converter which converts between bits_per_sample and 16 bits.

Author
Phil Schatzmann

Member Function Documentation

◆ available()

virtual int audio_tools::NumberFormatConverterStream::available ( )
inlineoverridevirtual

Reimplemented from audio_tools::AudioStreamX.

◆ availableForWrite()

virtual int audio_tools::NumberFormatConverterStream::availableForWrite ( )
inlineoverridevirtual

Reimplemented from audio_tools::AudioStream.

◆ readBytes()

size_t audio_tools::NumberFormatConverterStream::readBytes ( uint8_t *  data,
size_t  size 
)
inlineoverridevirtual

Reimplemented from audio_tools::AudioStreamX.

◆ write()

virtual size_t audio_tools::NumberFormatConverterStream::write ( const uint8_t *  data,
size_t  size 
)
inlineoverridevirtual

Reimplemented from audio_tools::AudioStreamX.


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