app_manager.c 569 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // Created by kindring on 2025/12/26.
  3. //
  4. #include "esp_log.h"
  5. #include "app_io.h"
  6. #include "app_manager.h"
  7. #define TAG "app_manager"
  8. audio_mode_t m_current_audio_mode = AUDIO_MODE_NORMAL;
  9. const char* mode_names[] = {
  10. "NORMAL",
  11. "BASS_BOOST",
  12. };
  13. // 切换为下一个播放模式
  14. audio_mode_t next_audio_mode()
  15. {
  16. const audio_mode_t next_audio_mode = (m_current_audio_mode + 1) % AUDIO_MODE_MAX;
  17. ESP_LOGI(TAG, "Audio mode switched to: %s", mode_names[next_audio_mode]);
  18. update_output_mode(next_audio_mode);
  19. return next_audio_mode;
  20. }