FromRawAudioSamples

Trait FromRawAudioSamples 

Source
pub trait FromRawAudioSamples:
    Sized
    + Send
    + Sync
    + Copy {
    const FORMAT: u32;

    // Required method
    unsafe fn from_raw(
        length: i32,
        num_channels: u32,
        audio_data_ptr: *const u8,
    ) -> Vec<Self>;
}
Available on crate feature output only.
Expand description

音声サンプルを表すトレイト。 aviutl2-rsでは、このトレイトを実装した型で音声サンプルのフォーマットを指定します。

Required Associated Constants§

Source

const FORMAT: u32

音声サンプルのフォーマットを表す定数。

Required Methods§

Source

unsafe fn from_raw( length: i32, num_channels: u32, audio_data_ptr: *const u8, ) -> Vec<Self>

音声サンプルの情報を生のポインタから取得する。

§Safety

func_get_audioの戻り値のポインタのみが許容される。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromRawAudioSamples for f32

Source§

const FORMAT: u32 = 3u32

Source§

unsafe fn from_raw( length: i32, num_channels: u32, frame_data_ptr: *const u8, ) -> Vec<Self>

Source§

impl FromRawAudioSamples for i16

Source§

const FORMAT: u32 = 1u32

Source§

unsafe fn from_raw( length: i32, num_channels: u32, frame_data_ptr: *const u8, ) -> Vec<Self>

Implementors§