# Snapcast v0.2.1 - Table of Contents

> A pure-Elixir Snapcast server: speak Snapcast's binary protocol directly to snapclients, owning the audio clock and timestamping every chunk — no external snapserver.

## Pages

- [Snapcast](readme.md)

## Modules

- Server
  - [Snapcast](Snapcast.md): A pure-Elixir snapcast **server**: speak snapcast's binary protocol directly to
snapclients, owning the audio clock and timestamping every chunk, so there is no
external snapserver and no ffmpeg/snapserver pacing to fight.
  - [Snapcast.Clock](Snapcast.Clock.md): The server's monotonic audio clock, shared by all sessions and streams.
  - [Snapcast.Listener](Snapcast.Listener.md): Behaviour for receiving `Snapcast.Server` lifecycle events.
  - [Snapcast.Protocol](Snapcast.Protocol.md): Snapcast binary wire protocol — encode/decode (a pure-Elixir snapcast SERVER).
  - [Snapcast.Server](Snapcast.Server.md): The snapcast server: a TCP listener that accepts snapclients, plus the playback
coordinator. Each connection becomes a `Snapcast.Session` (self-registers on
`Hello`). `play/3` (re)starts a `Snapcast.Stream` feeding the targeted clients,
and the transport ops (pause/resume/seek/stop/volume) map onto it.
  - [Snapcast.Session](Snapcast.Session.md): One connected snapclient. Owns the TCP socket, speaks the snapcast protocol, and
writes the audio chunks the stream hands it.
  - [Snapcast.Stream](Snapcast.Stream.md): Decodes one source to PCM and paces it out as timestamped WireChunks.

- Discovery
  - [Snapcast.Advertiser](Snapcast.Advertiser.md): Advertises the embedded Snap server through mDNS/DNS-SD.
  - [Snapcast.LocalClient](Snapcast.LocalClient.md): Supervises a local `snapclient` process connected to the embedded Snap server.

