# `Membrane.WAV.Serializer`
[🔗](https://github.com/membraneframework/membrane_wav_plugin/blob/v0.10.3/lib/membrane_wav/serializer.ex#L1)

Element responsible for raw audio serialization to WAV format.

Creates WAV header (its description can be found with `Membrane.WAV.Parser`) based on a format received in stream_format and puts it before audio samples. The element assumes that audio is in PCM format.

`file length` and `data length` fields can be calculated only after processing all samples, so
the serializer uses `Membrane.File.SeekSinkEvent` to supply them with proper values before the end
of stream. If your sink doesn't support seeking, set `disable_seeking` option to `true` and fix
the header using `Membrane.WAV.Postprocessing`.

## Element options

Passed via struct `t:Membrane.WAV.Serializer.t/0`

- `disable_seeking`  

  ```
  boolean()
  ```
  
  Default value: `false`  
  Whether the element should disable emitting `Membrane.File.SeekEvent`.
  
  The event is used to supply the WAV header with proper values before
  the end of stream. If your sink doesn't support it, you should set this
  option to `true` and use `Membrane.WAV.Postprocessing` to fix the header.

## Pads

### `:input`

Accepted formats:
```
RawAudio
```

Direction: | `:input`
Availability: | `:always`
Flow control: | `:auto`

### `:output`

Accepted formats:
```
_any
```

Direction: | `:output`
Availability: | `:always`
Flow control: | `:auto`

# `t`

```elixir
@type t() :: %Membrane.WAV.Serializer{disable_seeking: boolean()}
```

Struct containing options for `Membrane.WAV.Serializer`

# `options`

```elixir
@spec options() :: keyword()
```

Returns description of options available for this module

---

*Consult [api-reference.md](api-reference.md) for complete listing*
