# Changelog ## v1.1.0 ### Break Change - Audio elements use the base-element mutex; `esp_gmf_audio_el_lock` / `unlock` and `esp_gmf_audio_element_t::lock` were removed - For ESP32-P4, only chip revision `v3.0.0` or later is supported - For ESP32-S31, due to PIE assembly optimization limitations, all `*_process()` APIs must be called from Core 1, if want to remove this restriction, set `ESP_AUDIO_EFFECTS_S31_USE_ASM=n` and `ESP_AUDIO_CODEC_S31_USE_ASM=n` in menuconfig, at the cost of reduced performance ### Features - Added `aud_reverb` element based on `esp_ae_reverb` - Added `aud_delay` element based on `esp_ae_delay` - Added delay `get_max_delay` to read `max_delay_ms` from the element configuration - Added `set_transit_time` / `get_transit_time` methods for `aud_alc` - Updated `esp_audio_codec` dependency to `~2.6` - Updated `esp_audio_effects` dependency to `~1.4` - Added getter methods, runtime-safe metadata, and argument constraints for configurable audio element parameters - Added public getter APIs for ASRC, bit converter, channel converter, rate converter, and mixer configurations - Added getter counterparts in `esp_gmf_audio_param` for dest rate/bits/ch, speed, pitch, ALC gain, and fade - `aud_alc`, `aud_delay`, `aud_drc`, `aud_eq`, `aud_fade`, `aud_reverb`, and `aud_mbc` use `ESP_GMF_BYPASS_COMMON`; `aud_howl` and `aud_sonic` use `ESP_GMF_BYPASS_CUSTOM`. Bypass is controlled by `esp_gmf_element_set_bypass` / `esp_gmf_element_get_bypass` - Sonic bypass reuses the identity passthrough path; leftover AE output after `TRUNCATE` is discarded so bypass takes effect immediately - Howl bypass stays in its own process so cache leftover after `TRUNCATE` continues to drain ### Bug Fixes - Sonic leftover AE output after `TRUNCATE` no longer blocks bypass passthrough - Marked the Fade reset method unsafe during processing to match the underlying effect API concurrency requirement - Restored method-list cleanup on `_load_delay_methods_func` and `_load_reverb_methods_func` error paths - Stored delay `SET_DELAY_TIME` constraints per instance to avoid sharing `max_delay_ms` across elements ## v1.0.1~1 ### Changes - Changed dependency version constraints from `^` (automatic minor updates) to `~` (automatic patch updates) to improve compatibility ## v1.0.1 ### Bug Fixes - Fixed `audio_dec` reusing a stale `decoded_size` across decode iterations - Fixed `audio_dec` processing decoded data when the reported sample rate, channel count, or bit depth is invalid ## v1.0.0 ### Features - Added `aud_muxer` element - Added `aud_howl` element - Added `aud_asrc` element - Added support for `audio_dec` element adopting input payload PTS ### Bug Fixes - Added fine-grained mutex protection for `aud_enc` element to clear codec-specific information on close - Fixed ASRC element output sample count calculation to honor payload buffer address and size alignment ## v0.8.3 ### Features - Updated `esp_audio_effects` dependency to `~1.3` ## v0.8.2 ### Features - Updated `esp_audio_codec` to `v2.5.0` - Added support for `G722` encoding and decoding - Added support for decoding `OGG` files ### Bug Fixes - Improved the accuracy of `SBC` bitrate configuration ## v0.8.1 ### Bug Fixes - Added fine-grained mutex protection for internal handle calls across `gmf_audio` elements to improve thread safety ## v0.8.0 ### Features - Added automatic stream format detection in Simple Decoder for unspecified or unsupported codec identifiers - Updated `esp_audio_codec` to version v2.4 - Updated `esp_audio_effects` to version v1.2 - Added `aud_drc` (Dynamic Range Control) and `aud_mbc` (Multi-Band Compressor) audio effect elements - Added reset function support for `aud_alc`, `aud_fade`, `aud_sonic`, `aud_mixer`, and `aud_rate_cvt` elements - Added `VORBIS` and `ALAC` decoder configuration support in `esp_gmf_audio_dec_reconfig_by_sound_info` function - Enhanced the `aud_dec` reconfiguration API to allow updates at any time, with changes applied during processing ### Bug Fixes - Fixed audio_dec element failed to propagate is_done payload flag - Fixed memory leak in `audio_dec` element's `audio_dec_reconfig_dec_by_sound_info` function - Fixed `audio_enc` not updating input/output buffer size after bitrate change - Fixed bitrate set before audio encoder handle is created not taking effect - Fixed `audio_enc->cur_pts` calculation to prevent negative values by clamping to 0 when cached duration exceeds origin timestamp ## v0.7.2 ### Features - Support C++ build ## v0.7.1 ### Bug Fixes - Fixed sonic bypass failed for first payload ### Features - Added audio param setting for `aud_alc`, `aud_fade`, `aud_sonic` ## v0.7.0 ### Features - Updated `esp_audio_codec` to version v2.3.0 - Updated `esp_audio_effects` to version v1.1.0 - Added `esp_gmf_audio_enc_get_frame_size`, `esp_gmf_audio_enc_set_bitrate`, `esp_gmf_audio_enc_get_bitrate`, `esp_gmf_audio_enc_reconfig` and `esp_gmf_audio_enc_reconfig_by_sound_info` functions to `gmf_audio_enc` - Added `SBC` and `LC3` encoders - Added `esp_gmf_audio_dec_reconfig` and `esp_gmf_audio_dec_reconfig_by_sound_info` functions to `gmf_audio_dec` - Added `SBC` and `LC3` decoders - Added `meta_flag` in `gmf_audio_dec` to support audio decoder recovery status tracking - Added common audio parameter setting interface - Redefined audio methods name - Removed the audio encoder and decoder reconfig interface in `esp_gmf_audio_helper.c` - Used the `esp_gmf_element_handle_t` type handle in the `gmf_audio` module - Use default configuration for `esp_gmf_audio_xxx_init` internally if configuration set to NULL - Added TRUNCATE support for SONIC element to enable its flexible placement at any position within the pipeline - Supported scenarios where the input data for audio encoding is not a complete frame - Added PTS (Presentation Time Stamp) calculation and propagation for the `aud_alc`, `aud_eq`, `aud_fade`, `aud_enc` - Supported user-configurable input frame length and load acquisition timeout for the mixer ### Bug Fixes - Fixed `gmf_audio_enc` process blocked due to forget release of in_load when truncate is returned - Fixed parameter mismatch in `audio_dec_reconfig_dec_by_sound_info` - Standardize TAG identifier format across all audio elements with `aud` prefix - Fixed a crash caused by passing a NULL encoder config to the init function and subsequently reporting info - Fixed bugs in the implementation of methods for sonic, fade, and mixer - Fixed the issue where the encoder modified the configuration during runtime - Fixed the issue where the mixer did not forward the out_load parameter to downstream components when all input stream were no data - Fixed bugs that not check validation of in and out buffer for mixer which will cause crash - Fixed bugs where setting parameters before opening had no effect for `aud_fade` and `aud_mixer` ## v0.6.3 ### Bug Fixes - Fixed decoder not releasing input port on failure - Fixed missing input size check in gmf_audio_enc when input is insufficient to encode a frame and stream has ended - Fixed missing zero size check for acquire_in in gmf_audio_dec - Fixed unmatched sub_cfg when reconfigured by esp_gmf_audio_helper_reconfig_dec_by_uri ## v0.6.2 ### Features - Limit the version of `esp_audio_codec` and `esp_audio_effects` ## v0.6.1 - Added missing #include "esp_gmf_audio_element.h" across all audio elements - Fixed out-of-range parameter handling for mixer and EQ elements - Resolved rate/bit/channel converter bypass errors caused by asynchronous modification of obj->cfg between set/event callbacks and process functions - Deleted one unreasonable log from esp_gmf_audio_helper.c ## v0.6.0 ### Features - Updated the logic for GMF capabilities and method handling - Added support for NULL object configuration - Added GMF port attribution for elements - Added gmf_cache and optimized the loop path for the audio encoder and decoder - Renamed component to `gmf_audio` - Updated the License ## v0.5.2 ### Bug Fixes - Fixed an issue where the decoder's output done flag was repeatedly set after the input was marked as done - Fixed an issue where the input port was not released when the input data size was 0 ## v0.5.1 ### Bug Fixes - Fixed the component requirements ## v0.5.0 ### Features - Initial version of `esp-gmf-audio`