How oxygencobalt/auxio works
Main Components Overview
The system should be divided into these key architectural components:
a. UI Layer
• Main Activity & Fragments
• Home/Detail/Playback Views
• Settings & Configuration
• Custom UI Components
b. Music Processing Layer
• Music Library Management
• Metadata Extraction (Musikr module)
• Tag Processing
• Playlist Management
c. Playback Layer
• Media3 ExoPlayer Integration
• Playback State Management
• Audio Processing (ReplayGain)
• Background Service
d. Storage Layer
• File System Access
• Cache Management
• Playlist Storage
• Cover Art Management
Component Relationships
[UI Layer]
• ↑↓
[Music Processing Layer]
• ↑↓
[Playback Layer]
• ↑↓
[Storage Layer]
Specific Implementation Details
Key technical elements:
a. UI Layer Components:
• Fragment-based navigation system
• Material Design components
• Custom views for playback controls
• Widget support
b. Music Processing Components:
• Native C++ integration for tag processing
• Music indexing system
• Metadata extraction pipeline
• Artist/Album/Genre organization
c. Playback Components:
• ExoPlayer service integration
• Queue management
• Audio focus handling
• Notification controls
d. Storage Components:
• Media store integration
• File system abstraction
• Cache database
• Cover art processing
Important Flows to Highlight
a. Music Loading Flow:
Storage → Metadata Extraction → Library Organization → UI Update
b. Playback Flow:
UI Input → Playback State → ExoPlayer → Audio Output
c. Data Persistence Flow:
User Actions → State Management → Storage Layer
External Integrations
Connections to:
• Android Media APIs
• ExoPlayer
• Storage Framework
• System Services
Architecture Patterns
• MVVM architecture
• Repository pattern
• Observer pattern for state management
• Service-based background processing
Remember to show the modular nature of the application, particularly the separation between the main app and the Musikr module for music processing. This separation is crucial for understanding the system's architecture.