Struct simplemad::MadFixed32 [] [src]

pub struct MadFixed32 {
    // some fields omitted
}

libmad's native fixed-point sample format

A 32-bit value comprised of a sign bit, three whole number bits and 28 fractional bits.

Methods

impl MadFixed32

fn new(v: i32) -> MadFixed32

Construct a new MadFixed32 from a value in libmad's fixed-point format

fn to_raw(&self) -> i32

Get the raw fixed-point representation

fn to_i16(&self) -> i16

Convert to i16

fn to_i32(&self) -> i32

Convert to i32

fn to_f32(&self) -> f32

Convert to f32

fn to_f64(&self) -> f64

Convert to f64

Trait Implementations

impl From<i16> for MadFixed32

fn from(v: i16) -> MadFixed32

impl From<i32> for MadFixed32

fn from(v: i32) -> MadFixed32

impl From<f32> for MadFixed32

fn from(v: f32) -> MadFixed32

impl From<f64> for MadFixed32

fn from(v: f64) -> MadFixed32

Derived Implementations

impl Debug for MadFixed32

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Default for MadFixed32

fn default() -> MadFixed32

impl Copy for MadFixed32

impl Clone for MadFixed32

fn clone(&self) -> MadFixed32

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