[−][src]Module lv2_atom::port
Integration for plugin ports.
This module contains a PortType
for plugin ports that supports atom IO. This will most common
way to use atoms and is also used in most examples.
Example
use lv2_core::prelude::*; use lv2_atom::prelude::*; #[derive(PortCollection)] struct MyPorts { input: InputPort<AtomPort>, output: OutputPort<AtomPort>, } /// Something like a plugin's run method. fn run(ports: &mut MyPorts, urids: &AtomURIDCollection) { // Read an integer from the port and print it. println!("My input is: {}", ports.input.read(urids.int, ()).unwrap()); // Write the integer `42` to the port. ports.output.init(urids.int, 42).unwrap(); }
Structs
AtomPort | The port type for Atom IO. |
PortReader | A handle to read atoms from a port. |
PortWriter | A handle to write atoms into a port. |