Struct oxcable::mixers::multiplexer::Multiplexer
[−]
[src]
pub struct Multiplexer { // some fields omitted }
A multiplexer.
A multiplexer takes in several inputs, and chooses only one of them to send to the output. Since the input can be changed, this can be used as a switch between multiple signals.
Methods
impl Multiplexer
fn new(num_inputs: usize) -> Self
Returns a new multiplexer with num_inputs
input and one output.
fn select_input(&mut self, i: usize) -> Result<(), ()>
Selects the i
th channel as the output. Returns Err if the channel is
out of range.
While this has identical behavior to the SetChannel
message, the
method is retained so that it may return a result.