Skip to content

membraneframework/membrane_flac_plugin

Repository files navigation

Membrane FLAC plugin

Hex.pm API Docs CircleCI

This package provides an element for parsing FLAC encoded audio stream. More info can be found in the docs for element module.

Installation

The package can be installed by adding membrane_flac_plugin to your list of dependencies in mix.exs:

def deps do
  [
    {:membrane_flac_plugin, "~> 0.12.0"}
  ]
end

Usage example

defmodule Membrane.Demo.FlacPipeline do
  use Membrane.Pipeline
  alias Membrane.{Fake}
  @impl true
  def handle_init(_opts) do
    links = [
      child(:file, %Membrane.File.Source{location: "sample.flac"})
      |> child(:parser, %Membrane.FLAC.Parser{streaming?: false})
      |> child(:fake_sink, Fake.Sink.Buffers)
    ]
    {[spec: links], %{}}
  end
end

To run the example:

alias Membrane.Demo.FlacPipeline
{:ok, pid} = FlacPipeline.start_link_supervised!("sample.flac")
FlacPipeline.play(pid)

Dependencies for the example above:

  {:membrane_file_plugin, "~> 0.14.0"},
  {:membrane_fake_plugin, "~> 0.10.0"},
  {:membrane_flac_plugin, "~> 0.12.0"}

Sponsors

This project is sponsored by Abridge AI, Inc.

Copyright and License

Copyright 2019, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0