Function libpd_rs::array::write_double_array_to
source · [−]pub fn write_double_array_to<T: AsRef<str>>(
destination_name: T,
destination_write_offset: i32,
source: &[f64],
source_read_amount: i32
) -> Result<(), ArrayError>Expand description
Writes a slice of f64 to a pd named array.
Reads values as much as read_amount from the array which is given as the source argument
and writes them to a named array in pd which is specified with destination_name argument starting at destination_write_offset.
Example
use libpd_rs::array::write_double_array_to;
let source = [1.0_f64; 64];
write_double_array_to("my_array", 32, &source, 32).unwrap();Errors
This function performs no bounds checking on the destination.
If destination_offset + read_amount is greater than the size of the destination or
the array which we’re trying to read from is not existent it will return an error.
A list of errors that can occur:
