[−][src]Struct openpol::sounddat::Sounddat
A way to access sound.dat contents.
Methods
impl Sounddat
[src]
pub fn load<T: Read>(reader: T) -> Option<Sounddat>
[src]
Load sound.dat contents. All of it is read into memory.
Errors
The code will panic if reader
cannot read to end. If the number of sounds can't be
autodetected (the file contains unexpected data) the function will return None
.
pub fn sounds(&self) -> usize
[src]
The number of sounds in the file.
pub fn sound_data(&self, sound: usize) -> &[u8]
[src]
The sound
's data (sound
is 0-based). The data is to be interpreted as described by the
module's documentation on the sound format.
Auto Trait Implementations
impl RefUnwindSafe for Sounddat
impl Send for Sounddat
impl Sync for Sounddat
impl Unpin for Sounddat
impl UnwindSafe for Sounddat
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,