# ---------------------------------------------------------------------------
# synth_core — vendored ESP32Synth 2.5.0 (MIT, Danilo Gabriel)
# https://github.com/danilogcrf2-oss/ESP32Synth
# ---------------------------------------------------------------------------
# Upstream ships no build files at all: it is an Arduino library, and the
# "native ESP-IDF" path in its headers is not buildable as shipped. This
# component supplies the CMake glue plus the small port patch documented in
# PATCHES.md.
#
# src/helix (the Helix MP3 decoder and its wrappers) was removed from this
# checkout: it is unused (ENABLE_MP3 is 0 and nothing reaches it) and it is
# RPSL/RCSL-licensed, which this project's MIT release must not carry. The
# decoder is still referenced from the guarded includes in ESP32Synth.cpp and
# ESP32Synth_SDStream.hpp, so restoring MP3 streaming means restoring the
# directory from upstream first.
#
# The engine is driven in pull mode (beginCustom + generateSamples) by our own
# audio task, so its internal I2S/LEDC/DAC output paths are compiled but never
# entered. They still have to link, which is why the driver components are
# listed here: since IDF 6.0 the legacy `driver` component no longer re-exports
# them publicly.

idf_component_register(
    SRCS
        "src/ESP32Synth.cpp"
    INCLUDE_DIRS
        "src"
    REQUIRES
        esp_driver_i2s
        esp_driver_ledc
        esp_driver_gpio
        esp_timer
        esp_hw_support
        esp_rom
        heap
        freertos
)
