[][src]Module lv2_atom::chunk

An atom containing memory of undefined type.

This contents of this atom is considered as a simple blob of data. It used, for example, by the host to transmit the size of a writable atom port. Since it is so simple, it does not need a reading or writing parameter.

Example

use lv2_core::prelude::*;
use lv2_atom::prelude::*;

#[derive(PortCollection)]
struct MyPorts {
    input: InputPort<AtomPort>,
    output: OutputPort<AtomPort>,
}

fn run(ports: &mut MyPorts, urids: &AtomURIDCollection) {
    let in_chunk: &[u8] = ports.input.read(urids.chunk, ()).unwrap();
    let mut out_chunk: FramedMutSpace = ports.output.init(urids.chunk, ()).unwrap();

    out_chunk.write_raw(in_chunk, false).unwrap();
}

Specification

http://lv2plug.in/ns/ext/atom/atom.html#Chunk

Structs

Chunk

An atom containing memory of undefined type.