maraiah: fix invisible dependencies in macros
parent
92aea23e04
commit
91d171c8a6
|
@ -6,98 +6,133 @@ use std::{convert::{TryFrom, TryInto}, fmt, num::NonZeroU16};
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! rd_impl {
|
macro_rules! rd_impl {
|
||||||
// worker - creates let statement
|
// worker, creates let statement for 16 bit numbers
|
||||||
(W $b:expr, $pth:path, $nam:ident, $n:expr) => {
|
(W $b:expr, $pth:path, $nam:ident, $n:expr) => {
|
||||||
let $nam = $pth([$b[$n], $b[$n + 1]]);
|
let $nam = $pth([$b[$n], $b[$n + 1]]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// worker, creates let statement for 32 bit numbers
|
||||||
(D $b:expr, $pth:path, $nam:ident, $n:expr) => {
|
(D $b:expr, $pth:path, $nam:ident, $n:expr) => {
|
||||||
let $nam = $pth([$b[$n], $b[$n + 1], $b[$n + 2], $b[$n + 3]]);
|
let $nam = $pth([$b[$n], $b[$n + 1], $b[$n + 2], $b[$n + 3]]);
|
||||||
};
|
};
|
||||||
|
|
||||||
// big endian
|
// big endian, u16
|
||||||
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, u16) => {
|
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, u16) => {
|
||||||
$crate::rd_impl!(W $b, u16::from_be_bytes, $nam, $n + $at);
|
$crate::rd_impl!(W $b, u16::from_be_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// big endian, i16
|
||||||
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, i16) => {
|
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, i16) => {
|
||||||
$crate::rd_impl!(W $b, i16::from_be_bytes, $nam, $n + $at);
|
$crate::rd_impl!(W $b, i16::from_be_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// big endian, u32
|
||||||
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, u32) => {
|
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, u32) => {
|
||||||
$crate::rd_impl!(D $b, u32::from_be_bytes, $nam, $n + $at);
|
$crate::rd_impl!(D $b, u32::from_be_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// big endian, i32
|
||||||
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, i32) => {
|
(BIG, $b:expr, $at:expr, $n:expr; $nam:ident, i32) => {
|
||||||
$crate::rd_impl!(D $b, i32::from_be_bytes, $nam, $n + $at);
|
$crate::rd_impl!(D $b, i32::from_be_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
// little endian
|
// little endian, u16
|
||||||
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, u16) => {
|
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, u16) => {
|
||||||
$crate::rd_impl!(W $b, u16::from_le_bytes, $nam, $n + $at);
|
$crate::rd_impl!(W $b, u16::from_le_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// little endian, i16
|
||||||
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, i16) => {
|
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, i16) => {
|
||||||
$crate::rd_impl!(W $b, i16::from_le_bytes, $nam, $n + $at);
|
$crate::rd_impl!(W $b, i16::from_le_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// little endian, u32
|
||||||
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, u32) => {
|
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, u32) => {
|
||||||
$crate::rd_impl!(D $b, u32::from_le_bytes, $nam, $n + $at);
|
$crate::rd_impl!(D $b, u32::from_le_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// little endian, i32
|
||||||
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, i32) => {
|
(LITTLE, $b:expr, $at:expr, $n:expr; $nam:ident, i32) => {
|
||||||
$crate::rd_impl!(D $b, i32::from_le_bytes, $nam, $n + $at);
|
$crate::rd_impl!(D $b, i32::from_le_bytes, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
// either endianness
|
// either endianness, Angle
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Angle) => {
|
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Angle) => {
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
||||||
let $nam = Angle::from_bits($nam);
|
let $nam = $crate::fixed::Angle::from_bits($nam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// either endianness, Fixed
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Fixed) => {
|
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Fixed) => {
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, u32);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, u32);
|
||||||
let $nam = Fixed::from_bits($nam);
|
let $nam = $crate::fixed::Fixed::from_bits($nam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// either endianness, Unit
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Unit) => {
|
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Unit) => {
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
||||||
let $nam = Unit::from_bits($nam);
|
let $nam = $crate::fixed::Unit::from_bits($nam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// either endianness, OptU16
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, OptU16) => {
|
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, OptU16) => {
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
||||||
let $nam = OptU16::from($nam);
|
let $nam = $crate::bin::OptU16::from($nam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// either endianness, u16 -> usize
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, usize, u16) => {
|
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, usize, u16) => {
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, u16);
|
||||||
let $nam = usize::from($nam);
|
let $nam = usize::from($nam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// either endianness, u32 -> usize
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, usize, u32) => {
|
($e:ident, $b:expr, $at:expr, $n:expr; $nam:ident, usize, u32) => {
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, u32);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, u32);
|
||||||
let $nam = usize_from_u32($nam);
|
let $nam = $crate::bin::usize_from_u32($nam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// either endianness, enum type with TryFrom
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr;
|
($e:ident, $b:expr, $at:expr, $n:expr;
|
||||||
$nam:ident, enum, $et:ident$(::$etc:ident)*, $t:ident
|
$nam:ident, enum, $et:ident$(::$etc:ident)*, $t:ident) => {
|
||||||
) => {
|
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, $t);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, $t);
|
||||||
let $nam = $et$(::$etc)*::try_from($nam)?;
|
let $nam: $et$(::$etc)* = std::convert::TryFrom::try_from($nam)?;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// either endianness, bitflag type
|
||||||
($e:ident, $b:expr, $at:expr, $n:expr;
|
($e:ident, $b:expr, $at:expr, $n:expr;
|
||||||
$nam:ident, flag, $ft:ident$(::$ftc:ident)*, $t:ident
|
$nam:ident, flag, $ft:ident$(::$ftc:ident)*, $t:ident) => {
|
||||||
) => {
|
|
||||||
$crate::rd_impl!($e, $b, $at, $n; $nam, $t);
|
$crate::rd_impl!($e, $b, $at, $n; $nam, $t);
|
||||||
let $nam = flag_ok!($ft$(::$ftc)*, $nam)?;
|
let $nam = flag_ok!($ft$(::$ftc)*, $nam)?;
|
||||||
};
|
};
|
||||||
|
|
||||||
// no endianness
|
// no endianness, u8
|
||||||
($_:ident, $b:expr, $at:expr, $n:expr; $nam:ident, u8) => {
|
($_:ident, $b:expr, $at:expr, $n:expr; $nam:ident, u8) => {
|
||||||
let $nam = $b[$n + $at];
|
let $nam = $b[$n + $at];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// no endianness, i8
|
||||||
($_:ident, $b:expr, $at:expr, $n:expr; $nam:ident, i8) => {
|
($_:ident, $b:expr, $at:expr, $n:expr; $nam:ident, i8) => {
|
||||||
let $nam = $b[$n + $at] as i8;
|
let $nam = $b[$n + $at] as i8;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// no endianness, [u8]
|
||||||
($_:ident, $b:expr, $at:expr, $n:expr; $rn:expr; $nam:ident, u8) => {
|
($_:ident, $b:expr, $at:expr, $n:expr; $rn:expr; $nam:ident, u8) => {
|
||||||
let $nam = &$b[$n + $at..$n + $at + $rn];
|
let $nam = &$b[$n + $at..$n + $at + $rn];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// no endianness, Ident
|
||||||
($_:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Ident) => {
|
($_:ident, $b:expr, $at:expr, $n:expr; $nam:ident, Ident) => {
|
||||||
$crate::rd_impl!(D $b, Ident, $nam, $n + $at);
|
$crate::rd_impl!(D $b, Ident, $nam, $n + $at);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// no endianness, fn([u8]) -> T
|
||||||
($_:ident, $b:expr, $at:expr, $n:expr; $rn:expr;
|
($_:ident, $b:expr, $at:expr, $n:expr; $rn:expr;
|
||||||
$nam:ident, no_try, $f:expr
|
$nam:ident, no_try, $f:expr) => {
|
||||||
) => {
|
|
||||||
let $nam = $f(&$b[$n + $at..$n + $at + $rn]);
|
let $nam = $f(&$b[$n + $at..$n + $at + $rn]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// no endianness, fn([u8]) -> Result<T>
|
||||||
($_:ident, $b:expr, $at:expr, $n:expr; $rn:expr; $nam:ident, $f:expr) => {
|
($_:ident, $b:expr, $at:expr, $n:expr; $rn:expr; $nam:ident, $f:expr) => {
|
||||||
let $nam = $f(&$b[$n + $at..$n + $at + $rn])?;
|
let $nam = $f(&$b[$n + $at..$n + $at + $rn])?;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ macro_rules! ok {
|
||||||
($v:expr, $msg:expr) => {
|
($v:expr, $msg:expr) => {
|
||||||
match $v {
|
match $v {
|
||||||
Some(v) => Ok(v),
|
Some(v) => Ok(v),
|
||||||
None => Err(err_msg($msg)),
|
None => Err($crate::err::err_msg($msg)),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,14 @@ macro_rules! flag_ok {
|
||||||
($t:ident$(::$tc:ident)*, $v:expr) => {
|
($t:ident$(::$tc:ident)*, $v:expr) => {
|
||||||
match $t$(::$tc)*::from_bits($v) {
|
match $t$(::$tc)*::from_bits($v) {
|
||||||
Some(v) => Ok(v),
|
Some(v) => Ok(v),
|
||||||
None => Err(err_msg(concat!("bad ", stringify!($t)))),
|
None => Err($crate::err::err_msg(concat!("bad ", stringify!($t)))),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! bail {
|
macro_rules! bail {
|
||||||
($e:expr) => {
|
($e:expr) => {
|
||||||
return Err(err_msg($e));
|
return Err($crate::err::err_msg($e));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//! QuickDraw PICT `PixMap` headers.
|
//! QuickDraw PICT `PixMap` headers.
|
||||||
|
|
||||||
use crate::{bin::*, err::*, image::*};
|
use crate::{bin::*, err::*, image::*};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `PixMap` header.
|
/// Reads a `PixMap` header.
|
||||||
pub fn read<'a>(b: &'a [u8],
|
pub fn read<'a>(b: &'a [u8],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![allow(clippy::unit_arg)]
|
#![allow(clippy::unit_arg)]
|
||||||
|
|
||||||
use maraiah::{err::*, file::*, image::*, sound::*,
|
use maraiah::{err::*, file::*, image::*, sound::*,
|
||||||
machdr, map, ppm, shp, snd, tga, wav};
|
machdr, map, shp, snd};
|
||||||
use std::{collections::HashSet, fs, io, slice::from_ref};
|
use std::{collections::HashSet, fs, io, slice::from_ref};
|
||||||
|
|
||||||
fn open(path: &str) -> ResultS<memmap::Mmap>
|
fn open(path: &str) -> ResultS<memmap::Mmap>
|
||||||
|
|
|
@ -33,7 +33,6 @@ pub mod trmg;
|
||||||
pub mod wppx;
|
pub mod wppx;
|
||||||
|
|
||||||
use crate::{err::*, text::mac_roman_cstr};
|
use crate::{err::*, text::mac_roman_cstr};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a Map file.
|
/// Reads a Map file.
|
||||||
pub fn read(b: &[u8]) -> ResultS<Wad>
|
pub fn read(b: &[u8]) -> ResultS<Wad>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! Wad file chunk type.
|
//! Map file chunk type.
|
||||||
|
|
||||||
use crate::{bin::*, err::*, image::{self, pict}, map};
|
use crate::{bin::*, err::*, image::{self, pict}, map};
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
use crate::{err::*, fixed::Fixed};
|
use crate::{err::*, fixed::Fixed};
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `Damage` object.
|
/// Reads a `Damage` object.
|
||||||
pub fn read(b: &[u8]) -> ResultS<Damage>
|
pub fn read(b: &[u8]) -> ResultS<Damage>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! Wad file entry type.
|
//! Wad file entry type.
|
||||||
|
|
||||||
use crate::{bin::usize_from_u32, err::*};
|
use crate::err::*;
|
||||||
use super::chnk;
|
use super::chnk;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
use super::{ltfn, TICKS_PER_SECOND};
|
use super::{ltfn, TICKS_PER_SECOND};
|
||||||
use crate::{err::*, fixed::Fixed};
|
use crate::{err::*, fixed::Fixed};
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `LITE` chunk.
|
/// Reads a `LITE` chunk.
|
||||||
pub fn read(b: &[u8]) -> ResultS<(Light, usize)>
|
pub fn read(b: &[u8]) -> ResultS<(Light, usize)>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//! `LightFunc` type.
|
//! `LightFunc` type.
|
||||||
|
|
||||||
use crate::{err::*, fixed::Fixed};
|
use crate::{err::*, fixed::Fixed};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `LightFunc` object.
|
/// Reads a `LightFunc` object.
|
||||||
pub fn read(b: &[u8]) -> ResultS<LightFunc>
|
pub fn read(b: &[u8]) -> ResultS<LightFunc>
|
||||||
|
|
|
@ -6,7 +6,6 @@ use crate::{bin::OptU16,
|
||||||
fixed::{Angle, Fixed, Unit},
|
fixed::{Angle, Fixed, Unit},
|
||||||
xfer::TransferMode};
|
xfer::TransferMode};
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `medi` chunk.
|
/// Reads a `medi` chunk.
|
||||||
pub fn read(b: &[u8]) -> ResultS<(Media, usize)>
|
pub fn read(b: &[u8]) -> ResultS<(Media, usize)>
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
use super::pnts;
|
use super::pnts;
|
||||||
use crate::{bin::OptU16, err::*, fixed::Unit, xfer::TransferMode};
|
use crate::{bin::OptU16, err::*, fixed::Unit, xfer::TransferMode};
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a polygon for either M1 or M2.
|
/// Reads a polygon for either M1 or M2.
|
||||||
pub fn read_poly_inter(b: &[u8]) -> ResultS<Polygon>
|
pub fn read_poly_inter(b: &[u8]) -> ResultS<Polygon>
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
use super::stex;
|
use super::stex;
|
||||||
use crate::{bin::OptU16, err::*, fixed::Fixed, xfer::TransferMode};
|
use crate::{bin::OptU16, err::*, fixed::Fixed, xfer::TransferMode};
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `SIDS` chunk.
|
/// Reads a `SIDS` chunk.
|
||||||
pub fn read(b: &[u8]) -> ResultS<(Side, usize)>
|
pub fn read(b: &[u8]) -> ResultS<(Side, usize)>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//! `Monster` type.
|
//! `Monster` type.
|
||||||
|
|
||||||
use crate::{bin::OptU16, err::*, fixed::Unit};
|
use crate::{bin::OptU16, err::*, fixed::Unit};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `Trigger` object.
|
/// Reads a `Trigger` object.
|
||||||
pub fn read(b: &[u8]) -> ResultS<Trigger>
|
pub fn read(b: &[u8]) -> ResultS<Trigger>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
use crate::{bin::OptU16, err::*, fixed::Fixed};
|
use crate::{bin::OptU16, err::*, fixed::Fixed};
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use super::trig;
|
use super::trig;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
//! Shapes file collection type.
|
//! Shapes file collection type.
|
||||||
|
|
||||||
use crate::{bin::{rd_ofstable, usize_from_u32}, err::*};
|
use crate::{bin::rd_ofstable, err::*};
|
||||||
use super::{bmap, clut, fram, sequ};
|
use super::{bmap, clut, fram, sequ};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `Collection`.
|
/// Reads a `Collection`.
|
||||||
pub fn read(b: &[u8]) -> ResultS<Collection>
|
pub fn read(b: &[u8]) -> ResultS<Collection>
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
use crate::{bin::OptU16, err::*,
|
use crate::{bin::OptU16, err::*,
|
||||||
text::{mac_roman_conv, pascal_str},
|
text::{mac_roman_conv, pascal_str},
|
||||||
xfer::TransferMode};
|
xfer::TransferMode};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Reads a `Sequence`.
|
/// Reads a `Sequence`.
|
||||||
pub fn read(b: &[u8]) -> ResultS<Sequence>
|
pub fn read(b: &[u8]) -> ResultS<Sequence>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//! Sounds format definition type.
|
//! Sounds format definition type.
|
||||||
|
|
||||||
use crate::{bin::{u32b, usize_from_u32}, err::*, fixed::*, sound::Sound16};
|
use crate::{bin::{u32b, usize_from_u32}, err::*, fixed::*, sound::Sound16};
|
||||||
use std::convert::TryFrom;
|
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
|
|
||||||
/// Reads a sound definition.
|
/// Reads a sound definition.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! Sounds file audio type.
|
//! Sounds file audio type.
|
||||||
|
|
||||||
use crate::{bin::usize_from_u32, err::*, sound::Sound16};
|
use crate::{err::*, sound::Sound16};
|
||||||
|
|
||||||
/// Reads a sound.
|
/// Reads a sound.
|
||||||
pub fn read(b: &[u8]) -> ResultS<Sound16>
|
pub fn read(b: &[u8]) -> ResultS<Sound16>
|
||||||
|
|
Loading…
Reference in New Issue