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

Audio file metadata / tag parsing.

# `probe`

```elixir
@spec probe(String.t()) :: String.t() | nil
```

Guess the codec label (e.g. `"FLAC"`) from a filename's extension without
opening the file. Returns `nil` for an unknown extension.

# `read`

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

Parse the metadata of the audio file at `path`.

Returns `{:ok, map}` with atom keys (`:codec`, `:title`, `:duration_ms`,
`:sample_rate`, a nested `:replaygain` map, …) or `{:error, reason}`.

# `read!`

```elixir
@spec read!(Path.t()) :: map()
```

Same as `read/1` but raises on error.

---

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