-
Notifications
You must be signed in to change notification settings - Fork 0
Glossary
Relevant source files
The following files were used as context for generating this wiki page:
This page provides a comprehensive reference for technical terms, domain concepts, and implementation-specific identifiers used throughout the Aurora codebase. It serves as a bridge between the high-level music player features and the underlying Rust and Slint implementation.
| Term | Definition | Code Pointer |
|---|---|---|
| The Daemon | The background process (aurora-daemon) responsible for audio decoding, playback management, and database persistence. |
daemon/src/main.rs:1-10 |
| The Player | The GUI frontend (aurora-player) built with Slint that provides the user interface. |
app/src/main.rs:1-10 |
| Protocol | The shared crate (aurora-protocol) defining the IPC message format and common data structures. |
protocol/src/lib.rs:1-10 |
| Wire Protocol | A length-prefixed JSON serialization format used over Unix sockets for Client-Daemon communication. | app/src/interface.rs:40-49 |
Sources: README.md:10-18, app/src/interface.rs:40-49
In Aurora, a "Song" exists in two forms:
-
SongMeta: Used within the daemon's internal state. It contains the absolutePathBufto the file on disk. -
Song: The protocol-level representation sent to the UI. It replaces the file path with a UI-friendlydurationstring and flags likehas_art.
Implementation:
The daemon converts SongMeta to Song using a From implementation when sending status updates or search results daemon/src/types/state_impl/mod.rs:37-43.
A HashMap<Uuid, SongMeta> stored in the daemon's memory. It is built by scanning the filesystem and cross-referencing with the SQLite database.
- UUID Generation: IDs are generated using UUID v5 based on the file path to ensure consistency across rescans daemon/Cargo.toml:25-25.
The "Source of Truth" for the background process. It holds the rodio::Sink for audio output, the current queue, the library index, and the database connection.
Sources: daemon/src/types/state_impl/mod.rs:16-30, protocol/src/songs.rs:1-20
A rodio::Sink instance that manages the audio output stream. It handles the actual playback, pausing, and volume control at the hardware/OS level daemon/src/types/state_impl/mod.rs:20-20.
A custom wrapper around Symphonia decoders that allows Aurora to jump to specific timestamps in a track. It is stored in the StateStruct when a track is active daemon/src/types/state_impl/mod.rs:22-22.
A snapshot of the playback engine's current state (position, volume, shuffle mode) sent from the daemon to the player every few hundred milliseconds protocol/src/lib.rs:13-20.
This diagram maps the natural language "Playback" concept to the specific code entities handling the data.
"Playback Engine Mapping"
graph TD
subgraph "Natural Language Space"
A["User clicks Play"]
B["Audio starts"]
C["Progress bar moves"]
end
subgraph "Code Entity Space"
A -->|"Request::Play(Uuid)"| D["handle_client (daemon)"]
D --> E["StateStruct::add()"]
E --> F["source::SeekableAudio::new()"]
F --> G["rodio::Sink::play()"]
G --> H["Response::Status"]
H --> I["AuroraPlayer::set_position()"]
I --> C
end
Sources: daemon/src/types/state_impl/mod.rs:55-79, app/src/interface.rs:114-121, protocol/src/interface.rs:6-7
Functions defined in .slint files that are implemented in Rust. For example, refresh-library() in TabSelectorView.slint triggers a Request::Search in interface.rs.
A buffer type used to pass decoded image data (album art) from the background async threads in interface.rs to the Slint UI thread without blocking the interface app/src/interface.rs:30-38.
A global object in Slint (Theme) and a struct in Rust (Theme) that synchronizes colors across the application.
-
Hex to U8: The function
hex_to_u8converts CSS-style hex strings fromconfig.tomlintoslint::Colorobjects app/src/interface.rs:20-28.
Mapping of visual interface sections to their Slint implementation files.
"UI Component Space"
graph LR
subgraph "Visual Interface"
UI1["Navigation Tabs"]
UI2["Song List"]
UI3["Transport Controls"]
UI4["Color Scheme"]
end
subgraph "Code Entities (.slint)"
UI1 --- T1["TabSelectorView.slint"]
UI2 --- T2["CustomComp.slint (SongList)"]
UI3 --- T3["PlayerView.slint"]
UI4 --- T4["Types.slint (global Theme)"]
end
subgraph "Rust Backend (interface.rs)"
T1 --> B1["aurora.on_refresh_library()"]
T4 --> B2["Response::Theme(theme)"]
B2 --> B3["hex_to_u8()"]
end
Sources: app/ui/TabSelectorView.slint:34-36, app/ui/Types.slint:40-51, app/src/interface.rs:20-28
| Abbreviation | Full Term | Context in Aurora |
|---|---|---|
| IPC | Inter-Process Communication | The communication between aurora-player and aurora-daemon via Unix Sockets. |
| MPRIS2 | Media Player Remote Interfacing Specification | Allows Linux desktop environments (like GNOME/KDE) to control Aurora playback. |
| UUID | Universally Unique Identifier | Used to uniquely identify songs and playlists regardless of their path protocol/src/interface.rs:7-7. |
| NFP | Nerd Font Patched | Refers to the JetBrainsMono NFP font required to render UI icons README.md:51-51. |
Sources: README.md:12-29, daemon/Cargo.toml:33-33
Overview
aurora-daemon
- Background Service
- Startup & State Init
- Request Handlers & Dispatch
- Playback Engine & Audio
- Library Indexing & Watching
- Playlists, Liked & History
- Background Threads
aurora-protocol
aurora-player
Reference