Support conversion to XA audio
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tool_helper"
|
||||
version = "0.9.5"
|
||||
version = "0.9.6"
|
||||
edition = "2021"
|
||||
|
||||
[profile.release]
|
||||
|
||||
@@ -5,6 +5,7 @@ use std::{boxed::Box, io::{BufRead, BufReader, BufWriter, Read, Write}, path::Pa
|
||||
pub mod bits;
|
||||
pub mod compress;
|
||||
pub mod raw;
|
||||
pub mod vec_helper;
|
||||
|
||||
pub type BufferedInputFile = BufReader<std::fs::File>;
|
||||
pub type Output = Box<dyn Write>;
|
||||
|
||||
9
src/Tools/tool_helper/src/vec_helper.rs
Normal file
9
src/Tools/tool_helper/src/vec_helper.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use super::Error;
|
||||
use std::str;
|
||||
|
||||
pub fn to_string(output: Vec<u8>) -> Result<String, Error> {
|
||||
match str::from_utf8(&output) {
|
||||
Ok(str) => Ok(str.to_owned()),
|
||||
Err(_) => Err(Error::from_str("Invalid UTF8 sequence"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user