Login
1 branch 0 tags
Ben (Desktop/Arch) FIxed opus playback issues and fixed general audio stuttering cc78267 1 month ago 42 Commits
moon / firmware / src / screens / now_playing_screen.h
#pragma once
#include "../storage.h"
#include "../ui.h"
#include "lvgl.h"

#define MAX_AUDIOBOOK_FILES 128

struct now_playing_screen_state {
  lv_obj_t *container;
  lv_obj_t *title_label;
  lv_obj_t *playlist_label;
  lv_obj_t *chapter_label;
  lv_obj_t *progress_bar;
  lv_obj_t *position_label;
  lv_obj_t *duration_label;
  lv_obj_t *prev_btn;
  lv_obj_t *play_btn;
  lv_obj_t *next_btn;
  bool bookmark_applied;
  uint32_t bookmark_ms;

  // Audiobook directory mode
  char dir[STORAGE_MAX_PATH];
  char files[MAX_AUDIOBOOK_FILES][STORAGE_MAX_NAME];
  int file_count;
  int current_file_index;
};

ui_state_t setup_now_playing_screen(void);
void free_now_playing_screen(now_playing_screen_state_t *state);
void update_now_playing_screen(now_playing_screen_state_t *state);