pub enum PlayerMode {
Static = 0,
Stream = 1,
}Expand description
Player mode
Defines the two playback modes of the audio player. Different modes are suitable for different use cases.
§Examples
use android_media::PlayerMode;
let mode = PlayerMode::Stream;
assert_eq!(mode.value(), 1);Variants§
Static = 0
Static mode - suitable for playing short audio files
In static mode, audio data is loaded into memory in one go before playback, suitable for playing shorter, fixed audio files (e.g., prompts, sound effects).
Stream = 1
Stream mode - suitable for playing long audio files or real-time audio streams
In stream mode, audio data is written to the player in chunks, suitable for playing longer audio or real-time audio streams (e.g., music, real-time call audio).
Implementations§
Trait Implementations§
Source§impl Clone for PlayerMode
impl Clone for PlayerMode
Source§fn clone(&self) -> PlayerMode
fn clone(&self) -> PlayerMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlayerMode
impl Debug for PlayerMode
Source§impl PartialEq for PlayerMode
impl PartialEq for PlayerMode
impl Copy for PlayerMode
impl Eq for PlayerMode
impl StructuralPartialEq for PlayerMode
Auto Trait Implementations§
impl Freeze for PlayerMode
impl RefUnwindSafe for PlayerMode
impl Send for PlayerMode
impl Sync for PlayerMode
impl Unpin for PlayerMode
impl UnwindSafe for PlayerMode
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