Rockbox.RepeatMode (rockbox_ex_ffi v0.6.1)

Copy Markdown View Source

Repeat modes for Rockbox.Player.set_repeat/2.

These mirror the C ABI enum:

AtomValueMeaning
:off0No repeat
:one1Repeat the current track
:all2Repeat the whole queue

to_int/1 accepts either the atom or the raw integer, so callers can pass whichever they prefer; from_int/1 maps a numeric code back to its atom.

Summary

Functions

Atom for a numeric repeat-mode code.

Numeric code for a repeat mode (atom or already an integer).

Types

t()

@type t() :: :off | :one | :all

Functions

from_int(code)

@spec from_int(0..2) :: t()

Atom for a numeric repeat-mode code.

to_int(mode)

@spec to_int(t() | 0..2) :: 0..2

Numeric code for a repeat mode (atom or already an integer).