SPI master which streams audio to a SPIRegAudioSlave (based on the TinySPISlave library) using its register map: it defines the AudioInfo and the mime type and writes the audio data according to the space which is reported by the available-space register.
More...
#include <SPIRegAudioMaster.h>
SPI master which streams audio to a SPIRegAudioSlave (based on the TinySPISlave library) using its register map: it defines the AudioInfo and the mime type and writes the audio data according to the space which is reported by the available-space register.
◆ SPIRegAudioMaster() [1/2]
◆ SPIRegAudioMaster() [2/2]
◆ addNotifyAudioChange()
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, CodecChain, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, RTSPClient< TcpClient, UdpSocket >, Pipeline, and Pipeline::ModifyingStreamAdapter.
◆ audioInfo()
|
|
inlineoverridevirtualinherited |
◆ audioInfoOut()
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
◆ availableForWrite()
| int availableForWrite |
( |
| ) |
|
|
inlineoverridevirtual |
Free space in the slave's audio buffer in bytes.
Reimplemented from AudioOutput.
◆ begin() [1/3]
Reimplemented in OSCContainerEncoder::OSCOutput, AudioOutputWithCallback, AudioServerEx, RTSPOutput< Platform >, PitchShiftOutput< T, BufferT >, PWMAudioOutput< PWMDriverT >, RTTTLOutput< T >, EncodedAudioOutput, OggContainerOutput, R2ROutput, AdapterAudioStreamToAudioOutput, ChannelsSelectOutput, MetaDataFilter, CsvOutput< T >, HexDumpOutput, MemoryOutput, RTTTLOutput< T >, FFTEffect, FFTPitchShift, and FFTEqualizer.
◆ begin() [2/3]
◆ begin() [3/3]
◆ clearNotifyAudioChange()
| virtual void clearNotifyAudioChange |
( |
| ) |
|
|
inlinevirtualinherited |
◆ deselect()
◆ end()
◆ flush()
◆ isActive()
◆ isDeletable()
| virtual bool isDeletable |
( |
| ) |
|
|
inlinevirtualinherited |
◆ isNotifyActive()
Checks if the automatic AudioInfo update is active.
◆ notifyAudioChange()
◆ operator bool()
| virtual operator bool |
( |
| ) |
|
|
inlinevirtualinherited |
◆ readAudioInfo()
Reads the audio format which is currently defined on the slave.
◆ readRegister()
Read request frame, pause, reply frame.
◆ removeNotifyAudioChange()
◆ select()
◆ setAudioInfo()
Defines the audio format on the slave.
Reimplemented from AudioOutput.
◆ setMime()
| bool setMime |
( |
const char * |
mime | ) |
|
|
inline |
Defines the mime type (max 31 characters) on the slave.
◆ setNotifyActive()
| void setNotifyActive |
( |
bool |
flag | ) |
|
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active)
◆ write() [1/2]
Writes the audio data; returns the number of bytes which were accepted (all of them in blocking mode)
Implements AudioOutput.
◆ write() [2/2]
|
|
inlineoverridevirtualinherited |
◆ writeRegister()
Write frame: [addr][bytes...].
◆ writeSilence()
| virtual void writeSilence |
( |
size_t |
len | ) |
|
|
inlinevirtualinherited |
Writes n 0 values (= silence)
- Parameters
-
◆ _timeout
◆ active
◆ cfg
◆ config
◆ is_active
◆ is_notify_active
| bool is_notify_active = true |
|
protectedinherited |
◆ notify_vector
◆ p_spi
| SPIClass* p_spi = nullptr |
|
protected |
◆ tmp
◆ tmpPos
◆ tx
The documentation for this class was generated from the following file: