I was wondering how to configure latency, so I look inside the code and thought since it is a very common question in audio processing, maybe you would be open to adding an example directly in the readme over there?
This appears to work with the onboard MacBook Air card (didn't test out with my real sound cards so far):
Mix.install([
{:membrane_portaudio_plugin, "~> 0.19.2"}
])
Membrane.PortAudio.print_devices()
defmodule MyPipeline do
use Membrane.Pipeline
alias Membrane.PortAudio
@impl true
def handle_init(_ctx, _opts) do
structure =
child(:pa_src, %PortAudio.Source{portaudio_buffer_size: 32, latency: :low})
|> child(:pa_sink, %PortAudio.Sink{portaudio_buffer_size: 32, latency: :low})
{[spec: structure], %{}}
end
end
Membrane.Pipeline.start_link(MyPipeline)
:timer.sleep(10_000)
(coming from https://github.com/membraneframework/membrane_portaudio_plugin)
I was wondering how to configure latency, so I look inside the code and thought since it is a very common question in audio processing, maybe you would be open to adding an example directly in the readme over there?
This appears to work with the onboard MacBook Air card (didn't test out with my real sound cards so far):