diff --git a/src/nodes.jl b/src/nodes.jl index 3500ff8..daca2cd 100644 --- a/src/nodes.jl +++ b/src/nodes.jl @@ -266,6 +266,8 @@ end type InputRenderer <: AudioRenderer channel::Int + InputRenderer(channel::Integer) = new(channel) + InputRenderer() = new(1) end function render(node::InputRenderer, device_input::AudioBuf, info::DeviceInfo) diff --git a/test/test_nodes.jl b/test/test_nodes.jl index ff40854..bf05430 100644 --- a/test/test_nodes.jl +++ b/test/test_nodes.jl @@ -123,6 +123,13 @@ facts("SinOSC") do end end +facts("AudioInput") do + node = AudioInput() + test_data = rand(AudioSample, test_info.buf_size) + render_output = render(node, test_data, test_info) + @fact render_output => test_data +end + facts("ArrayPlayer") do context("playing long sample") do v = rand(AudioSample, 44100)