commits
enable LTO in release build
OS media controls
Allow user to decide how often events are polled. This helps reduce
resource consumption while still providing smooth playback and user
decides which one they prefer.
It is possible that the player thread returns before this thread has a
chance to, this would mean that the sender is dropped and thus the
`recv()` would return an `Err`. Since this is the only time an `Err`
would be produced, it is safe to return from this function instead of
hoping it might be able to receive a frame again and thus continuing
within the function.
If thread is not put to sleep, it would spin continuously and thus
consume a lot of resources. This prevents that.
Allow user to decide if OS media controls should be enabled.
Setup the [`OsMediaControls`], process the ones reported by the OS.
Support for player controls (play, pause, volume control)
Prior to this, once paused, would get stuck at receiving the frame
since the receiver sleeps when nothing is available, thus no events
are polled. By receiving only when playing, this eliminates the issue.
NOTE: cannot use `try_recv()` since it would lead to flickering when
this thread is running faster than the audio producing thread.
This prevents the problems of floating point, usually the person just
wants to adjust the percentage, doesn't care about the actual ratio.
This allows using `KeyCode::Char(' ')` to play and pause.
This adds play, pause & playpause functionality. The media keys
haven't been tested but in theory should work.
This is so that media controls work when implemented.
`minimp3` used to depend on `slice-deque` which is unmaintained and
contains memory safety issues, see
https://github.com/germangb/minimp3-rs/issues/42
`minimp3` now uses `slice-ring-buffer`
the closing bracket was missing from the CI badge
feat: add systemd service commands
It is possible that the player thread returns before this thread has a
chance to, this would mean that the sender is dropped and thus the
`recv()` would return an `Err`. Since this is the only time an `Err`
would be produced, it is safe to return from this function instead of
hoping it might be able to receive a frame again and thus continuing
within the function.
Prior to this, once paused, would get stuck at receiving the frame
since the receiver sleeps when nothing is available, thus no events
are polled. By receiving only when playing, this eliminates the issue.
NOTE: cannot use `try_recv()` since it would lead to flickering when
this thread is running faster than the audio producing thread.