arduino-snapclient
All Classes Namespaces Functions Pages
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 (Client &client, Print &stream, AudioDecoder &decoder)
 
 ~SnapClient ()
 Destructor.
 
bool begin ()
 Starts the processing.
 
bool begin (SnapTimeSync &timeSync)
 Starts the processing.
 
bool doLoop ()
 Call from Arduino Loop - to receive and process the audio data.
 
void end (void)
 ends the processing and releases the resources
 
bool isWiFi ()
 check if we use the ESP32 WiFi for checking the link status
 
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.
 
void setWiFi (bool flag)
 ESP32: WiFiClient: prevent/activate WiFi link status check.
 
SnapProcessorsnapProcessor ()
 Provides the actual processor.
 
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 ()
 

Protected Attributes

SnapProcessor default_processor
 
bool is_wifi = true
 
Client * p_client = nullptr
 
AudioDecoder * p_decoder = nullptr
 
AudioOutput * p_output = nullptr
 
SnapProcessorp_snapprocessor = &default_processor
 
SnapTimeSyncp_time_sync = &time_sync_default
 
IPAddress server_ip
 
int server_port = 1704
 
SnapTimesnap_time = SnapTime::instance()
 
const char * TAG = "SnapClient"
 
SnapTimeSyncDynamic time_sync_default
 

Detailed Description

Snap Client for ESP32 Arduino.

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: