|
arduino-audio-tools
|
Audio output to PWM pins for Renesas based Arduino implementations. More...
#include <PWMDriverRenesas.h>
Public Member Functions | |
| PWMDriverRenesas () | |
| PWMConfig & | audioInfo () |
| virtual int | availableForWrite () |
| bool | begin (PWMConfig cfg) |
| virtual PWMConfig | defaultConfig () |
| virtual int | effectiveOutputSampleRate () |
| Provides the effective sample rate. | |
| virtual void | end () override |
| uint32_t | framesPerSecond () |
| bool | isTimerStarted () |
| void | setBuffer (BaseBuffer< uint8_t > *buffer) |
| uint32_t | underflowsPerSecond () |
| void | updateStatistics () |
| virtual size_t | write (const uint8_t *data, size_t len) |
Protected Member Functions | |
| int | decimation () override |
| Decimation factor to reduce the sample rate. | |
| void | deleteBuffer () |
| virtual bool | isDecimateActive () |
| virtual int | maxChannels () |
| virtual int | maxOutputValue () |
| provides the max value for the configured resulution | |
| int | maxSampleRate () override |
| Provides the max working sample rate. | |
| virtual int | nextValue () |
| determines the next scaled value | |
| void | playNextFrame () |
| writes the next frame to the output pins | |
| virtual void | pwmWrite (int channel, int value) |
| virtual void | setupPWM () |
| Setup PWM Pins. | |
| virtual void | setupTimer () |
| not used -> see startTimer(); | |
| virtual void | startTimer () override |
Static Protected Member Functions | |
| static void | defaultPWMAudioOutputCallback (void *obj) |
| timer callback: write the next frame to the pins | |
Protected Attributes | |
| AudioInfo | actual_info |
| PWMConfig | audio_config |
| BaseBuffer< uint8_t > * | buffer = nullptr |
| Decimate | decimate |
| int | decimation_factor = 0 |
| uint32_t | frame_count = 0 |
| uint32_t | frame_size = 0 |
| uint32_t | frames_per_second = 0 |
| bool | is_blocking_write = true |
| bool | is_timer_started = false |
| Vector< PwmOut * > | pins |
| TimerAlarmRepeating | ticker |
| uint32_t | time_1_sec |
| uint32_t | underflow_count = 0 |
| uint32_t | underflow_per_second = 0 |
Audio output to PWM pins for Renesas based Arduino implementations.
|
inline |
|
inlineinherited |
|
inlineoverrideprotectedvirtual |
Decimation factor to reduce the sample rate.
Reimplemented from DriverPWMBase.
Reimplemented from DriverPWMBase.
timer callback: write the next frame to the pins
|
inlineprotectedinherited |
Provides the effective sample rate.
Reimplemented from DriverPWMBase.
|
inlineinherited |
The requested sampling rate is too hight: we only process half of the samples so we can half the sampling rate
|
inlineinherited |
Implements DriverPWMBase.
provides the max value for the configured resulution
Implements DriverPWMBase.
|
inlineoverrideprotectedvirtual |
Provides the max working sample rate.
Reimplemented from DriverPWMBase.
|
inlineprotectedinherited |
writes the next frame to the output pins
write a pwm value to the indicated channel. The max value depends on the resolution
Implements DriverPWMBase.
|
inlineinherited |
You can assign your own custom buffer impelementation: must be allocated on the heap and will be cleaned up by this class
Setup PWM Pins.
Implements DriverPWMBase.
not used -> see startTimer();
Implements DriverPWMBase.
when we get the first write -> we activate the timer to start with the output of data
Implements DriverPWMBase.
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |