|
arduino-audio-tools
|
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>
Public Member Functions | |
| 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 () |
Protected Member Functions | |
| void | connectWiFi () |
| void | processClient () |
| void | sendReplyContent () override |
| void | sendReplyHeader () override |
| void | setupServer (int port) |
Protected Attributes | |
| AudioInfo | audio_info |
| AudioServerDataCallback | callback = nullptr |
| Client | client_obj |
| const char * | content_type = nullptr |
| BaseConverter * | converter_ptr = nullptr |
| StreamCopy | copier |
| EncodedAudioOutput | encoded_stream |
| AudioEncoder * | encoder = nullptr |
| Stream * | in = nullptr |
| size_t | max_bytes = 0 |
| char * | network = nullptr |
| char * | password = nullptr |
| size_t | sent = 0 |
| Server | 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.
Construct a new Audio WAV Server object We assume that the WiFi is already connected.
Construct a new Audio WAV Server object.
| network | |
| password |
|
inline |
Destructor: release the allocated encoder.
|
inlineinherited |
|
inlineinherited |
Start the server. The data must be provided by a callback method.
| cb | |
| contentType | Mime Type of result |
|
inlineinherited |
Start the server. The data must be provided by a callback method.
| cb | |
| sample_rate | |
| channels |
|
inlineinherited |
Start the server. You need to be connected to WiFI before calling this method.
| in | |
| converter |
|
inlineinherited |
Start the server. You need to be connected to WiFI before calling this method.
| in | |
| info | |
| converter |
Start the server. You need to be connected to WiFI before calling this method.
| in | |
| contentType | Mime Type of result |
|
inlineinherited |
Start the server. You need to be connected to WiFI before calling this method.
| in | |
| sample_rate | |
| channels |
Add this method to your loop Returns true while the client is connected. (The same functionality like doLoop())
Add this method to your loop Returns true while the client is connected.
Checks if any clinent has connnected.
Provides a pointer to the WiFiClient.
|
inlineoverrideprotectedvirtualinherited |
Reimplemented from AudioServerT< Client, Server >.
|
inlineoverrideprotectedvirtualinherited |
Reimplemented from AudioServerT< Client, Server >.
defines a converter that will be used when the audio is rendered
Changes the copy buffer size.
|
inline |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |