pub struct OwpFile {
pub xor_key: u8,
/* private fields */
}Expand description
OWP: XOR-obfuscated Ogg file. The original engine uses key 0x39.
Fields§
§xor_key: u8Implementations§
Source§impl OwpFile
impl OwpFile
pub const DEFAULT_XOR_KEY: u8 = 0x39
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open_stream(&self) -> Result<BoundedFile>
pub fn decrypt_to_vec(&self) -> Result<Vec<u8>>
Sourcepub fn decode_vorbis_pcm16(&self) -> Result<Pcm16>
pub fn decode_vorbis_pcm16(&self) -> Result<Pcm16>
Decode the XORed Ogg/Vorbis file into interleaved PCM16.
Sourcepub fn decode_vorbis_wav(&self) -> Result<Vec<u8>>
pub fn decode_vorbis_wav(&self) -> Result<Vec<u8>>
Decode the XORed Ogg/Vorbis file and return a WAV (PCM16) buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OwpFile
impl RefUnwindSafe for OwpFile
impl Send for OwpFile
impl Sync for OwpFile
impl Unpin for OwpFile
impl UnsafeUnpin for OwpFile
impl UnwindSafe for OwpFile
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