Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.13.0 #32

Merged
merged 3 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,27 @@ It is a part of [Membrane Multimedia Framework](https://membraneframework.org).
Add the following line to your `deps` in `mix.exs`. Run `mix deps.get`.

```elixir
{:membrane_audio_mix_plugin, "~> 0.12.0"}
{:membrane_audio_mix_plugin, "~> 0.13.0"}
```

## Description

Both elements operate only on raw audio (PCM), so some parser may be needed to precede them in a pipeline.
Elements operate only on raw audio (PCM), so some parser may be needed to precede them in a pipeline.

The elements expect to receive the same audio stream format on each input pad. It can be additionally enforced by setting an element option (`:stream_format`)
The elements expect to receive the same audio stream format on each input pad.

Input pads can have offset - it tells how much silence should be added before first sample
from that pad. Offset has to be positive.
audio mixer's input pads can have offset - in the case of a regular mixer it tells how much silence should be added before the first sample.
Karolk99 marked this conversation as resolved.
Show resolved Hide resolved
The live mixer will rewrite timestamps based on the value. Offset has to be positive.

All inputs have to be added before starting the pipeline and should not be changed
during mixer's or interleaver's work.

Mixing and interleaving is tested only for integer audio formats.
Mixing and interleaving are tested only for integer audio formats.

### Mixer

The Mixer adds samples from all pads. It has two strategies to deal with the overflow:
scaling down waves and clipping.

Stream format can be additionally enforced by setting an element option (`:stream_format`)

### Interleaver

This element joins several mono audio streams (with one channel) into one stream with interleaved channels.
Expand All @@ -43,6 +42,16 @@ If audio streams have different durations, all shorter streams are appended with

Each channel must be named by providing an input pad name and the channel layout using those names must be provided (see [usage example](#audiointerleaver)).

All inputs have to be added before starting the pipeline and should not be changed during interleaver's work.

Stream format can be additionally enforced by setting an element option (`:stream_format`)


### Live Mixer
The Live Mixer adds samples from all pads. It has two strategies to deal with the overflow:
scaling down waves and clipping. The Live Mixer will produce audio in real time meaning every interval there will be sent a buffer of fixed duration.
In situations where an audio packet is late or doesn't come, the mixer will fill the gaps with silence
Karolk99 marked this conversation as resolved.
Show resolved Hide resolved

## Usage Example

### AudioMixer
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.AudioMix.Mixfile do
use Mix.Project

@version "0.12.0"
@version "0.13.0"
@github_url "https://github.com/membraneframework/membrane_audio_mix_plugin"

def project do
Expand Down