ports AudioInput to new type structure
This commit is contained in:
parent
afe4e0d8be
commit
9312fa745d
1 changed files with 16 additions and 19 deletions
35
src/nodes.jl
35
src/nodes.jl
|
@ -150,22 +150,19 @@ function play{T <: Unsigned}(arr::Array{T}, args...)
|
||||||
play(arr, args...)
|
play(arr, args...)
|
||||||
end
|
end
|
||||||
|
|
||||||
##### AudioInput ####
|
#### AudioInput ####
|
||||||
#
|
|
||||||
## Renders incoming audio input from the hardware
|
# Renders incoming audio input from the hardware
|
||||||
#
|
|
||||||
#export AudioInput
|
type InputRenderer <: AudioRenderer
|
||||||
#type AudioInput <: AudioNode
|
channel::Int
|
||||||
# active::Bool
|
end
|
||||||
# deactivate_cond::Condition
|
|
||||||
# channel::Int
|
function render(node::InputRenderer, device_input::AudioBuf, info::DeviceInfo)
|
||||||
#
|
@assert size(device_input, 1) == info.buf_size
|
||||||
# function AudioInput(channel::Int)
|
return device_input[:, node.channel]
|
||||||
# new(false, Condition(), channel)
|
end
|
||||||
# end
|
|
||||||
#end
|
typealias AudioInput AudioNode{InputRenderer}
|
||||||
#
|
AudioInput(channel::Int) = AudioInput(InputRenderer(channel))
|
||||||
#function render(node::AudioInput, device_input::AudioBuf, info::DeviceInfo)
|
export AudioInput
|
||||||
# @assert size(device_input, 1) == info.buf_size
|
|
||||||
# return device_input[:, node.channel], is_active(node)
|
|
||||||
#end
|
|
||||||
|
|
Loading…
Reference in a new issue