Plays the PCM a Cauldron2D.Net.Link.Socket delivers through this machine's speaker,
in a process of its own so the writes never hold up whoever draws.
{:ok, sound} = Cauldron2D.Net.Sound.start_link()
Cauldron2D.Net.Sound.play(sound, chunk)Options: :sink, the TuningFork.Sink module (default TuningFork.Sink.Speaker);
:rate and :channels (default 44100 and 2). The sink opens on the first chunk;
format/3 sets the rate and channels the next chunks come in, reopening it.
Summary
Functions
Returns a specification to start this module under a supervisor.
The rate and channels the chunks come in from now on.
Queue a chunk of signed 16-bit little-endian PCM.
Start the player.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec format(GenServer.server(), pos_integer(), 1 | 2) :: :ok
The rate and channels the chunks come in from now on.
@spec play(GenServer.server(), binary()) :: :ok
Queue a chunk of signed 16-bit little-endian PCM.
@spec start_link(keyword()) :: GenServer.on_start()
Start the player.