Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lib_deps =
https://github.com/pschatzmann/ESP32-A2DP.git#v1.8.8
https://github.com/pschatzmann/arduino-audio-tools.git#v1.2.0
https://github.com/pschatzmann/arduino-audio-driver.git#v0.1.4
https://github.com/martinroger/espod.git
;https://github.com/martinroger/espod.git
monitor_filters = esp32_exception_decoder
monitor_speed = 115200

Expand All @@ -22,6 +22,9 @@ build_flags =
-D CORE_DEBUG_LEVEL=2
; -D INVERT_LED_LOGIC
board = nodemcu-32s
lib_deps =
${env.lib_deps}
https://github.com/martinroger/espod.git#v0.0.2
lib_ignore = audio-driver

[env:a1sMini]
Expand All @@ -42,6 +45,9 @@ build_flags =
-D PROCESS_INTERVAL_MS=7
-D TX_INTERVAL_MS=10
-D TIMER_INTERVAL_MS=2
lib_deps =
${env.lib_deps}
https://github.com/martinroger/espod.git#v0.0.2

[env:AiO-DAC]
board = AiODAC_8MB
Expand All @@ -57,8 +63,35 @@ build_flags =
-D LED_BUILTIN=18
-D UART1_RX=19
-D UART1_TX=21
lib_deps =
${env.lib_deps}
https://github.com/martinroger/espod.git#v0.0.2
lib_ignore = audio-driver

; For local development only

[env:loc_NMCU]
extends = env:SBC_NodeMCU32S
lib_deps =
${env.lib_deps}
../espod


[env:loc_A1S]
extends = env:a1sMini
lib_deps =
${env.lib_deps}
../espod


[env:loc_AiO]
extends = env:AiO-DAC
lib_deps =
${env.lib_deps}
../espod



; Legacy or special configurations

; [env:BluCobalt]
Expand Down
12 changes: 6 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ bool pendingPlayReq = false; // Might use this to make sure play requests are no
#ifndef PROCESS_AVRC_TASK_PRIORITY
#define PROCESS_AVRC_TASK_PRIORITY 6
#endif
#ifndef AVRC_INTERVAL_MS
#define AVRC_INTERVAL_MS 5
#endif
// #ifndef AVRC_INTERVAL_MS
// #define AVRC_INTERVAL_MS 5
// #endif
#pragma endregion

#pragma region Helper Functions declaration
Expand Down Expand Up @@ -231,8 +231,8 @@ static void processAVRCTask(void *pvParameters)
PROCESS_AVRC_TASK_STACK_SIZE - minHightWaterMark);
}
#endif
// Check incoming metadata in queue
if (xQueueReceive(avrcMetadataQueue, &incMetadata, 0) == pdTRUE)
// Check incoming metadata in queue, block indefinitely if there is nothing
if (xQueueReceive(avrcMetadataQueue, &incMetadata, portMAX_DELAY) == pdTRUE)
{
// Start processing
switch (incMetadata.id)
Expand All @@ -259,7 +259,7 @@ static void processAVRCTask(void *pvParameters)
delete[] incMetadata.payload;
incMetadata.payload = nullptr;
}
vTaskDelay(pdMS_TO_TICKS(AVRC_INTERVAL_MS));
// vTaskDelay(pdMS_TO_TICKS(AVRC_INTERVAL_MS));
}
}
#pragma endregion
Expand Down