mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-29 05:40:50 +03:00
Add spectrum visualizer
This commit is contained in:
@@ -387,6 +387,21 @@ typedef BOOL bool;
|
||||
|
||||
#endif
|
||||
|
||||
typedef u32_t frames_t;
|
||||
typedef int sockfd;
|
||||
|
||||
// logging
|
||||
typedef enum { lERROR = 0, lWARN, lINFO, lDEBUG, lSDEBUG } log_level;
|
||||
|
||||
const char *logtime(void);
|
||||
void logprint(const char *fmt, ...);
|
||||
|
||||
#define LOG_ERROR(fmt, ...) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_WARN(fmt, ...) if (loglevel >= lWARN) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_INFO(fmt, ...) if (loglevel >= lINFO) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_DEBUG(fmt, ...) if (loglevel >= lDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_SDEBUG(fmt, ...) if (loglevel >= lSDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
|
||||
#if EMBEDDED
|
||||
#include "embedded.h"
|
||||
#endif
|
||||
@@ -395,9 +410,6 @@ typedef BOOL bool;
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
typedef u32_t frames_t;
|
||||
typedef int sockfd;
|
||||
|
||||
#if EVENTFD
|
||||
#include <sys/eventfd.h>
|
||||
#define event_event int
|
||||
@@ -473,18 +485,6 @@ void _wake_create(event_event*);
|
||||
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
// logging
|
||||
typedef enum { lERROR = 0, lWARN, lINFO, lDEBUG, lSDEBUG } log_level;
|
||||
|
||||
const char *logtime(void);
|
||||
void logprint(const char *fmt, ...);
|
||||
|
||||
#define LOG_ERROR(fmt, ...) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_WARN(fmt, ...) if (loglevel >= lWARN) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_INFO(fmt, ...) if (loglevel >= lINFO) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_DEBUG(fmt, ...) if (loglevel >= lDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#define LOG_SDEBUG(fmt, ...) if (loglevel >= lSDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
|
||||
// utils.c (non logging)
|
||||
typedef enum { EVENT_TIMEOUT = 0, EVENT_READ, EVENT_WAKE } event_type;
|
||||
#if WIN && USE_SSL
|
||||
|
||||
Reference in New Issue
Block a user