wavex v0.1.8 Wavex.DataChunk
Reading a data chunk.
Link to this section Summary
Functions
Read a data chunk
Link to this section Types
Link to this section Functions
Link to this function
read(binary, block_align)
read(binary(), non_neg_integer()) :: {:ok, t()} | {:error, binary()}
Read a data chunk.
Examples
sapp.org, 2018-04-30, Microsoft WAVE soundfile format
iex> Wavex.DataChunk.read(<<
...> 0x64, 0x61, 0x74, 0x61, # d a t a
...> 0x02, 0x00, 0x00, 0x00, # 2
...> 0x00, 0x00, 0x00, 0x00, # 0
...> 0x00, 0x00, 0x00, 0x00 # 0
...> >>, 4)
{:ok, %Wavex.DataChunk{size: 2, data: <<0, 0, 0, 0, 0, 0, 0, 0>>}}