Support conversion to XA audio

This commit is contained in:
2024-05-21 21:27:42 +02:00
parent 98b0868d76
commit d334f19d4d
6 changed files with 78 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "tool_helper"
version = "0.9.5"
version = "0.9.6"
edition = "2021"
[profile.release]

View File

@@ -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>;

View 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"))
}
}