A simple Arduino Webserver which streams the audio as WAV data. This class is based on the AudioEncodedServer class. All you need to do is to provide the data with a callback method or from a Stream.
More...
#include <AudioEncodedServerT.h>
|
| AudioWAVServerT (const char *network, const char *password, int port=80) |
| Construct a new Audio WAV Server object.
|
|
| AudioWAVServerT (int port=80) |
| Construct a new Audio WAV Server object We assume that the WiFi is already connected.
|
|
| ~AudioWAVServerT () |
| Destructor: release the allocated encoder.
|
|
AudioEncoder * | audioEncoder () |
|
bool | begin (AudioServerDataCallback cb, const char *contentType) |
| Start the server. The data must be provided by a callback method.
|
|
bool | begin (AudioServerDataCallback cb, int sample_rate, int channels, int bits_per_sample=16) |
| Start the server. The data must be provided by a callback method.
|
|
bool | begin (AudioStream &in, BaseConverter *converter=nullptr) |
| Start the server. You need to be connected to WiFI before calling this method.
|
|
bool | begin (Stream &in, AudioInfo info, BaseConverter *converter=nullptr) |
| Start the server. You need to be connected to WiFI before calling this method.
|
|
bool | begin (Stream &in, const char *contentType) |
| Start the server. You need to be connected to WiFI before calling this method.
|
|
bool | begin (Stream &in, int sample_rate, int channels, int bits_per_sample=16, BaseConverter *converter=nullptr) |
| Start the server. You need to be connected to WiFI before calling this method.
|
|
bool | copy () |
| Add this method to your loop Returns true while the client is connected. (The same functionality like doLoop())
|
|
bool | doLoop () |
| Add this method to your loop Returns true while the client is connected.
|
|
bool | isClientConnected () |
| Checks if any clinent has connnected.
|
|
Stream & | out () |
| Provides the output stream.
|
|
Client * | out_ptr () |
| Provides a pointer to the WiFiClient.
|
|
void | setConverter (BaseConverter *c) |
| defines a converter that will be used when the audio is rendered
|
|
void | setCopyBufferSize (int size) |
| Changes the copy buffer size.
|
|
WAVEncoder & | wavEncoder () |
|
template<class
Client, class Server>
class audio_tools::AudioWAVServerT< Client, Server >
A simple Arduino Webserver which streams the audio as WAV data. This class is based on the AudioEncodedServer class. All you need to do is to provide the data with a callback method or from a Stream.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ AudioWAVServerT()
template<class
Client , class Server >
AudioWAVServerT |
( |
const char * |
network, |
|
|
const char * |
password, |
|
|
int |
port = 80 |
|
) |
| |
|
inline |
Construct a new Audio WAV Server object.
- Parameters
-
◆ begin() [1/6]
template<class
Client , class Server >
Start the server. The data must be provided by a callback method.
- Parameters
-
cb | |
contentType | Mime Type of result |
◆ begin() [2/6]
template<class
Client , class Server >
Start the server. The data must be provided by a callback method.
- Parameters
-
◆ begin() [3/6]
template<class
Client , class Server >
Start the server. You need to be connected to WiFI before calling this method.
- Parameters
-
◆ begin() [4/6]
template<class
Client , class Server >
Start the server. You need to be connected to WiFI before calling this method.
- Parameters
-
◆ begin() [5/6]
template<class
Client , class Server >
bool begin |
( |
Stream & |
in, |
|
|
const char * |
contentType |
|
) |
| |
|
inlineinherited |
Start the server. You need to be connected to WiFI before calling this method.
- Parameters
-
in | |
contentType | Mime Type of result |
◆ begin() [6/6]
template<class
Client , class Server >
bool begin |
( |
Stream & |
in, |
|
|
int |
sample_rate, |
|
|
int |
channels, |
|
|
int |
bits_per_sample = 16 , |
|
|
BaseConverter * |
converter = nullptr |
|
) |
| |
|
inlineinherited |
Start the server. You need to be connected to WiFI before calling this method.
- Parameters
-
◆ copy()
template<class
Client , class Server >
Add this method to your loop Returns true while the client is connected. (The same functionality like doLoop())
- Returns
- true
-
false
◆ sendReplyContent()
template<class
Client , class Server >
void sendReplyContent |
( |
| ) |
|
|
inlineoverrideprotectedvirtualinherited |
◆ sendReplyHeader()
template<class
Client , class Server >
|
inlineoverrideprotectedvirtualinherited |
The documentation for this class was generated from the following file: