TuningFork.Sink.Process (TuningFork v0.1.11)

Copy Markdown View Source

Raw signed 16-bit little-endian PCM as messages to a process, paced to real time: each chunk arrives as {:pcm, chunk}, and the sink sleeps until the audio before it has nearly played out, keeping :lead_ms in flight.

TuningFork.Stage.start_link(sink: TuningFork.Sink.Process, sink_opts: [owner: self()])

A write after the owner has exited returns {:error, :owner_gone}, which stops the stage feeding the sink.

Options

  • :owner — the process the chunks go to. Required
  • :lead_ms — audio kept in flight ahead of real time. Default 60
  • :rate, :channels — the PCM format, as the stage passes them