diff --git a/.gitignore b/.gitignore index 94d345d..de094a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .vscode/ build/ miniaudio.h -arduino-snapclient.code-workspace \ No newline at end of file +arduino-snapclient.code-workspace +_deps/ +CMakeFiles/ \ No newline at end of file diff --git a/CMakeCache.txt b/CMakeCache.txt new file mode 100644 index 0000000..d582c19 --- /dev/null +++ b/CMakeCache.txt @@ -0,0 +1,412 @@ +# This is the CMakeCache file. +# For build in directory: /home/pschatzmann/Development/Arduino/libraries/arduino-snapclient +# It was generated by CMake: /home/pschatzmann/st/stm32cubeclt_1.16.0/CMake/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Do not use Portaudio +ADD_PORTAUDIO:BOOL=OFF + +//Build using shared libraries +BUILD_SHARED_LIBS:BOOL=OFF + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11 + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//Value Computed by CMake. +CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/home/pschatzmann/Development/Arduino/libraries/arduino-snapclient/CMakeFiles/pkgRedirects + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Program used to build from build.ninja files. +CMAKE_MAKE_PROGRAM:FILEPATH=/home/pschatzmann/st/stm32cubeclt_1.16.0/Ninja/bin/ninja + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=snapclient + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/usr/bin/readelf + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//Path to a program. +CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//codec selected by the user +CODEC:STRING=opus + +//Directory under which to collect all populated content +FETCHCONTENT_BASE_DIR:PATH=/home/pschatzmann/Development/Arduino/libraries/arduino-snapclient/_deps + +//Disables all attempts to download or update content and assumes +// source dirs already exist +FETCHCONTENT_FULLY_DISCONNECTED:BOOL=OFF + +//Enables QUIET option for all content population +FETCHCONTENT_QUIET:BOOL=ON + +//When not empty, overrides where to find pre-populated content +// for arduino-audio-tools +FETCHCONTENT_SOURCE_DIR_ARDUINO-AUDIO-TOOLS:PATH= + +//Enables UPDATE_DISCONNECTED behavior for all content population +FETCHCONTENT_UPDATES_DISCONNECTED:BOOL=OFF + +//Enables UPDATE_DISCONNECTED behavior just for population of arduino-audio-tools +FETCHCONTENT_UPDATES_DISCONNECTED_ARDUINO-AUDIO-TOOLS:BOOL=OFF + +//Git command line client +GIT_EXECUTABLE:FILEPATH=/usr/bin/git + +//Value Computed by CMake +snapclient_BINARY_DIR:STATIC=/home/pschatzmann/Development/Arduino/libraries/arduino-snapclient + +//Value Computed by CMake +snapclient_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +snapclient_SOURCE_DIR:STATIC=/home/pschatzmann/Development/Arduino/libraries/arduino-snapclient + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/pschatzmann/Development/Arduino/libraries/arduino-snapclient +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=28 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/home/pschatzmann/st/stm32cubeclt_1.16.0/CMake/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/home/pschatzmann/st/stm32cubeclt_1.16.0/CMake/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/home/pschatzmann/st/stm32cubeclt_1.16.0/CMake/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/home/pschatzmann/st/stm32cubeclt_1.16.0/CMake/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Ninja +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/pschatzmann/Development/Arduino/libraries/arduino-snapclient +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/home/pschatzmann/st/stm32cubeclt_1.16.0/CMake/share/cmake-3.28 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_TAPI +CMAKE_TAPI-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//STRINGS property for variable: CODEC +CODEC-STRINGS:INTERNAL=flac;ogg;opus;pcm +//ADVANCED property for variable: GIT_EXECUTABLE +GIT_EXECUTABLE-ADVANCED:INTERNAL=1 +//linker supports push/pop state +_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE + diff --git a/README.md b/README.md index 2c5be75..b249d4b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Here is an example Arduino sketch that uses the Wifi as communication API, the W ```C++ #include "AudioTools.h" #include "SnapClient.h" -#include "AudioCodecs/CodecOpus.h" // https://github.com/pschatzmann/arduino-libopus +#include "AudioTools/AudioCodecs/CodecOpus.h" // https://github.com/pschatzmann/arduino-libopus //#include "api/SnapProcessorRTOS.h" // install https://github.com/pschatzmann/arduino-freertos-addons OpusAudioDecoder codec; diff --git a/desktop-client/CMakeLists.txt b/desktop-client/CMakeLists.txt deleted file mode 100644 index dda38bf..0000000 --- a/desktop-client/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -cmake_minimum_required(VERSION 2.34) - -# set the project name -project(desktop-client) -set (CMAKE_CXX_STANDARD 17) -set (DCMAKE_CXX_FLAGS "-Werror") -# set (FETCHCONTENT_FULLY_DISCONNECTED ON) - -include(FetchContent) - -# Download miniaudio.h -file(DOWNLOAD https://raw.githubusercontent.com/mackron/miniaudio/master/miniaudio.h - ${CMAKE_CURRENT_SOURCE_DIR}/miniaudio.h) - -# Build with snapclient -if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/snapclient ) -endif() - -FetchContent_Declare(arduino_libvorbis GIT_REPOSITORY https://github.com/pschatzmann/arduino-libvorbis-tremor.git GIT_TAG main ) -FetchContent_GetProperties(arduino_libvorbis) -if(NOT arduino_libvorbis_POPULATED) - FetchContent_Populate(arduino_libvorbis) - add_subdirectory(${arduino_libvorbis_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/arduino_libvorbis) -endif() - - -# build sketch as executable -add_executable (desktop-client SnapClient.cpp) - -# set preprocessor defines -target_compile_definitions(desktop-client PUBLIC -DARDUINO -DEXIT_ON_STOP -DIS_DESKTOP -DCONFIG_USE_PSRAM=0 -DCONFIG_SNAPCLIENT_SNTP_ENABLE=0 -DCONFIG_SNAPCLIENT_USE_MDNS=0) - -# specify libraries -target_link_libraries(desktop-client snapclient arduino-audio-tools arduino_emulator arduino_libopus arduino_libvorbis) - -# to find include for miniaudio -target_include_directories(desktop-client PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/desktop-client/README.md b/desktop-client/README.md deleted file mode 100644 index cb50cf3..0000000 --- a/desktop-client/README.md +++ /dev/null @@ -1,10 +0,0 @@ - -Snaplient build for the Desktop - -1. goto the desktop-client directory -2. mkdir build -3. cd build -4. cmake .. -5. make - -This builds the desktop-client executable \ No newline at end of file diff --git a/desktop-client/SnapClient.cpp b/desktop-client/SnapClient.cpp deleted file mode 100644 index a7ed91e..0000000 --- a/desktop-client/SnapClient.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @brief SnapClient with Opus decoder: Output to PortAudio on the desktop - * @author Phil Schatzmann - * @copyright GPLv3 - */ -#include "AudioTools.h" -#include "SnapClient.h" -#include "AudioLibs/MiniAudioStream.h" -//#include "AudioCodecs/CodecOpus.h" -//#include "AudioCodecs/CodecFLAC.h" // https://github.com/pschatzmann/arduino-libflac.git -#include "AudioCodecs/CodecVorbis.h" //https://github.com/pschatzmann/arduino-libvorbis-idec -#include "AudioLibs/StdioStream.h" - -//CsvOutput out; -//StdioStream out; -MiniAudioStream out; -//OpusAudioDecoder opus; -VorbisDecoder ogg; -//FLACDecoder flac; -WiFiClient wifi; -SnapClient client(wifi, out, ogg); - -void setup() { - Serial.begin(115200); - //AudioLogger::instance().begin(Serial, AudioLogger::Info); - // login to wifi - WiFi.begin(CONFIG_WIFI_SSID, CONFIG_WIFI_PASSWORD); - Serial.print("Connecting to WiFi .."); - while (WiFi.status() != WL_CONNECTED) { - Serial.print('.'); - delay(1000); - } - - // print ip address - Serial.println(); - Serial.println(WiFi.localIP()); - - - // start snap client - client.begin(); -} - -void loop() { - client.doLoop(); -} \ No newline at end of file diff --git a/docs/html/_snap_client_8h_source.html b/docs/html/_snap_client_8h_source.html index f8e9898..d1eedde 100644 --- a/docs/html/_snap_client_8h_source.html +++ b/docs/html/_snap_client_8h_source.html @@ -71,230 +71,252 @@
1 #pragma once
7 #include "AudioTools.h"
-
8 #include "SnapConfig.h"
-
9 #include "api/SnapCommon.h"
-
10 #include "api/SnapLogger.h"
-
11 //#include <WiFi.h>
-
12 #include "Client.h"
-
13 
-
14 
-
15 #if CONFIG_NVS_FLASH
-
16 #include "nvs_flash.h"
-
17 #endif
-
18 #if CONFIG_SNAPCLIENT_USE_MDNS && defined(ESP32)
-
19 #include <ESPmDNS.h>
-
20 #endif
-
21 
-
22 #include "api/SnapOutput.h"
-
23 #include "api/SnapProcessor.h"
-
24 
-
32 class SnapClient {
-
33 
-
34 public:
-
35  SnapClient(Client &client, AudioStream &stream, AudioDecoder &decoder) {
-
36  static AdapterAudioStreamToAudioOutput output_adapter;
-
37  output_adapter.setStream(stream);
-
38  p_decoder = &decoder;
-
39  p_output = &output_adapter;
-
40  p_client = &client;
-
41  }
-
42 
-
43  SnapClient(Client &client, AudioStream &stream, StreamingDecoder &decoder,
-
44  int bufferSize = CONFIG_STREAMIN_DECODER_BUFFER) {
-
45  static DecoderFromStreaming decoder_adapter(decoder, bufferSize);
-
46  static AdapterAudioStreamToAudioOutput output_adapter;
-
47  p_decoder = &decoder_adapter;
-
48  output_adapter.setStream(stream);
-
49  p_output = &output_adapter;
-
50  p_client = &client;
-
51  }
-
52 
-
53  SnapClient(Client &client, AudioOutput &output, AudioDecoder &decoder) {
-
54  p_decoder = &decoder;
-
55  p_output = &output;
-
56  p_client = &client;
-
57  }
-
58 
-
59  SnapClient(Client &client, AudioOutput &output, StreamingDecoder &decoder,
-
60  int bufferSize = CONFIG_STREAMIN_DECODER_BUFFER) {
-
61  p_decoder = new DecoderFromStreaming(decoder, bufferSize);
-
62  p_output = &output;
+
8 #include "Client.h"
+
9 #include "SnapConfig.h"
+
10 #include "api/SnapCommon.h"
+
11 #include "api/SnapLogger.h"
+
12 
+
13 #if CONFIG_NVS_FLASH
+
14 #include "nvs_flash.h"
+
15 #endif
+
16 #if CONFIG_SNAPCLIENT_USE_MDNS && defined(ESP32)
+
17 #include <ESPmDNS.h>
+
18 #endif
+
19 
+
20 #ifdef ESP32
+
21 #include <WiFi.h>
+
22 #endif
+
23 
+
24 #include "api/SnapOutput.h"
+
25 #include "api/SnapProcessor.h"
+
26 
+
27 namespace snap_arduino {
+
28 
+
36 class SnapClient {
+
37  public:
+
38  SnapClient(Client &client, AudioStream &stream, AudioDecoder &decoder) {
+
39  static AdapterAudioStreamToAudioOutput output_adapter;
+
40  output_adapter.setStream(stream);
+
41  p_decoder = &decoder;
+
42  p_output = &output_adapter;
+
43  p_client = &client;
+
44  server_ip.fromString(CONFIG_SNAPCAST_SERVER_HOST);
+
45  }
+
46 
+
47  SnapClient(Client &client, Print &stream, AudioDecoder &decoder) {
+
48  static AdapterPrintToAudioOutput output_adapter;
+
49  output_adapter.setStream(stream);
+
50  p_decoder = &decoder;
+
51  p_output = &output_adapter;
+
52  p_client = &client;
+
53  server_ip.fromString(CONFIG_SNAPCAST_SERVER_HOST);
+
54  }
+
55 
+
56  SnapClient(Client &client, AudioStream &stream, StreamingDecoder &decoder,
+
57  int bufferSize = CONFIG_STREAMIN_DECODER_BUFFER) {
+
58  static DecoderFromStreaming decoder_adapter(decoder, bufferSize);
+
59  static AdapterAudioStreamToAudioOutput output_adapter;
+
60  p_decoder = &decoder_adapter;
+
61  output_adapter.setStream(stream);
+
62  p_output = &output_adapter;
63  p_client = &client;
-
64  }
-
65 
- -
68  end();
-
69  }
-
70 
-
72  void setClient(Client &client) { p_client = &client; }
+
64  server_ip.fromString(CONFIG_SNAPCAST_SERVER_HOST);
+
65  }
+
66 
+
67  SnapClient(Client &client, AudioOutput &output, AudioDecoder &decoder) {
+
68  p_decoder = &decoder;
+
69  p_output = &output;
+
70  p_client = &client;
+
71  server_ip.fromString(CONFIG_SNAPCAST_SERVER_HOST);
+
72  }
73 
-
76  void setServerIP(IPAddress ipAddress) { this->address = ipAddress; }
-
77 
-
79  void setSnapTimeSync(SnapTimeSync &timeSync){
-
80  p_time_sync = &timeSync;
-
81  }
-
82 
-
84  bool begin(SnapTimeSync &timeSync) {
-
85  setSnapTimeSync(timeSync);
-
86  return begin();
-
87  }
-
88 
-
90  bool begin() {
-
91 #if defined(ESP32)
-
92  if (WiFi.status() != WL_CONNECTED) {
-
93  ESP_LOGE(TAG, "WiFi not connected");
-
94  return false;
-
95  }
-
96  // use maximum speed
-
97  WiFi.setSleep(false);
-
98  ESP_LOGI(TAG, "Connected to AP");
-
99 #endif
-
100 
-
101  // Get MAC address for WiFi station
-
102  setupMACAddress();
-
103 
-
104  setupNVS();
-
105 
-
106  setupMDNS();
-
107 
-
108  setupPSRAM();
-
109 
-
110 #if CONFIG_SNAPCLIENT_SNTP_ENABLE
-
111  SnapTime::instance().setupSNTPTime();
+
74  SnapClient(Client &client, AudioOutput &output, StreamingDecoder &decoder,
+
75  int bufferSize = CONFIG_STREAMIN_DECODER_BUFFER) {
+
76  p_decoder = new DecoderFromStreaming(decoder, bufferSize);
+
77  p_output = &output;
+
78  p_client = &client;
+
79  }
+
80 
+
82  ~SnapClient() { end(); }
+
83 
+
85  void setClient(Client &client) { p_client = &client; }
+
86 
+
89  void setServerIP(IPAddress ipAddress) { this->server_ip = ipAddress; }
+
90 
+
92  void setSnapTimeSync(SnapTimeSync &timeSync) { p_time_sync = &timeSync; }
+
93 
+
95  bool begin(SnapTimeSync &timeSync) {
+
96  setSnapTimeSync(timeSync);
+
97  return begin();
+
98  }
+
99 
+
101  bool begin() {
+
102 #if defined(ESP32)
+
103  if (is_wifi) {
+
104  if (WiFi.status() != WL_CONNECTED) {
+
105  ESP_LOGE(TAG, "WiFi not connected");
+
106  return false;
+
107  }
+
108  // use maximum speed
+
109  WiFi.setSleep(false);
+
110  ESP_LOGI(TAG, "Connected to AP");
+
111  }
112 #endif
113 
-
114  p_snapprocessor->setServerIP(address);
-
115  p_snapprocessor->setOutput(*p_output);
-
116  p_snapprocessor->snapOutput().setSnapTimeSync(*p_time_sync);
-
117  p_snapprocessor->setDecoder(*p_decoder);
-
118  p_snapprocessor->setClient(*p_client);
-
119 
-
120  // start tasks
-
121  return p_snapprocessor->begin();
-
122  }
-
123 
-
125  void end(void) { p_snapprocessor->end(); }
-
126 
-
128  float volume(void) { return p_snapprocessor->volume(); }
-
129 
-
131  void setVolumeFactor(float fact) { p_snapprocessor->setVolumeFactor(fact); }
-
132 
-
134  void setStartTask(bool flag) { p_snapprocessor->setStartTask(flag); }
+
114  // Get MAC address for WiFi station
+
115  setupMACAddress();
+
116 
+
117  setupNVS();
+
118 
+
119  setupMDNS();
+
120 
+
121 #if CONFIG_SNAPCLIENT_SNTP_ENABLE
+
122  SnapTime::instance().setupSNTPTime();
+
123 #endif
+
124 
+
125  p_snapprocessor->setServerIP(server_ip);
+
126  p_snapprocessor->setServerPort(server_port);
+
127  p_snapprocessor->setOutput(*p_output);
+
128  p_snapprocessor->snapOutput().setSnapTimeSync(*p_time_sync);
+
129  p_snapprocessor->setDecoder(*p_decoder);
+
130  p_snapprocessor->setClient(*p_client);
+
131 
+
132  // start tasks
+
133  return p_snapprocessor->begin();
+
134  }
135 
-
137  void setStartOutput(bool start) { p_snapprocessor->setStartOutput(start); }
+
137  void end(void) { p_snapprocessor->end(); }
138 
-
140  void setSnapProcessor(SnapProcessor &processor) {
-
141  p_snapprocessor = &processor;
-
142  }
-
143 
- -
146  p_snapprocessor->setSnapOutput(out);
-
147  }
-
148 
-
150  void doLoop() { p_snapprocessor->doLoop(); }
-
151 
-
152 protected:
-
153  const char *TAG = "SnapClient";
-
154  SnapTime &snap_time = SnapTime::instance();
-
155  SnapProcessor default_processor;
-
156  SnapProcessor *p_snapprocessor = &default_processor;
-
157  AudioOutput *p_output = nullptr;
-
158  AudioDecoder *p_decoder = nullptr;
-
159  Client *p_client = nullptr;
-
160  SnapTimeSync *p_time_sync = nullptr;
-
161  IPAddress address;
-
162 
-
163  void setupMDNS() {
-
164 #if CONFIG_SNAPCLIENT_USE_MDNS && defined(ESP32)
-
165  ESP_LOGD(TAG, "start");
-
166  if (!MDNS.begin(CONFIG_SNAPCAST_CLIENT_NAME)) {
-
167  LOGE(TAG, "Error starting mDNS");
-
168  return;
-
169  }
+
140  float volume(void) { return p_snapprocessor->volume(); }
+
141 
+
143  void setVolumeFactor(float fact) { p_snapprocessor->setVolumeFactor(fact); }
+
144 
+
146  void setStartTask(bool flag) { p_snapprocessor->setStartTask(flag); }
+
147 
+
149  void setStartOutput(bool start) { p_snapprocessor->setStartOutput(start); }
+
150 
+
152  void setSnapProcessor(SnapProcessor &processor) {
+
153  p_snapprocessor = &processor;
+
154  }
+
155 
+
157  SnapProcessor &snapProcessor() { return *p_snapprocessor; }
+
158 
+
160  void setSnapOutput(SnapOutput &out) { p_snapprocessor->setSnapOutput(out); }
+
161 
+
163  bool doLoop() { return p_snapprocessor->doLoop(); }
+
164 
+
166  void setWiFi(bool flag){ is_wifi = flag;}
+
167 
+
169  bool isWiFi() {return is_wifi;}
170 
-
171  // we just take the first address
-
172  int nrOfServices = MDNS.queryService("snapcast", "tcp");
-
173  if (nrOfServices > 0) {
-
174  IPAddress server_ip = MDNS.IP(0);
-
175  char str_address[20] = {0};
-
176  sprintf(str_address, "%d.%d.%d.%d", server_ip[0], server_ip[1],
-
177  server_ip[2], server_ip[3]);
-
178  int server_port = MDNS.port(0);
-
179 
-
180  // update addres information
-
181  p_snapprocessor->setServerIP(server_ip);
-
182  p_snapprocessor->setServerPort(server_port);
-
183  ESP_LOGI(TAG, "SNAPCAST ip: %s, port: %d", str_address, server_port);
-
184 
-
185  } else {
-
186  ESP_LOGE(TAG, "SNAPCAST server not found");
-
187  }
+
171  protected:
+
172  const char *TAG = "SnapClient";
+
173  SnapTime &snap_time = SnapTime::instance();
+
174  SnapProcessor default_processor;
+
175  SnapProcessor *p_snapprocessor = &default_processor;
+
176  AudioOutput *p_output = nullptr;
+
177  AudioDecoder *p_decoder = nullptr;
+
178  Client *p_client = nullptr;
+
179  SnapTimeSyncDynamic time_sync_default;
+
180  SnapTimeSync *p_time_sync = &time_sync_default;
+
181  IPAddress server_ip;
+
182  int server_port = CONFIG_SNAPCAST_SERVER_PORT;
+
183 #ifdef ESP32
+
184  bool is_wifi = true;
+
185 #else
+
186  bool is_wifi = false;
+
187 #endif
188 
-
189  MDNS.end();
-
190  checkHeap();
-
191 #endif
-
192  }
-
193 
-
194  void setupNVS() {
-
195 #if CONFIG_NVS_FLASH && defined(ESP32)
-
196  esp_err_t ret = nvs_flash_init();
-
197  if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
-
198  ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
-
199  ESP_ERROR_CHECK(nvs_flash_erase());
-
200  ret = nvs_flash_init();
-
201  }
-
202  checkHeap();
-
203  ESP_ERROR_CHECK(ret);
+
189  void setupMDNS() {
+
190 #if CONFIG_SNAPCLIENT_USE_MDNS && defined(ESP32)
+
191  ESP_LOGD(TAG, "start");
+
192  if (!MDNS.begin(CONFIG_SNAPCAST_CLIENT_NAME)) {
+
193  LOGE(TAG, "Error starting mDNS");
+
194  return;
+
195  }
+
196 
+
197  // we just take the first address
+
198  int nrOfServices = MDNS.queryService("snapcast", "tcp");
+
199  if (nrOfServices > 0) {
+
200 #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
+
201  server_ip = MDNS.address(0);
+
202 #else
+
203  server_ip = MDNS.IP(0);
204 #endif
-
205  }
-
206 
-
207  void setupPSRAM() {
-
208 #if CONFIG_USE_PSRAM && defined(ESP32)
-
209  if (ESP.getPsramSize() > 0) {
-
210  heap_caps_malloc_extmem_enable(CONFIG_PSRAM_LIMIT);
-
211  ESP_LOGD(TAG, "PSRAM for allocations > %d bytes", CONFIG_PSRAM_LIMIT);
-
212  } else {
-
213  ESP_LOGW(TAG, "No PSRAM available or PSRAM not activated");
-
214  }
-
215 #endif
-
216  }
-
217 
-
218  void setupMACAddress() {
-
219 #ifdef ESP32
-
220  const char *adr = strdup(WiFi.macAddress().c_str());
-
221  p_snapprocessor->setMacAddress(adr);
-
222  ESP_LOGI(TAG, "mac: %s", adr);
-
223  checkHeap();
-
224 #endif
-
225  }
-
226 };
-
Snap Client for ESP32 Arduino.
Definition: SnapClient.h:32
-
void end(void)
ends the processing and releases the resources
Definition: SnapClient.h:125
-
void setServerIP(IPAddress ipAddress)
Defines the Snapcast Server IP address.
Definition: SnapClient.h:76
-
void setStartTask(bool flag)
For testing to deactivate the starting of the http task.
Definition: SnapClient.h:134
-
~SnapClient()
Destructor.
Definition: SnapClient.h:67
-
void doLoop()
Call from Arduino Loop - to receive and process the audio data.
Definition: SnapClient.h:150
-
void setSnapOutput(SnapOutput &out)
Defines the Snap output implementation to be used.
Definition: SnapClient.h:145
-
bool begin()
Starts the processing.
Definition: SnapClient.h:90
-
void setVolumeFactor(float fact)
Adjust volume by factor e.g. 1.5.
Definition: SnapClient.h:131
-
float volume(void)
Provides the actual volume (in the range of 0.0 to 1.0)
Definition: SnapClient.h:128
-
void setClient(Client &client)
Defines an alternative commnuication client (default is WiFiClient)
Definition: SnapClient.h:72
-
void setSnapProcessor(SnapProcessor &processor)
Defines an alternative Processor.
Definition: SnapClient.h:140
-
bool begin(SnapTimeSync &timeSync)
Starts the processing.
Definition: SnapClient.h:84
-
void setSnapTimeSync(SnapTimeSync &timeSync)
Defines the time synchronization logic.
Definition: SnapClient.h:79
-
void setStartOutput(bool start)
For Testing: Used to prevent the starting of the output task.
Definition: SnapClient.h:137
-
Simple Output Class which uses the AudioTools to build an output chain with volume control and a resa...
Definition: SnapOutput.h:26
-
void setSnapTimeSync(SnapTimeSync &timeSync)
Defines the time synchronization logic.
Definition: SnapOutput.h:120
-
Snap Processor implementation which does not rely on FreeRTOS.
Definition: SnapProcessor.h:19
-
void setSnapOutput(SnapOutput &out)
Defines the SnapOutput implementation.
Definition: SnapProcessor.h:85
-
void setDecoder(AudioDecoder &dec)
Defines the decoder class.
Definition: SnapProcessor.h:76
-
void setVolumeFactor(float fact)
Adjust volume by factor e.g. 1.5.
Definition: SnapProcessor.h:82
-
float volume(void)
Provides the volume (in the range of 0.0 to 1.0)
Definition: SnapProcessor.h:79
-
void setOutput(AudioOutput &output)
Defines the output class.
Definition: SnapProcessor.h:73
-
void setClient(Client &client)
Defines an alternative client to the WiFiClient.
Definition: SnapProcessor.h:90
-
virtual void doLoop()
Call via SnapClient in Arduino Loop!
Definition: SnapProcessor.h:70
-
The the sys/time functions are used to represent the server time. The local time will be measured wit...
Definition: SnapTime.h:16
-
Abstract (Common) Time Synchronization Logic which consists of the startup synchronization and the lo...
Definition: SnapTimeSync.h:15
+
205  char str_address[20] = {0};
+
206  sprintf(str_address, "%d.%d.%d.%d", server_ip[0], server_ip[1],
+
207  server_ip[2], server_ip[3]);
+
208  server_port = MDNS.port(0);
+
209 
+
210  ESP_LOGI(TAG, "MDNS: SNAPCAST ip: %s, port: %d", str_address,
+
211  server_port);
+
212 
+
213  } else {
+
214  ESP_LOGE(TAG, "SNAPCAST server not found");
+
215  }
+
216 
+
217  MDNS.end();
+
218  checkHeap();
+
219 #endif
+
220  }
+
221 
+
222  void setupNVS() {
+
223 #if CONFIG_NVS_FLASH && defined(ESP32)
+
224  esp_err_t ret = nvs_flash_init();
+
225  if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
+
226  ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
+
227  ESP_ERROR_CHECK(nvs_flash_erase());
+
228  ret = nvs_flash_init();
+
229  }
+
230  checkHeap();
+
231  ESP_ERROR_CHECK(ret);
+
232 #endif
+
233  }
+
234 
+
235  void setupMACAddress() {
+
236 #ifdef ESP32
+
237  const char *adr = strdup(WiFi.macAddress().c_str());
+
238  p_snapprocessor->setMacAddress(adr);
+
239  ESP_LOGI(TAG, "mac: %s", adr);
+
240  checkHeap();
+
241 #endif
+
242  }
+
243 };
+
244 
+
245 } // namespace snap_arduino
+
Snap Client for ESP32 Arduino.
Definition: SnapClient.h:36
+
void end(void)
ends the processing and releases the resources
Definition: SnapClient.h:137
+
void setServerIP(IPAddress ipAddress)
Defines the Snapcast Server IP address.
Definition: SnapClient.h:89
+
void setStartTask(bool flag)
For testing to deactivate the starting of the http task.
Definition: SnapClient.h:146
+
bool isWiFi()
check if we use the ESP32 WiFi for checking the link status
Definition: SnapClient.h:169
+
~SnapClient()
Destructor.
Definition: SnapClient.h:82
+
void setSnapOutput(SnapOutput &out)
Defines the Snap output implementation to be used.
Definition: SnapClient.h:160
+
bool begin()
Starts the processing.
Definition: SnapClient.h:101
+
void setVolumeFactor(float fact)
Adjust volume by factor e.g. 1.5.
Definition: SnapClient.h:143
+
float volume(void)
Provides the actual volume (in the range of 0.0 to 1.0)
Definition: SnapClient.h:140
+
void setClient(Client &client)
Defines an alternative commnuication client (default is WiFiClient)
Definition: SnapClient.h:85
+
void setWiFi(bool flag)
ESP32: WiFiClient: prevent/activate WiFi link status check.
Definition: SnapClient.h:166
+
void setSnapProcessor(SnapProcessor &processor)
Defines an alternative Processor.
Definition: SnapClient.h:152
+
bool begin(SnapTimeSync &timeSync)
Starts the processing.
Definition: SnapClient.h:95
+
bool doLoop()
Call from Arduino Loop - to receive and process the audio data.
Definition: SnapClient.h:163
+
void setSnapTimeSync(SnapTimeSync &timeSync)
Defines the time synchronization logic.
Definition: SnapClient.h:92
+
void setStartOutput(bool start)
For Testing: Used to prevent the starting of the output task.
Definition: SnapClient.h:149
+
SnapProcessor & snapProcessor()
Provides the actual processor.
Definition: SnapClient.h:157
+
Simple Output Class which uses the AudioTools to build an output chain with volume control and a resa...
Definition: SnapOutput.h:27
+
void setSnapTimeSync(SnapTimeSync &timeSync)
Defines the time synchronization logic.
Definition: SnapOutput.h:123
+
Snap Processor implementation which does not rely on FreeRTOS.
Definition: SnapProcessor.h:21
+
virtual bool begin()
Sets up the output and the client.
Definition: SnapProcessor.h:36
+
void setSnapOutput(SnapOutput &out)
Defines the SnapOutput implementation.
Definition: SnapProcessor.h:106
+
void setDecoder(AudioDecoder &dec)
Defines the decoder class.
Definition: SnapProcessor.h:97
+
void setVolumeFactor(float fact)
Adjust volume by factor e.g. 1.5.
Definition: SnapProcessor.h:103
+
float volume(void)
Provides the volume (in the range of 0.0 to 1.0)
Definition: SnapProcessor.h:100
+
void setOutput(AudioOutput &output)
Defines the output class.
Definition: SnapProcessor.h:94
+
void setClient(Client &client)
Defines an alternative client to the WiFiClient.
Definition: SnapProcessor.h:111
+
bool doLoop()
Call via SnapClient in Arduino Loop!
Definition: SnapProcessor.h:81
+
The the sys/time functions are used to represent the server time. The local time will be measured wit...
Definition: SnapTime.h:22
+
Dynamically adjusts the effective playback sample rate based on the differences of the local and serv...
Definition: SnapTimeSync.h:91
+
Abstract (Common) Time Synchronization Logic which consists of the startup synchronization and the lo...
Definition: SnapTimeSync.h:17
+
Definition: SnapCommon.h:10