diff --git a/components/codecs/inc/opus/opus.h b/components/codecs/inc/opus/opus.h
index d282f21d..0c69c627 100644
--- a/components/codecs/inc/opus/opus.h
+++ b/components/codecs/inc/opus/opus.h
@@ -198,7 +198,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_encoder_get_size(int channels);
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param [in] channels int: Number of channels (1 or 2) in input signal
- * @param [in] application int: Coding mode (@ref OPUS_APPLICATION_VOIP/@ref OPUS_APPLICATION_AUDIO/@ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)
+ * @param [in] application int: Coding mode (one of @ref OPUS_APPLICATION_VOIP, @ref OPUS_APPLICATION_AUDIO, or @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)
* @param [out] error int*: @ref opus_errorcodes
* @note Regardless of the sampling rate and number channels selected, the Opus encoder
* can switch to a lower audio bandwidth or number of channels if the bitrate
@@ -222,7 +222,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusEncoder *opus_encoder_create(
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param [in] channels int: Number of channels (1 or 2) in input signal
- * @param [in] application int: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY)
+ * @param [in] application int: Coding mode (one of OPUS_APPLICATION_VOIP, OPUS_APPLICATION_AUDIO, or OPUS_APPLICATION_RESTRICTED_LOWDELAY)
* @retval #OPUS_OK Success or @ref opus_errorcodes
*/
OPUS_EXPORT int opus_encoder_init(
diff --git a/components/codecs/inc/opus/opus_custom.h b/components/codecs/inc/opus/opus_custom.h
index 41f36bf2..2f22d4b3 100644
--- a/components/codecs/inc/opus/opus_custom.h
+++ b/components/codecs/inc/opus/opus_custom.h
@@ -104,7 +104,8 @@ typedef struct OpusCustomDecoder OpusCustomDecoder;
/** The mode contains all the information necessary to create an
encoder. Both the encoder and decoder need to be initialized
with exactly the same mode, otherwise the output will be
- corrupted.
+ corrupted. The mode MUST NOT BE DESTROYED until the encoders and
+ decoders that use it are destroyed as well.
@brief Mode configuration
*/
typedef struct OpusCustomMode OpusCustomMode;
@@ -178,7 +179,7 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encode
) OPUS_ARG_NONNULL(1);
-/** Destroys a an encoder state.
+/** Destroys an encoder state.
* @param[in] st OpusCustomEncoder*: State to be freed.
*/
OPUS_CUSTOM_EXPORT void opus_custom_encoder_destroy(OpusCustomEncoder *st);
@@ -286,7 +287,7 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decode
int *error
) OPUS_ARG_NONNULL(1);
-/** Destroys a an decoder state.
+/** Destroys a decoder state.
* @param[in] st OpusCustomDecoder*: State to be freed.
*/
OPUS_CUSTOM_EXPORT void opus_custom_decoder_destroy(OpusCustomDecoder *st);
diff --git a/components/codecs/inc/opus/opus_defines.h b/components/codecs/inc/opus/opus_defines.h
index d141418b..94b9e0d9 100644
--- a/components/codecs/inc/opus/opus_defines.h
+++ b/components/codecs/inc/opus/opus_defines.h
@@ -64,7 +64,7 @@ extern "C" {
/**Export control for opus functions */
#ifndef OPUS_EXPORT
-# if defined(WIN32)
+# if defined(_WIN32)
# if defined(OPUS_BUILD) && defined(DLL_EXPORT)
# define OPUS_EXPORT __declspec(dllexport)
# else
@@ -482,7 +482,8 @@ extern "C" {
* @param[in] x opus_int32: Allowed values:
*
* - 0
- Disable inband FEC (default).
- * - 1
- Enable inband FEC.
+ * - 1
- Inband FEC enabled. If the packet loss rate is sufficiently high, Opus will automatically switch to SILK even at high rates to enable use of that FEC.
+ * - 2
- Inband FEC enabled, but does not necessarily switch to SILK if we have music.
*
* @hideinitializer */
#define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x)
@@ -491,7 +492,8 @@ extern "C" {
* @param[out] x opus_int32 *: Returns one of the following values:
*
* - 0
- Inband FEC disabled (default).
- * - 1
- Inband FEC enabled.
+ * - 1
- Inband FEC enabled. If the packet loss rate is sufficiently high, Opus will automatically switch to SILK even at high rates to enable use of that FEC.
+ * - 2
- Inband FEC enabled, but does not necessarily switch to SILK if we have music.
*
* @hideinitializer */
#define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x)
diff --git a/components/codecs/lib/libopus.a b/components/codecs/lib/libopus.a
index 1a566dbd..80fc8006 100644
Binary files a/components/codecs/lib/libopus.a and b/components/codecs/lib/libopus.a differ
diff --git a/components/platform_console/cmd_system.c b/components/platform_console/cmd_system.c
index c770b67d..6599e263 100644
--- a/components/platform_console/cmd_system.c
+++ b/components/platform_console/cmd_system.c
@@ -69,7 +69,7 @@ static void register_deep_sleep();
static void register_light_sleep();
static void register_factory_boot();
static void register_restart_ota();
-static void register_update_certs();
+//static void register_update_certs();
static void register_set_services();
#if WITH_TASKS_INFO
static void register_tasks();
@@ -86,7 +86,7 @@ void register_system()
register_restart();
register_deep_sleep();
register_light_sleep();
- register_update_certs();
+ //register_update_certs();
register_factory_boot();
register_restart_ota();
#if WITH_TASKS_INFO
@@ -562,6 +562,7 @@ static void register_tasks()
#endif // WITH_TASKS_INFO
+/*
extern esp_err_t update_certificates(bool force);
static int force_update_cert(int argc, char **argv){
return update_certificates(true);
@@ -577,7 +578,7 @@ static void register_update_certs()
};
ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) );
}
-
+*/
/** 'deep_sleep' command puts the chip into deep sleep mode */
diff --git a/components/squeezelite-ota/squeezelite-ota.c b/components/squeezelite-ota/squeezelite-ota.c
index d98f4867..7f63d216 100644
--- a/components/squeezelite-ota/squeezelite-ota.c
+++ b/components/squeezelite-ota/squeezelite-ota.c
@@ -349,7 +349,7 @@ esp_err_t init_config(ota_thread_parms_t * p_ota_thread_parms){
}
switch (ota_status->ota_type) {
case OTA_TYPE_HTTP:
- http_client_config.cert_pem =get_certificate();
+ //http_client_config.cert_pem =get_certificate();
http_client_config.event_handler = _http_event_handler;
http_client_config.disable_auto_redirect=false;
http_client_config.skip_cert_common_name_check = false;
diff --git a/main/esp_app_main.c b/main/esp_app_main.c
index 48d4a27c..5f4ec490 100644
--- a/main/esp_app_main.c
+++ b/main/esp_app_main.c
@@ -47,9 +47,11 @@
#include "cmd_system.h"
#include "tools.h"
+/*
static const char certs_namespace[] = "certificates";
static const char certs_key[] = "blob";
static const char certs_version[] = "version";
+*/
const char unknown_string_placeholder[] = "unknown";
const char null_string_placeholder[] = "null";
EventGroupHandle_t network_event_group;
@@ -67,8 +69,10 @@ RTC_NOINIT_ATTR uint16_t ColdBootIndicatorFlag;
bool cold_boot=true;
static bool bNetworkConnected=false;
+/*
extern const uint8_t server_cert_pem_start[] asm("_binary_github_pem_start");
extern const uint8_t server_cert_pem_end[] asm("_binary_github_pem_end");
+*/
// as an exception _init function don't need include
extern void services_init(void);
@@ -159,8 +163,8 @@ void set_log_level(char * tag, char * level){
}
+/*
esp_err_t update_certificates(bool force){
-
nvs_handle handle;
esp_err_t esp_err;
esp_app_desc_t running_app_info;
@@ -231,6 +235,9 @@ esp_err_t update_certificates(bool force){
nvs_close(handle);
return ESP_OK;
}
+*/
+
+/*
const char * get_certificate(){
nvs_handle handle;
esp_err_t esp_err;
@@ -266,6 +273,7 @@ const char * get_certificate(){
}
return blob;
}
+*/
#define DEFAULT_NAME_WITH_MAC(var,defval) char var[strlen(defval)+sizeof(macStr)]; strcpy(var,defval); strcat(var,macStr)
void register_default_string_val(const char * key, char * value){
@@ -495,9 +503,11 @@ void app_main()
}
+/*
ESP_LOGI(TAG,"Checking if certificates need to be updated");
update_certificates(false);
MEMTRACE_PRINT_DELTA();
+*/
ESP_LOGD(TAG,"Getting firmware OTA URL (if any)");
fwurl = process_ota_url();