Skip to content

Commit 0f79e9b

Browse files
authored
Merge pull request #124 from netmindz/auto-playlist
New Usermod - Auto Playlist
2 parents 3fd5e19 + d42148d commit 0f79e9b

File tree

10 files changed

+545
-7
lines changed

10 files changed

+545
-7
lines changed

platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,7 @@ build_flags_S =
978978
; -D WLED_DISABLE_2D ;; un-comment to build a firmware without 2D matrix support
979979
; -D WLED_USE_CIE_BRIGHTNESS_TABLE ;; experimental: use different color / brightness lookup table
980980
-D USERMOD_AUDIOREACTIVE
981+
-D USERMOD_AUTO_PLAYLIST
981982
-D UM_AUDIOREACTIVE_USE_NEW_FFT ; use latest (upstream) FFTLib, instead of older library modified by blazoncek. Slightly faster, more accurate, needs 2KB RAM extra
982983
; -D USERMOD_ARTIFX ;; WLEDMM usermod - temporarily moved into "_M", due to problems in "_S" when compiling with -O2
983984
-D WLEDMM_FASTPATH ;; WLEDMM experimental option. Reduces audio lag (latency), and allows for faster LED framerates. May break compatibility with previous versions.

usermods/audioreactive/audio_reactive.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,7 @@ void FFTcode(void * parameter)
785785
// run peak detection
786786
autoResetPeak();
787787
detectSamplePeak();
788-
789-
// we have new results - notify UDP sound send
788+
790789
haveNewFFTResult = true;
791790

792791
#if !defined(I2S_GRAB_ADC1_COMPLETELY)

usermods/audioreactive/audio_source.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,13 @@ class WM8978Source : public I2SSource {
649649
_wm8978I2cWrite( 1,0b000111110); // Power Management 1 - power off most things, but enable mic bias and I/O tie-off to help mitigate mic leakage.
650650
_wm8978I2cWrite( 2,0b110111111); // Power Management 2 - enable output and amp stages (amps may lift signal but it works better on the ADCs)
651651
_wm8978I2cWrite( 3,0b000001100); // Power Management 3 - enable L&R output mixers
652+
653+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0)
652654
_wm8978I2cWrite( 4,0b001010000); // Audio Interface - standard I2S, 24-bit
655+
#else
656+
_wm8978I2cWrite( 4,0b001001000); // Audio Interface - left-justified I2S, 24-bit
657+
#endif
658+
653659
_wm8978I2cWrite( 6,0b000000000); // Clock generation control - use external mclk
654660
_wm8978I2cWrite( 7,0b000000100); // Sets sample rate to ~24kHz (only used for internal calculations, not I2S)
655661
_wm8978I2cWrite(14,0b010001000); // 128x ADC oversampling - high pass filter disabled as it kills the bass response

0 commit comments

Comments
 (0)