Trait libaudioverse::nodes::Node [] [src]

pub trait Node {
    fn connect(&self, output: i32, destination: &Node, input: i32) -> Result<()> { ... }
fn connect_property(
        &self,
        output: i32,
        destination: &Node,
        slot: i32
    ) -> Result<()> { ... }
fn connect_server(&self, output: i32) -> Result<()> { ... }
fn disconnect(
        &self,
        output: i32,
        destination: &Node,
        input: i32
    ) -> Result<()> { ... }
fn get_input_connection_count(&self) -> Result<u32> { ... }
fn get_output_connection_count(&self) -> Result<u32> { ... }
fn isolate(&self) -> Result<()> { ... }
fn reset(&self) -> Result<()> { ... }
fn add(&self) -> FloatProperty { ... }
fn mul(&self) -> FloatProperty { ... }
fn state(&self) -> NodeStateProperty { ... } }

The properties and functionality described here are available on every Libaudioverse node without exception.

Provided Methods

Connect the specified output of the specified node to the specified input of the specified node. It is an error if this would cause a cycle in the graph of nodes.

Connect a node’s output to an automatable property.

Connect the specified output of the specified node to the server’s input. Any node which is connected directly or indirectly to the server will remain alive even if your program lets go of it. For more details on the subject of node lifetimes, see the Libaudioverse manual.

Disconnect the output of the specified node.

Get the number of inputs this node has.

Get the number of outputs this node has.

Equivalent to disconnecting all of the outputs of this node. After a call to isolate, this node will no longer be affecting audio in any way.

Reset a node. What this means depends on the node in question. Properties are not touched by node resetting.

Returns the add property.

Range: [-INFINITY, INFINITY]

Default value: 0.0

After mul is applied, we add the value to which this property is set to the node’s result.

Returns the mul property.

Range: [-INFINITY, INFINITY]

Default value: 1.0

After this node processes, the value to which mul is set is used as a multiplier on the result. The most notable effect of this is to change the node’s volume. A variety of other uses exist, however, especially as regards to nodes which are connected to properties. Mul is applied before add.

Returns the state property.

range: a value from the NodeState enumeration.

Default value: NodeState::Playing

The node’s state. See the basics section in the Libaudioverse manual for details. The default is usually what you want.

Implementors