pub enum AiffCompressionType {
Show 14 variants None, ACE2, ACE8, MAC3, MAC6, sowt, fl32, fl64, alaw, ulaw, ULAW, ALAW, FL32, Other { compression_type: [u8; 4], compression_name: String, },
}
Expand description

The AIFC compression type

This contains a non-exhaustive list of compression types

Variants§

§

None

PCM

§

ACE2

2-to-1 IIGS ACE (Audio Compression / Expansion)

§

ACE8

8-to-3 IIGS ACE (Audio Compression / Expansion)

§

MAC3

3-to-1 Macintosh Audio Compression / Expansion

§

MAC6

6-to-1 Macintosh Audio Compression / Expansion

§

sowt

PCM (byte swapped)

§

fl32

IEEE 32-bit float

§

fl64

IEEE 64-bit float

§

alaw

8-bit ITU-T G.711 A-law

§

ulaw

8-bit ITU-T G.711 µ-law

§

ULAW

8-bit ITU-T G.711 µ-law (64 kb/s)

§

ALAW

8-bit ITU-T G.711 A-law (64 kb/s)

§

FL32

IEEE 32-bit float (From SoundHack & Csound)

§

Other

Fields

§compression_type: [u8; 4]

Identifier from the compression algorithm

§compression_name: String

Human-readable description of the compression algorithm

Catch-all for unknown compression algorithms

Implementations§

source§

impl AiffCompressionType

source

pub fn compression_name(&self) -> Cow<'_, str>

Get the compression name for a compression type

For variants other than AiffCompressionType::Other, this will use statically known names.

Examples
use lofty::iff::aiff::AiffCompressionType;

let compression_type = AiffCompressionType::alaw;
assert_eq!(compression_type.compression_name(), "ALaw 2:1");

Trait Implementations§

source§

impl Clone for AiffCompressionType

source§

fn clone(&self) -> AiffCompressionType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AiffCompressionType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AiffCompressionType

source§

fn default() -> AiffCompressionType

Returns the “default value” for a type. Read more
source§

impl PartialEq<AiffCompressionType> for AiffCompressionType

source§

fn eq(&self, other: &AiffCompressionType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for AiffCompressionType

source§

impl StructuralEq for AiffCompressionType

source§

impl StructuralPartialEq for AiffCompressionType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.