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

Support for https://sensorium.github.io/Mozzi/ Define your updateControl() method. Define your updateAudio() method. Start by calling begin(control_rate) do not call audioHook(); in the loop ! More...

#include <AudioMozzi.h>

Inheritance diagram for audio_tools::MozziGenerator:
audio_tools::SoundGenerator< int16_t >

Public Member Functions

 MozziGenerator (MozziConfig config)
 
void begin (MozziConfig config)
 
MozziConfig config ()
 Provides some key audio information.
 
virtual int16_t readSample ()
 Provides a single sample. More...
 
- Public Member Functions inherited from audio_tools::SoundGenerator< int16_t >
virtual AudioBaseInfo audioInfo ()
 
virtual bool begin ()
 
virtual bool begin (AudioBaseInfo info)
 
virtual AudioBaseInfo defaultConfig ()
 
virtual void end ()
 ends the processing
 
virtual bool isActive ()
 Checks if the begin method has been called - after end() isActive returns false.
 
virtual size_t readBytes (uint8_t *buffer, size_t lengthBytes)
 Provides the data as byte array with the requested number of channels.
 
virtual int16_t readSample ()=0
 Provides a single sample. More...
 
virtual size_t readSamples (int16_t *data, size_t sampleCount=512)
 Provides the samples into simple array - which represents 1 channel.
 
virtual size_t readSamples (int16_t src[][2], size_t frameCount)
 Provides the samples into a 2 channel array.
 
virtual void setAudioInfo (AudioBaseInfo info)
 
virtual void setFrequency (uint16_t frequency)
 

Protected Member Functions

int16_t updateSample ()
 

Protected Attributes

int control_counter
 
int control_counter_max
 
MozziConfig info
 
bool is_read_buffer_filled = false
 
int read_buffer
 
- Protected Attributes inherited from audio_tools::SoundGenerator< int16_t >
bool active
 
bool activeWarningIssued
 
AudioBaseInfo info
 
int output_channels
 

Detailed Description

Support for https://sensorium.github.io/Mozzi/ Define your updateControl() method. Define your updateAudio() method. Start by calling begin(control_rate) do not call audioHook(); in the loop !

Author
Phil Schatzmann

Member Function Documentation

◆ readSample()

virtual int16_t audio_tools::MozziGenerator::readSample ( )
inlinevirtual

Provides a single sample.

Implements audio_tools::SoundGenerator< int16_t >.


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