A TuningFork.Sink that plays through the machine's audio device.
{:ok, stage} = TuningFork.Stage.start_link(sink: TuningFork.Sink.Speaker, chunk: 256)
Summary
Functions
Whether this machine can play sound.
Open the device. Returns {:ok, state} or {:error, :unavailable} when this machine has
no audio device.
Frames currently queued for playback.
Queue PCM for playback. Blocks until no more than :lead frames are queued before adding
more, then writes all of pcm. Returns :ok or {:error, reason}.
Functions
@spec available?() :: boolean()
Whether this machine can play sound.
Open the device. Returns {:ok, state} or {:error, :unavailable} when this machine has
no audio device.
Options:
:rate— samples per second, default 44100:channels— default 2;TuningFork.Stagepasses its own:lead— frames kept queued ahead of playback, default 512:buffer— ring size in frames, default 4096; must be larger than:lead
@spec queued(map()) :: non_neg_integer()
Frames currently queued for playback.
Queue PCM for playback. Blocks until no more than :lead frames are queued before adding
more, then writes all of pcm. Returns :ok or {:error, reason}.