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
[src]

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 Debug for MadFixed32
[src]

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

Formats the value using the given formatter.

impl Default for MadFixed32
[src]

fn default() -> MadFixed32

Returns the "default value" for a type. Read more

impl Copy for MadFixed32
[src]

impl Clone for MadFixed32
[src]

fn clone(&self) -> MadFixed32

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl From<i16> for MadFixed32
[src]

fn from(v: i16) -> MadFixed32

Performs the conversion.

impl From<i32> for MadFixed32
[src]

fn from(v: i32) -> MadFixed32

Performs the conversion.

impl From<f32> for MadFixed32
[src]

fn from(v: f32) -> MadFixed32

Performs the conversion.

impl From<f64> for MadFixed32
[src]

fn from(v: f64) -> MadFixed32

Performs the conversion.