pub struct StreamingSoundData<Error>where
Error: Send + 'static,{
pub settings: StreamingSoundSettings,
/* private fields */
}Expand description
A streaming sound that is not playing yet.
Fields§
§settings: StreamingSoundSettingsSettings for the streaming sound.
Implementations§
Source§impl<Error> StreamingSoundData<Error>where
Error: Send,
impl<Error> StreamingSoundData<Error>where
Error: Send,
Sourcepub fn from_decoder(
decoder: impl Decoder<Error = Error> + 'static,
settings: StreamingSoundSettings,
) -> StreamingSoundData<Error>
pub fn from_decoder( decoder: impl Decoder<Error = Error> + 'static, settings: StreamingSoundSettings, ) -> StreamingSoundData<Error>
Creates a StreamingSoundData for a Decoder.
Source§impl<T> StreamingSoundData<T>where
T: Send,
impl<T> StreamingSoundData<T>where
T: Send,
Source§impl StreamingSoundData<FromFileError>
impl StreamingSoundData<FromFileError>
Sourcepub fn from_file(
path: impl AsRef<Path>,
settings: StreamingSoundSettings,
) -> Result<StreamingSoundData<FromFileError>, FromFileError>
pub fn from_file( path: impl AsRef<Path>, settings: StreamingSoundSettings, ) -> Result<StreamingSoundData<FromFileError>, FromFileError>
Creates a StreamingSoundData for an audio file.
Sourcepub fn from_cursor<T>(
cursor: Cursor<T>,
settings: StreamingSoundSettings,
) -> Result<StreamingSoundData<FromFileError>, FromFileError>
pub fn from_cursor<T>( cursor: Cursor<T>, settings: StreamingSoundSettings, ) -> Result<StreamingSoundData<FromFileError>, FromFileError>
Creates a StreamingSoundData for a cursor wrapping audio file data.
Sourcepub fn from_media_source(
media_source: impl MediaSource + 'static,
settings: StreamingSoundSettings,
) -> Result<StreamingSoundData<FromFileError>, FromFileError>
pub fn from_media_source( media_source: impl MediaSource + 'static, settings: StreamingSoundSettings, ) -> Result<StreamingSoundData<FromFileError>, FromFileError>
Creates a StreamingSoundData for a type that implements Symphonia’s
MediaSource trait.
Trait Implementations§
Source§impl<Error> SoundData for StreamingSoundData<Error>where
Error: Send + 'static,
impl<Error> SoundData for StreamingSoundData<Error>where
Error: Send + 'static,
Source§type Handle = StreamingSoundHandle<Error>
type Handle = StreamingSoundHandle<Error>
The type that can be used to control the sound once
it has started.
Source§fn into_sound(
self,
) -> Result<(Box<dyn Sound>, <StreamingSoundData<Error> as SoundData>::Handle), <StreamingSoundData<Error> as SoundData>::Error>
fn into_sound( self, ) -> Result<(Box<dyn Sound>, <StreamingSoundData<Error> as SoundData>::Handle), <StreamingSoundData<Error> as SoundData>::Error>
Converts the loaded sound into a live, playing sound
and a handle to control it. Read more
Auto Trait Implementations§
impl<Error> Freeze for StreamingSoundData<Error>
impl<Error> !RefUnwindSafe for StreamingSoundData<Error>
impl<Error> Send for StreamingSoundData<Error>
impl<Error> !Sync for StreamingSoundData<Error>
impl<Error> Unpin for StreamingSoundData<Error>
impl<Error> !UnwindSafe for StreamingSoundData<Error>
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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