Desktop Support

This commit is contained in:
Phil Schatzmann 2022-05-16 18:00:34 +02:00
parent b323255065
commit ed7d1bbeb4
5 changed files with 29 additions and 3 deletions

View File

@ -5,6 +5,8 @@ project(arduino-audio-tools)
add_library(arduino-audio-tools INTERFACE)
target_compile_options(arduino-audio-tools PRIVATE -DIS_DESKTOP)
option(BUILD_TESTS "Build all tests automatically" OFF)

View File

@ -44,7 +44,7 @@ endif()
add_executable (ogg ogg.cpp)
# set preprocessor defines
target_compile_definitions(arduino_emulator PUBLIC -DDEFINE_MAIN)
target_compile_definitions(arduino_emulator PUBLIC -DDEFINE_MAIN -DIS_DESKTOP)
target_compile_definitions(ogg PUBLIC -DEXIT_ON_STOP)
# OS/X might need this setting for core audio

View File

@ -6,6 +6,14 @@
#include "AudioHttp/Url.h"
#include "AudioTools/AudioLogger.h"
#ifndef URL_CLIENT_TIMEOUT
#define URL_CLIENT_TIMEOUT 60000
#endif
#ifndef URL_HANDSHAKE_TIMEOUT
#define URL_HANDSHAKE_TIMEOUT 120000
#endif
namespace audio_tools {

View File

@ -18,8 +18,16 @@ typedef WiFiClient WiFiClientSecure;
#include "AudioHttp/HttpRequest.h"
#include "AudioHttp/AbstractURLStream.h"
namespace audio_tools {
#ifndef URL_CLIENT_TIMEOUT
#define URL_CLIENT_TIMEOUT 60000
#endif
#ifndef URL_HANDSHAKE_TIMEOUT
#define URL_HANDSHAKE_TIMEOUT 120000
#endif
namespace audio_tools {
/**
* @brief Represents the content of a URL as Stream. We use the WiFi.h API

View File

@ -7,13 +7,21 @@
#include "AudioEffects/SoundGenerator.h"
#include "AudioTools/VolumeControl.h"
namespace audio_tools {
#ifndef URL_CLIENT_TIMEOUT
#define URL_CLIENT_TIMEOUT 60000
#endif
#ifndef URL_HANDSHAKE_TIMEOUT
#define URL_HANDSHAKE_TIMEOUT 120000
#endif
#ifndef IRAM_ATTR
#define IRAM_ATTR
#endif
namespace audio_tools {
static const char *UNDERFLOW_MSG = "data underflow";
/**