pub struct BassChannelOutputStream { /* private fields */ }Implementations§
Source§impl BassChannelOutputStream
impl BassChannelOutputStream
Sourcepub fn new(sample_rate: u32, num_channels: u32) -> Self
pub fn new(sample_rate: u32, num_channels: u32) -> Self
创建一个通道输出流。
sample_rate 采样率。
num_channels 声道数量。
Sourcepub fn from_memory_file(data: &[u8]) -> Self
pub fn from_memory_file(data: &[u8]) -> Self
从内存文件创建实例。
data 文件数据。
Sourcepub fn from_disk_file(path: &str) -> Self
pub fn from_disk_file(path: &str) -> Self
从磁盘文件创建实例。
path 文件路径。
Sourcepub fn put_file_data(&self, data: &[u8]) -> i32
pub fn put_file_data(&self, data: &[u8]) -> i32
写入文件数据。
data 音频文件数据。
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
判断播放状态是否已经停止。
Sourcepub async fn wait_until_stopped_or_stalled(&self)
pub async fn wait_until_stopped_or_stalled(&self)
等待直到停止状态或没有数据可以播放。
Sourcepub async fn wait_until_paused(&self)
pub async fn wait_until_paused(&self)
等待直到暂停。
Trait Implementations§
Source§impl Debug for BassChannelOutputStream
impl Debug for BassChannelOutputStream
Source§impl Drop for BassChannelOutputStream
impl Drop for BassChannelOutputStream
impl Send for BassChannelOutputStream
impl Sync for BassChannelOutputStream
Auto Trait Implementations§
impl Freeze for BassChannelOutputStream
impl RefUnwindSafe for BassChannelOutputStream
impl Unpin for BassChannelOutputStream
impl UnwindSafe for BassChannelOutputStream
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