Struct sorceress::server::BufferAllocateRead[][src]

pub struct BufferAllocateRead { /* fields omitted */ }

Allocate buffer space and reads a sound file.

Allocates buffer with the given number of channels and up to the given numer of frames, depending on the size of the file. Reads sound file data from the given starting frame in the file. If the number of frames argument is less than or equal to zero, the entire file is read. The sound file will determine how many channels are allocated for the buffer.

Asynchronous. Replies to the sender with a Reply::BufferAllocateReadDone message containing the same buffer number specified in this command when complete.

Implementations

impl BufferAllocateRead[src]

pub fn new(
    buffer_number: i32,
    file_path: impl Into<String>
) -> BufferAllocateRead
[src]

Creates a new BufferAllocateRead command.

Arguments

  • buffer_number - The buffer number.
  • file_path - The path to a sound file on the SuperCollider server’s filesystem.

pub fn starting_frame(self, starting_frame: i32) -> BufferAllocateRead[src]

The frame number in the file where SuperCollider will begin reading. Defaults to 0.

pub fn number_of_frames(self, number_of_frames: i32) -> BufferAllocateRead[src]

The maximum number of frames to read from the file. Defaults to 0.

pub fn on_completion(self, message: Vec<u8>) -> BufferAllocateRead[src]

An optional OSC message to execute on completion.

Trait Implementations

impl AsyncCommand for BufferAllocateRead[src]

impl Clone for BufferAllocateRead[src]

impl Command for BufferAllocateRead[src]

impl Debug for BufferAllocateRead[src]

impl PartialEq<BufferAllocateRead> for BufferAllocateRead[src]

impl PartialOrd<BufferAllocateRead> for BufferAllocateRead[src]

impl StructuralPartialEq for BufferAllocateRead[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.