mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
change sample rate between tracks + tweak EMBEDDED option
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
#define PTHREAD_STACK_MIN 256
|
||||
#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 int32_t s32_t;
|
||||
typedef int64_t s64_t;
|
||||
|
||||
@@ -305,12 +305,12 @@ static void *output_thread_i2s() {
|
||||
isI2SStarted=true;
|
||||
LOG_INFO("Restarting I2S.");
|
||||
i2s_start(CONFIG_I2S_NUM);
|
||||
if( i2s_config.sample_rate != output.current_sample_rate)
|
||||
{
|
||||
}
|
||||
if (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_config.sample_rate = output.current_sample_rate;
|
||||
i2s_set_sample_rates(CONFIG_I2S_NUM, i2s_config.sample_rate);
|
||||
}
|
||||
}
|
||||
count++;
|
||||
LOG_SDEBUG("Outputting to I2S");
|
||||
LOG_SDEBUG("Current buffer free: %10d, cont read: %10d",_buf_space(i2sbuffer),_buf_cont_read(i2sbuffer));
|
||||
|
||||
@@ -286,19 +286,17 @@
|
||||
#if SUN
|
||||
#include <sys/types.h>
|
||||
#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
|
||||
#define thread_t pthread_t;
|
||||
#endif
|
||||
#define closesocket(s) close(s)
|
||||
#define last_error() errno
|
||||
#define ERROR_WOULDBLOCK EWOULDBLOCK
|
||||
|
||||
#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
|
||||
typedef uint8_t u8_t;
|
||||
typedef uint16_t u16_t;
|
||||
|
||||
Reference in New Issue
Block a user