change sample rate between tracks + tweak EMBEDDED option

This commit is contained in:
philippe44
2019-06-29 21:02:30 -07:00
parent 36428f357b
commit 4b8790cf88
3 changed files with 14 additions and 11 deletions

View File

@@ -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;

View File

@@ -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));

View File

@@ -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;