rust-alsa:用于 Rust 的 libasound 绑定

时间:2021-05-29 19:46:32
【文件属性】:
文件名称:rust-alsa:用于 Rust 的 libasound 绑定
文件大小:35KB
文件格式:ZIP
更新时间:2021-05-29 19:46:32
rust-alsa - libasound 的乡村绑定 目前,仅包含非常基本的 PCM 用法。 例子 这会播放441Hz音调的一秒。 extern crate alsa; use alsa :: {PCM, Stream, Mode, Format, Access}; use std :: f32 :: consts :: PI; fn main () { let pcm = PCM :: open ( "default" , Stream :: Playback, Mode :: Blocking). unwrap (); let mut pcm = pcm. set_parameters (Format :: FloatLE, Access :: Interleaved, 1 , 44100 ). ok (). unwrap (); let mut buf
【文件预览】:
rust-alsa-master
----.travis.yml(64B)
----src()
--------ffi.rs(318KB)
--------alsa.rs(4KB)
----Cargo.toml(166B)
----examples()
--------sine.rs(510B)
----.gitignore(19B)
----README.md(727B)

网友评论