mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
add OggFlac & remove BLE - release
This commit is contained in:
@@ -198,13 +198,7 @@ CONFIG_BT_A2DP_SOURCE_TASK_STACK_SIZE=2048
|
||||
|
||||
|
||||
CONFIG_BT_SSP_ENABLED=y
|
||||
CONFIG_BT_BLE_ENABLED=y
|
||||
CONFIG_BT_GATTS_ENABLE=y
|
||||
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
|
||||
CONFIG_BT_GATTC_ENABLE=y
|
||||
|
||||
CONFIG_BT_BLE_ENABLED=n
|
||||
CONFIG_BT_BLE_SMP_ENABLE=y
|
||||
|
||||
|
||||
|
||||
@@ -199,13 +199,7 @@ CONFIG_BT_A2DP_SOURCE_TASK_STACK_SIZE=2048
|
||||
|
||||
|
||||
CONFIG_BT_SSP_ENABLED=y
|
||||
CONFIG_BT_BLE_ENABLED=y
|
||||
CONFIG_BT_GATTS_ENABLE=y
|
||||
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
|
||||
CONFIG_BT_GATTC_ENABLE=y
|
||||
|
||||
CONFIG_BT_BLE_ENABLED=n
|
||||
CONFIG_BT_BLE_SMP_ENABLE=y
|
||||
|
||||
|
||||
|
||||
@@ -199,13 +199,7 @@ CONFIG_BT_A2DP_SOURCE_TASK_STACK_SIZE=2048
|
||||
|
||||
|
||||
CONFIG_BT_SSP_ENABLED=y
|
||||
CONFIG_BT_BLE_ENABLED=y
|
||||
CONFIG_BT_GATTS_ENABLE=y
|
||||
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
|
||||
CONFIG_BT_GATTC_ENABLE=y
|
||||
|
||||
CONFIG_BT_BLE_ENABLED=n
|
||||
CONFIG_BT_BLE_SMP_ENABLE=y
|
||||
|
||||
|
||||
|
||||
@@ -198,13 +198,7 @@ CONFIG_BT_A2DP_SOURCE_TASK_STACK_SIZE=2048
|
||||
|
||||
|
||||
CONFIG_BT_SSP_ENABLED=y
|
||||
CONFIG_BT_BLE_ENABLED=y
|
||||
CONFIG_BT_GATTS_ENABLE=y
|
||||
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
|
||||
CONFIG_BT_GATTC_ENABLE=y
|
||||
|
||||
CONFIG_BT_BLE_ENABLED=n
|
||||
CONFIG_BT_BLE_SMP_ENABLE=y
|
||||
|
||||
|
||||
|
||||
@@ -198,13 +198,7 @@ CONFIG_BT_A2DP_SOURCE_TASK_STACK_SIZE=2048
|
||||
|
||||
|
||||
CONFIG_BT_SSP_ENABLED=y
|
||||
CONFIG_BT_BLE_ENABLED=y
|
||||
CONFIG_BT_GATTS_ENABLE=y
|
||||
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
|
||||
CONFIG_BT_GATTC_ENABLE=y
|
||||
|
||||
CONFIG_BT_BLE_ENABLED=n
|
||||
CONFIG_BT_BLE_SMP_ENABLE=y
|
||||
|
||||
|
||||
|
||||
@@ -192,13 +192,7 @@ CONFIG_BT_A2DP_SOURCE_TASK_STACK_SIZE=2048
|
||||
|
||||
|
||||
CONFIG_BT_SSP_ENABLED=y
|
||||
CONFIG_BT_BLE_ENABLED=y
|
||||
CONFIG_BT_GATTS_ENABLE=y
|
||||
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
|
||||
CONFIG_BT_GATTC_ENABLE=y
|
||||
|
||||
CONFIG_BT_BLE_ENABLED=n
|
||||
CONFIG_BT_BLE_SMP_ENABLE=y
|
||||
|
||||
|
||||
|
||||
@@ -4,23 +4,21 @@
|
||||
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
|
||||
COMPONENT_ADD_LDFLAGS=-l$(COMPONENT_NAME) \
|
||||
$(COMPONENT_PATH)/lib/libmad.a \
|
||||
$(COMPONENT_PATH)/lib/libesp-flac.a \
|
||||
$(COMPONENT_PATH)/lib/libFLAC.a \
|
||||
$(COMPONENT_PATH)/lib/libhelix-aac.a \
|
||||
$(COMPONENT_PATH)/lib/libvorbisidec.a \
|
||||
$(COMPONENT_PATH)/lib/libogg.a \
|
||||
$(COMPONENT_PATH)/lib/libalac.a \
|
||||
$(COMPONENT_PATH)/lib/libresample16.a \
|
||||
$(COMPONENT_PATH)/lib/libsoxr.a \
|
||||
$(COMPONENT_PATH)/lib/libopusfile.a \
|
||||
$(COMPONENT_PATH)/lib/libopus.a
|
||||
|
||||
#$(COMPONENT_PATH)/lib/libFLAC.a
|
||||
#$(COMPONENT_PATH)/lib/libesp-flac.a
|
||||
#$(COMPONENT_PATH)/lib/libsoxr.a
|
||||
#$(COMPONENT_PATH)/lib/libfaad.a
|
||||
#$(COMPONENT_PATH)/lib/libvorbisidec.a
|
||||
#$(COMPONENT_PATH)/lib/libesp-opus.a
|
||||
#$(COMPONENT_PATH)/lib/libogg.a
|
||||
#$(COMPONENT_PATH)/lib/libesp-tremor.a
|
||||
#$(COMPONENT_PATH)/lib/libesp-ogg-container.a
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
components/codecs/lib/libFLAC.a
Normal file
BIN
components/codecs/lib/libFLAC.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -36,6 +36,7 @@
|
||||
|
||||
struct flac {
|
||||
FLAC__StreamDecoder *decoder;
|
||||
u8_t container;
|
||||
#if !LINKALL
|
||||
// FLAC symbols to be dynamically loaded
|
||||
const char **FLAC__StreamDecoderErrorStatusString;
|
||||
@@ -55,6 +56,18 @@ struct flac {
|
||||
FLAC__StreamDecoderErrorCallback error_callback,
|
||||
void *client_data
|
||||
);
|
||||
FLAC__StreamDecoderInitStatus (* FLAC__stream_decoder_init_ogg_stream)(
|
||||
FLAC__StreamDecoder *decoder,
|
||||
FLAC__StreamDecoderReadCallback read_callback,
|
||||
FLAC__StreamDecoderSeekCallback seek_callback,
|
||||
FLAC__StreamDecoderTellCallback tell_callback,
|
||||
FLAC__StreamDecoderLengthCallback length_callback,
|
||||
FLAC__StreamDecoderEofCallback eof_callback,
|
||||
FLAC__StreamDecoderWriteCallback write_callback,
|
||||
FLAC__StreamDecoderMetadataCallback metadata_callback,
|
||||
FLAC__StreamDecoderErrorCallback error_callback,
|
||||
void *client_data
|
||||
);
|
||||
FLAC__bool (* FLAC__stream_decoder_process_single)(FLAC__StreamDecoder *decoder);
|
||||
FLAC__StreamDecoderState (* FLAC__stream_decoder_get_state)(const FLAC__StreamDecoder *decoder);
|
||||
#endif
|
||||
@@ -220,18 +233,30 @@ static void error_cb(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErro
|
||||
LOG_INFO("flac error: %s", FLAC_A(f, StreamDecoderErrorStatusString)[status]);
|
||||
}
|
||||
|
||||
static void flac_close(void) {
|
||||
FLAC(f, stream_decoder_delete, f->decoder);
|
||||
f->decoder = NULL;
|
||||
}
|
||||
|
||||
static void flac_open(u8_t sample_size, u8_t sample_rate, u8_t channels, u8_t endianness) {
|
||||
if ( f->decoder && f->container != sample_size ) {
|
||||
flac_close();
|
||||
}
|
||||
|
||||
f->container = sample_size;
|
||||
|
||||
if (f->decoder) {
|
||||
FLAC(f, stream_decoder_reset, f->decoder);
|
||||
} else {
|
||||
f->decoder = FLAC(f, stream_decoder_new);
|
||||
}
|
||||
FLAC(f, stream_decoder_init_stream, f->decoder, &read_cb, NULL, NULL, NULL, NULL, &write_cb, NULL, &error_cb, NULL);
|
||||
}
|
||||
|
||||
static void flac_close(void) {
|
||||
FLAC(f, stream_decoder_delete, f->decoder);
|
||||
f->decoder = NULL;
|
||||
if ( f->container == 'o' ) {
|
||||
LOG_DEBUG("ogg/flac container - using init_ogg_stream");
|
||||
FLAC(f, stream_decoder_init_ogg_stream, f->decoder, &read_cb, NULL, NULL, NULL, NULL, &write_cb, NULL, &error_cb, NULL);
|
||||
} else {
|
||||
FLAC(f, stream_decoder_init_stream, f->decoder, &read_cb, NULL, NULL, NULL, NULL, &write_cb, NULL, &error_cb, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static decode_state flac_decode(void) {
|
||||
@@ -267,6 +292,7 @@ static bool load_flac() {
|
||||
f->FLAC__stream_decoder_reset = dlsym(handle, "FLAC__stream_decoder_reset");
|
||||
f->FLAC__stream_decoder_delete = dlsym(handle, "FLAC__stream_decoder_delete");
|
||||
f->FLAC__stream_decoder_init_stream = dlsym(handle, "FLAC__stream_decoder_init_stream");
|
||||
f->FLAC__stream_decoder_init_ogg_stream = dlsym(handle, "FLAC__stream_decoder_init_ogg_stream");
|
||||
f->FLAC__stream_decoder_process_single = dlsym(handle, "FLAC__stream_decoder_process_single");
|
||||
f->FLAC__stream_decoder_get_state = dlsym(handle, "FLAC__stream_decoder_get_state");
|
||||
|
||||
@@ -284,7 +310,7 @@ static bool load_flac() {
|
||||
struct codec *register_flac(void) {
|
||||
static struct codec ret = {
|
||||
'f', // id
|
||||
"flc", // types
|
||||
"ogf,flc", // types
|
||||
16384, // min read
|
||||
204800, // min space
|
||||
flac_open, // open
|
||||
@@ -303,6 +329,6 @@ struct codec *register_flac(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LOG_INFO("using flac to decode flc");
|
||||
LOG_INFO("using flac to decode ogf,flc");
|
||||
return &ret;
|
||||
}
|
||||
|
||||
@@ -166,13 +166,7 @@ CONFIG_BT_A2DP_SOURCE_TASK_STACK_SIZE=2048
|
||||
|
||||
|
||||
CONFIG_BT_SSP_ENABLED=y
|
||||
CONFIG_BT_BLE_ENABLED=y
|
||||
CONFIG_BT_GATTS_ENABLE=y
|
||||
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
|
||||
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
|
||||
CONFIG_BT_GATTC_ENABLE=y
|
||||
|
||||
CONFIG_BT_BLE_ENABLED=n
|
||||
CONFIG_BT_BLE_SMP_ENABLE=y
|
||||
|
||||
|
||||
@@ -497,6 +491,8 @@ CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=40
|
||||
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
|
||||
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0
|
||||
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=12
|
||||
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=n
|
||||
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=n
|
||||
|
||||
|
||||
|
||||
@@ -613,7 +609,7 @@ CONFIG_LWIP_MAX_SOCKETS=16
|
||||
|
||||
CONFIG_LWIP_SO_REUSE=y
|
||||
CONFIG_LWIP_SO_REUSE_RXTOALL=y
|
||||
|
||||
CONFIG_LWIP_IP_REASSEMBLY=y
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user