# `Cauldron2D.Audio.Keyed`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/cauldron_2d/lib/cauldron_2d/audio/keyed.ex#L1)

A sound event under a key, as `Cauldron2D.Audio.keyed/4`, `moved/2` and `stopped/2`
build it for `Cauldron2D.Audio.play/2`.

  * `:play` — sound `name` under `key`, at `at`, replacing whatever sounds under `key`;
    with `loop` `true`, round and round until stopped
  * `:move` — the sound under `key` is now at `at`
  * `:stop` — let the sound under `key` go over `fade` seconds

`at` is `{x, y}` against the listener, `nil` for full level centred, or
`{:level, gain, pan}` for a level the game works out itself. With `music` `true` the
music level scales it instead of the effects level.

# `position`

```elixir
@type position() :: {number(), number()} | {:level, number(), number()} | nil
```

# `t`

```elixir
@type t() :: %Cauldron2D.Audio.Keyed{
  action: :play | :move | :stop,
  at: position(),
  fade: float(),
  key: term(),
  loop: boolean(),
  music: boolean(),
  name: term()
}
```

---

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