#[repr(C)]pub struct NetEvent {
pub message: NetMessage,
pub sample_offset: u32,
}Expand description
A network event with sample-accurate timing for audio buffer processing.
Combines a network message with a sample offset indicating when the event should be processed within the current audio buffer.
Fields§
§message: NetMessageThe network message data.
sample_offset: u32Sample offset within the current buffer (0 to buffer_size - 1).
Implementations§
Source§impl NetEvent
impl NetEvent
Sourcepub fn new(message: NetMessage, sample_offset: u32) -> Self
pub fn new(message: NetMessage, sample_offset: u32) -> Self
Create a new network event with sample offset.
Sourcepub fn immediate(message: NetMessage) -> Self
pub fn immediate(message: NetMessage) -> Self
Create an event to be processed at the start of the buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetEvent
impl RefUnwindSafe for NetEvent
impl Send for NetEvent
impl Sync for NetEvent
impl Unpin for NetEvent
impl UnwindSafe for NetEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more