mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 21:17:18 +03:00
FLAC but no MP3
This commit is contained in:
6
decode.c
6
decode.c
@@ -172,16 +172,18 @@ void decode_init(log_level level, const char *include_codecs, const char *exclud
|
||||
#endif
|
||||
if (!strstr(exclude_codecs, "ogg") && (!include_codecs || (order_codecs = strstr(include_codecs, "ogg"))))
|
||||
sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_vorbis());
|
||||
*/
|
||||
if (!strstr(exclude_codecs, "flac") && (!include_codecs || (order_codecs = strstr(include_codecs, "flac"))))
|
||||
sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_flac());
|
||||
*/
|
||||
|
||||
if (!strstr(exclude_codecs, "pcm") && (!include_codecs || (order_codecs = strstr(include_codecs, "pcm"))))
|
||||
sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_pcm());
|
||||
/*
|
||||
|
||||
// try mad then mpg for mp3 unless command line option passed
|
||||
if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) &&
|
||||
(!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mad"))))
|
||||
sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mad());
|
||||
/*
|
||||
else if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) &&
|
||||
(!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mpg"))))
|
||||
sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mpg());
|
||||
|
||||
4
esp32.c
4
esp32.c
@@ -10,3 +10,7 @@ void get_mac(u8_t mac[]) {
|
||||
_sig_func_ptr signal(int sig, _sig_func_ptr func) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *audio_calloc(size_t nmemb, size_t size) {
|
||||
return calloc(nmemb, size);
|
||||
}
|
||||
|
||||
@@ -149,8 +149,11 @@ static void *output_thread() {
|
||||
UNLOCK;
|
||||
|
||||
if (buffill) {
|
||||
//fwrite(buf, bytes_per_frame, buffill, stdout);
|
||||
// do something ...
|
||||
usleep((buffill * 1000 * 1000) / output.current_sample_rate);
|
||||
buffill = 0;
|
||||
} else {
|
||||
usleep((FRAME_BLOCK * 1000 * 1000) / output.current_sample_rate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2
scan.c
2
scan.c
@@ -125,7 +125,7 @@ void app_main()
|
||||
"-d",
|
||||
"all=info",
|
||||
"-b",
|
||||
"128:2000",
|
||||
"256:2000",
|
||||
};
|
||||
|
||||
// can't do strtok on FLASH strings
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
#endif /* SUN */
|
||||
|
||||
#define STREAM_THREAD_STACK_SIZE 8 * 1024
|
||||
#define DECODE_THREAD_STACK_SIZE 8 * 1024
|
||||
#define DECODE_THREAD_STACK_SIZE 32 * 1024
|
||||
#define OUTPUT_THREAD_STACK_SIZE 8 * 1024
|
||||
#define IR_THREAD_STACK_SIZE 8 * 1024
|
||||
#if !OSX
|
||||
|
||||
Reference in New Issue
Block a user