pub struct SoundManager { /* private fields */ }Expand description
音声の管理を行う構造体
Implementations§
Source§impl SoundManager
impl SoundManager
Sourcepub fn play_from_bytes(&mut self, data: &[u8]) -> Result<()>
pub fn play_from_bytes(&mut self, data: &[u8]) -> Result<()>
バイト列から音声を再生する
Sourcepub fn play_from_file(&mut self, path: &str) -> Result<()>
pub fn play_from_file(&mut self, path: &str) -> Result<()>
ローカルファイルから音声を再生する
Sourcepub fn play_from_local_uri(&mut self, uri: &str) -> Result<()>
pub fn play_from_local_uri(&mut self, uri: &str) -> Result<()>
URIから音声を再生する(resourceまたはfileスキームに対応)
通常の再生には play_from_bytes を使用してください。
これはテスト用メソッドです
Auto Trait Implementations§
impl Freeze for SoundManager
impl !RefUnwindSafe for SoundManager
impl Send for SoundManager
impl Sync for SoundManager
impl Unpin for SoundManager
impl !UnwindSafe for SoundManager
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more