Expand description
Audio file passthrough handler.
This module provides the Audio type for handling audio files in Total War PackFiles.
It acts as a passthrough, storing raw audio data without decoding or encoding the actual
audio formats.
§Supported Extensions
The following audio file extensions are recognized:
.mp3- MPEG Audio Layer III.wem- Wwise Encoded Media (proprietary audio format).wav- Waveform Audio File Format
§Limitations
This module does not decode or encode audio data. It only provides raw byte access, allowing external audio libraries or tools to process the data. The files are stored and written back in their original binary format.
§Use Cases
- Extracting audio files from PackFiles for editing in external tools
- Re-packing modified audio files
- Analyzing audio file metadata
- Custom audio processing with specialized libraries
§Example
use rpfm_lib::files::{Decodeable, audio::Audio};
use std::io::Cursor;
// Read raw audio data
let audio_bytes = vec![/* MP3 or WEM data */];
let mut reader = Cursor::new(audio_bytes);
let audio = Audio::decode(&mut reader, &None).unwrap();
// Access raw data for external processing
let raw_data = audio.data();Structs§
- Audio
- Container for raw audio file data.
Constants§
- EXTENSIONS
- Extension used by audio files.