MPD: FloatToIntegerSampleConvert< F, Traits > Struct Template Reference

MPD 0.20.18

Public Types | Static Public Member Functions | Static Public Attributes
FloatToIntegerSampleConvert< F, Traits > Struct Template Reference

Convert from float to an integer sample format. More...

`#include <FloatConvert.hxx>`

## Public Types
typedef SampleTraits< SampleFormat::FLOAT > | SrcTraits
typedef Traits | DstTraits
typedef SrcTraits::value_type | SV
typedef SrcTraits::long_type | SL
typedef DstTraits::value_type | DV

## Static Public Member Functions
static gcc_const DV | Convert (SV src) noexcept

## Static Public Attributes
static constexpr SV | factor = 1 << (DstTraits::BITS - 1)

## Detailed Description

### template<SampleFormat F, class Traits = SampleTraits<F>>
struct FloatToIntegerSampleConvert< F, Traits >

Convert from float to an integer sample format.

Definition at line 29 of file FloatConvert.hxx.

## Member Typedef Documentation

## ◆ DstTraits

template<SampleFormat F, class Traits = SampleTraits<F>>

typedef Traits FloatToIntegerSampleConvert< F, Traits >::DstTraits

Definition at line 31 of file FloatConvert.hxx.

## ◆ DV

template<SampleFormat F, class Traits = SampleTraits<F>>

typedef DstTraits::value_type FloatToIntegerSampleConvert< F, Traits >::DV

Definition at line 35 of file FloatConvert.hxx.

## ◆ SL

template<SampleFormat F, class Traits = SampleTraits<F>>

typedef SrcTraits::long_type FloatToIntegerSampleConvert< F, Traits >::SL

Definition at line 34 of file FloatConvert.hxx.

## ◆ SrcTraits

template<SampleFormat F, class Traits = SampleTraits<F>>

typedef SampleTraits<SampleFormat::FLOAT> FloatToIntegerSampleConvert< F, Traits >::SrcTraits

Definition at line 30 of file FloatConvert.hxx.

## ◆ SV

template<SampleFormat F, class Traits = SampleTraits<F>>

typedef SrcTraits::value_type FloatToIntegerSampleConvert< F, Traits >::SV

Definition at line 33 of file FloatConvert.hxx.

## Member Function Documentation

## ◆ Convert()

template<SampleFormat F, class Traits = SampleTraits<F>>

static gcc_const DV FloatToIntegerSampleConvert< F, Traits >::Convert | ( | SV | src | ) |
| inlinestaticnoexcept

Definition at line 40 of file FloatConvert.hxx.

## Field Documentation

## ◆ factor

template<SampleFormat F, class Traits = SampleTraits<F>>

constexpr SV FloatToIntegerSampleConvert< F, Traits >::factor = 1 << (DstTraits::BITS - 1)
| static

Definition at line 37 of file FloatConvert.hxx.

The documentation for this struct was generated from the following file:

- pcm/FloatConvert.hxx