Skip to main content

Module engine

Module engine 

Source
Expand description

Audio playback engine.

Runs entirely on a dedicated std::thread — no tokio inside this module. The TUI communicates via two std::sync::mpsc channels:

  • PlayerCommand (TUI → engine): play a URL, pause, resume, stop, set volume.
  • PlayerEvent (engine → TUI): progress ticks, track-ended, errors.

Enums§

PlayerCommand
Commands sent from the TUI to the player thread.
PlayerEvent
Events sent from the player thread back to the TUI.

Functions§

spawn_player
Spawn the player thread.