mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 20:17:04 +03:00
change sample rate between tracks + tweak EMBEDDED option
This commit is contained in:
@@ -10,6 +10,11 @@
|
|||||||
#define PTHREAD_STACK_MIN 256
|
#define PTHREAD_STACK_MIN 256
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define STREAM_THREAD_STACK_SIZE 8 * 1024
|
||||||
|
#define DECODE_THREAD_STACK_SIZE 20 * 1024
|
||||||
|
#define OUTPUT_THREAD_STACK_SIZE 8 * 1024
|
||||||
|
#define IR_THREAD_STACK_SIZE 8 * 1024
|
||||||
|
|
||||||
typedef int16_t s16_t;
|
typedef int16_t s16_t;
|
||||||
typedef int32_t s32_t;
|
typedef int32_t s32_t;
|
||||||
typedef int64_t s64_t;
|
typedef int64_t s64_t;
|
||||||
|
|||||||
@@ -305,11 +305,11 @@ static void *output_thread_i2s() {
|
|||||||
isI2SStarted=true;
|
isI2SStarted=true;
|
||||||
LOG_INFO("Restarting I2S.");
|
LOG_INFO("Restarting I2S.");
|
||||||
i2s_start(CONFIG_I2S_NUM);
|
i2s_start(CONFIG_I2S_NUM);
|
||||||
if( i2s_config.sample_rate != output.current_sample_rate)
|
}
|
||||||
{
|
if (i2s_config.sample_rate != output.current_sample_rate) {
|
||||||
i2s_config.sample_rate = output.current_sample_rate;
|
LOG_INFO("changing sampling rate %u to %u", i2s_config.sample_rate, output.current_sample_rate);
|
||||||
i2s_set_sample_rates(CONFIG_I2S_NUM, i2s_config.sample_rate);
|
i2s_config.sample_rate = output.current_sample_rate;
|
||||||
}
|
i2s_set_sample_rates(CONFIG_I2S_NUM, i2s_config.sample_rate);
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
LOG_SDEBUG("Outputting to I2S");
|
LOG_SDEBUG("Outputting to I2S");
|
||||||
|
|||||||
@@ -286,19 +286,17 @@
|
|||||||
#if SUN
|
#if SUN
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif /* SUN */
|
#endif /* SUN */
|
||||||
|
|
||||||
#define STREAM_THREAD_STACK_SIZE 8 * 1024
|
|
||||||
#define DECODE_THREAD_STACK_SIZE 20 * 1024
|
|
||||||
#define OUTPUT_THREAD_STACK_SIZE 8 * 1024
|
|
||||||
#define IR_THREAD_STACK_SIZE 8 * 1024
|
|
||||||
#if !OSX
|
#if !OSX
|
||||||
#define thread_t pthread_t;
|
#define thread_t pthread_t;
|
||||||
#endif
|
#endif
|
||||||
#define closesocket(s) close(s)
|
#define closesocket(s) close(s)
|
||||||
#define last_error() errno
|
#define last_error() errno
|
||||||
#define ERROR_WOULDBLOCK EWOULDBLOCK
|
#define ERROR_WOULDBLOCK EWOULDBLOCK
|
||||||
|
|
||||||
#if !EMBEDDED
|
#if !EMBEDDED
|
||||||
|
#define STREAM_THREAD_STACK_SIZE 64 * 1024
|
||||||
|
#define DECODE_THREAD_STACK_SIZE 128 * 1024
|
||||||
|
#define OUTPUT_THREAD_STACK_SIZE 64 * 1024
|
||||||
|
#define IR_THREAD_STACK_SIZE 64 * 1024
|
||||||
#ifdef SUN
|
#ifdef SUN
|
||||||
typedef uint8_t u8_t;
|
typedef uint8_t u8_t;
|
||||||
typedef uint16_t u16_t;
|
typedef uint16_t u16_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user