# `Rockbox`
[🔗](https://github.com/tsirysndr/rockboxd/blob/master/bindings/elixir/lib/rockbox.ex#L1)

Elixir bindings for the Rockbox DSP / metadata / playback engine.

Thin wrappers over the shared `:rockbox_ffi_nif` NIF (see `c_src/` and
`src/`). The interesting modules are `Rockbox.Metadata`, `Rockbox.Dsp`, and
`Rockbox.Player`.

# `abi_version`

```elixir
@spec abi_version() :: non_neg_integer()
```

ABI major version of the loaded native library.

# `is_url?`

```elixir
@spec is_url?(String.t()) :: boolean()
```

Whether a string looks like an `http(s)://` URL.

# `load_resume`

```elixir
@spec load_resume(Path.t()) :: {:ok, map()} | {:error, :absent}
```

Peek at a resume file (an .m3u8 saved by a player) without a live player.

Returns `{:ok, %{tracks: [...], index: i, elapsed_ms: ms}}` or
`{:error, :absent}`.

# `m3u_read`

```elixir
@spec m3u_read(Path.t()) :: {:ok, [map()]} | {:error, term()}
```

Parse an .m3u/.m3u8 playlist file into a list of entry maps with atom keys
(`:path`, `:duration_ms`, `:title`). Returns `{:error, reason}` on failure.

# `m3u_write`

```elixir
@spec m3u_write(Path.t(), [Path.t()]) :: :ok | {:error, :write_failed}
```

Write a list of paths/URLs to `path` as an .m3u8 file (atomic write).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
