arduino-audio-tools
Public Member Functions | Protected Attributes | List of all members
PWMAudioOutput Class Reference

Common functionality for PWM output. Please use the PWMAudioOutput typedef instead which references the implementation. More...

#include <AudioPWM.h>

Inheritance diagram for PWMAudioOutput:
AudioOutput Print AudioInfoSupport AudioInfoSource

Public Member Functions

virtual AudioInfo audioInfo () override
 
int availableForWrite () override
 
bool begin ()
 
virtual bool begin (AudioInfo info)
 
bool begin (PWMConfig config)
 starts the processing using Streams
 
PWMConfig config ()
 
virtual PWMConfig defaultConfig ()
 
PWMDriverdriver ()
 Provides access to the driver.
 
virtual void end ()
 
virtual void flush () override
 
uint32_t framesPerSecond ()
 
virtual bool isDeletable ()
 If true we need to release the related memory in the destructor.
 
 operator bool ()
 
virtual void setAudioInfo (AudioInfo info)
 updates the sample rate dynamically
 
virtual void setNotifyAudioChange (AudioInfoSupport &bi) override
 
uint32_t underflowsPerSecond ()
 
virtual bool validate (AudioInfo &info)
 
size_t write (const uint8_t *wrt_buffer, size_t size) override
 
virtual size_t write (uint8_t ch) override
 
virtual void writeSilence (size_t len)
 

Protected Attributes

PWMConfig audio_config
 
AudioInfo cfg
 
bool is_active = false
 
AudioInfoSupportp_notify = nullptr
 
PWMDriver pwm
 
SingleBuffer< uint8_t > tmp {MAX_SINGLE_CHARS}
 
int tmpPos = 0
 

Detailed Description

Common functionality for PWM output. Please use the PWMAudioOutput typedef instead which references the implementation.

Member Function Documentation

◆ writeSilence()

virtual void writeSilence ( size_t  len)
inlinevirtualinherited

Writes n 0 values (= silence)

Parameters
len

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