arduino-snapclient
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SnapClient Class Reference

Snap Client for ESP32 Arduino. More...

#include <SnapClient.h>

Public Member Functions

 SnapClient (Client &client, AudioOutput &output, AudioDecoder &decoder)
 
 SnapClient (Client &client, AudioOutput &output, StreamingDecoder &decoder, int bufferSize=(12 *1024))
 
 SnapClient (Client &client, AudioStream &stream, AudioDecoder &decoder)
 
 SnapClient (Client &client, AudioStream &stream, StreamingDecoder &decoder, int bufferSize=(12 *1024))
 
 ~SnapClient ()
 Destructor.
 
bool begin ()
 Starts the processing.
 
bool begin (SnapTimeSync &timeSync)
 Starts the processing.
 
void doLoop ()
 Call from Arduino Loop - to receive and process the audio data.
 
void end (void)
 ends the processing and releases the resources
 
void setClient (Client &client)
 Defines an alternative commnuication client (default is WiFiClient)
 
void setServerIP (IPAddress ipAddress)
 Defines the Snapcast Server IP address. More...
 
void setSnapOutput (SnapOutput &out)
 Defines the Snap output implementation to be used.
 
void setSnapProcessor (SnapProcessor &processor)
 Defines an alternative Processor.
 
void setSnapTimeSync (SnapTimeSync &timeSync)
 Defines the time synchronization logic.
 
void setStartOutput (bool start)
 For Testing: Used to prevent the starting of the output task.
 
void setStartTask (bool flag)
 For testing to deactivate the starting of the http task.
 
void setVolumeFactor (float fact)
 Adjust volume by factor e.g. 1.5.
 
float volume (void)
 Provides the actual volume (in the range of 0.0 to 1.0)
 

Protected Member Functions

void setupMACAddress ()
 
void setupMDNS ()
 
void setupNVS ()
 
void setupPSRAM ()
 

Protected Attributes

IPAddress address
 
SnapProcessor default_processor
 
Client * p_client = nullptr
 
AudioDecoder * p_decoder = nullptr
 
AudioOutput * p_output = nullptr
 
SnapProcessorp_snapprocessor = &default_processor
 
SnapTimeSyncp_time_sync = nullptr
 
SnapTimesnap_time = SnapTime::instance()
 
const char * TAG = "SnapClient"
 

Detailed Description

Snap Client for ESP32 Arduino.

Snap Client from https://github.com/jorgenkraghjakobsen/snapclient converted to an Arduino Library using the AudioTools as output API

Author
Phil Schatzmann
Version
0.1
Date
2023-10-28

Member Function Documentation

◆ setServerIP()

void setServerIP ( IPAddress  ipAddress)
inline

Defines the Snapcast Server IP address.

Parameters
address

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