- NASoniton { bits: bits, be: is_be, packed: is_pk, planar: is_pl, float: is_fl, signed: is_sg }
- }
-
- pub fn get_bits(&self) -> u8 { self.bits }
- pub fn is_be(&self) -> bool { self.be }
- pub fn is_packed(&self) -> bool { self.packed }
- pub fn is_planar(&self) -> bool { self.planar }
- pub fn is_float(&self) -> bool { self.float }
- pub fn is_signed(&self) -> bool { self.signed }
-
- pub fn get_audio_size(&self, length: u64) -> usize {
+ NASoniton { bits, be: is_be, packed: is_pk, planar: is_pl, float: is_fl, signed: is_sg }
+ }
+
+ /// Returns the number of bits per sample.
+ pub fn get_bits(self) -> u8 { self.bits }
+ /// Reports whether the format is big-endian.
+ pub fn is_be(self) -> bool { self.be }
+ /// Reports whether the format has packed samples.
+ pub fn is_packed(self) -> bool { self.packed }
+ /// Reports whether audio data is planar instead of interleaved.
+ pub fn is_planar(self) -> bool { self.planar }
+ /// Reports whether audio samples are in floating point format.
+ pub fn is_float(self) -> bool { self.float }
+ /// Reports whether audio samples are signed.
+ pub fn is_signed(self) -> bool { self.signed }
+
+ /// Returns the amount of bytes needed to store the audio of requested length (in samples).
+ pub fn get_audio_size(self, length: u64) -> usize {