Merge branch 'nvs_parameters' of https://github.com/sle118/squeezelite-esp32.git into nvs_parameters

This commit is contained in:
Sebastien
2019-11-06 23:31:26 -05:00
6 changed files with 20 additions and 13 deletions

View File

@@ -35,6 +35,10 @@ extern struct buffer *outputbuf;
// this is the only system-wide loglevel variable
extern log_level loglevel;
// not great to have these here, but they should not be in embedded.h
bool enable_bt_sink;
bool enable_airplay;
#define RAOP_OUTPUT_SIZE (RAOP_SAMPLE_RATE * 2 * 2 * 2 * 1.2)
static raop_event_t raop_state;
@@ -213,6 +217,7 @@ void raop_sink_cmd_handler(raop_event_t event, void *param)
break;
}
case RAOP_SETUP:
// we need a fair bit of space for RTP process
_buf_resize(outputbuf, RAOP_OUTPUT_SIZE);
LOG_INFO("resizing buffer %u", outputbuf->size);
break;

View File

@@ -1,6 +1,6 @@
#ifndef EMBEDDED_H
#define EMBEDDED_H
#include "esp_system.h"
#include <inttypes.h>
/* must provide
@@ -8,6 +8,7 @@
- pthread_create_name
- stack size
- s16_t, s32_t, s64_t and u64_t
- EXT_BSS
can overload (use #define)
- exit
- gettime_ms
@@ -25,6 +26,7 @@
#define IR_THREAD_STACK_SIZE 6 * 1024
//#define BASE_CAP "Model=squeezelite,AccuratePlayPoints=0,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION
#define EXT_BSS __attribute__((section(".ext_ram.bss")))
typedef int16_t s16_t;
typedef int32_t s32_t;
@@ -41,10 +43,6 @@ uint32_t _gettime_ms_(void);
int pthread_create_name(pthread_t *thread, _CONST pthread_attr_t *attr,
void *(*start_routine)( void * ), void *arg, char *name);
// these are here as they can be #define to nothing
extern bool enable_bt_sink;
extern bool enable_airplay;
void register_external(void);
void deregister_external(void);

View File

@@ -533,14 +533,14 @@ static void process(u8_t *pack, int len) {
static bool running;
static void slimproto_run() {
static u8_t buffer[MAXBUF];
static u8_t EXT_BSS buffer[MAXBUF];
int expect = 0;
int got = 0;
u32_t now;
static u32_t last = 0;
event_handle ehandles[2];
int timeouts = 0;
set_readwake_handles(ehandles, sock, wake_e);
while (running && !new_server) {
@@ -623,12 +623,13 @@ static void slimproto_run() {
bool _start_output = false;
decode_state _decode_state;
disconnect_code disconnect_code;
static char header[MAX_HEADER];
static char EXT_BSS header[MAX_HEADER];
size_t header_len = 0;
#if IR
bool _sendIR = false;
u32_t ir_code, ir_ts;
#endif
last = now;
LOCK_S;