MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Types | Static Public Attributes
SampleTraits< SampleFormat::S8 > Struct Template Reference

`#include <Traits.hxx>`

## Public Types
typedef int8_t | value_type
| The type used for one sample value. More...
typedef value_type * | pointer_type
| A writable pointer. More...
typedef const value_type * | const_pointer_type
| A read-only pointer. More...
typedef int | sum_type
| A "long" type that is large and accurate enough for adding two values without risking an (integer) overflow or (floating point) precision loss. More...
typedef int_least32_t | long_type
| A "long" type that is large and accurate enough for arithmetic without risking an (integer) overflow or (floating point) precision loss. More...

## Static Public Attributes
static constexpr size_t | SAMPLE_SIZE = sizeof(value_type)
| The size of one sample in bytes. More...
static constexpr unsigned | BITS = sizeof(value_type) * 8
| The integer bit depth of one sample. More...
static constexpr value_type | MIN = -(sum_type(1) << (BITS - 1))
| The minimum sample value. More...
static constexpr value_type | MAX = (sum_type(1) << (BITS - 1)) - 1
| The maximum sample value. More...
static constexpr value_type | SILENCE = 0
| A value which represents "silence". More...

## Detailed Description

### template<>
struct SampleTraits< SampleFormat::S8 >

Definition at line 38 of file Traits.hxx.

## Member Typedef Documentation

typedef const value_type* SampleTraits< SampleFormat::S8 >::const_pointer_type

A read-only pointer.

Definition at line 52 of file Traits.hxx.

typedef int_least32_t SampleTraits< SampleFormat::S8 >::long_type

A "long" type that is large and accurate enough for arithmetic without risking an (integer) overflow or (floating point) precision loss.

Definition at line 66 of file Traits.hxx.

typedef value_type* SampleTraits< SampleFormat::S8 >::pointer_type

A writable pointer.

Definition at line 47 of file Traits.hxx.

typedef int SampleTraits< SampleFormat::S8 >::sum_type

A "long" type that is large and accurate enough for adding two values without risking an (integer) overflow or (floating point) precision loss.

Definition at line 59 of file Traits.hxx.

typedef int8_t SampleTraits< SampleFormat::S8 >::value_type

The type used for one sample value.

Definition at line 42 of file Traits.hxx.

## Field Documentation

constexpr unsigned SampleTraits< SampleFormat::S8 >::BITS = sizeof(value_type) * 8
| static

The integer bit depth of one sample.

This attribute may not exist if this is not an integer sample format.

Definition at line 77 of file Traits.hxx.

constexpr value_type SampleTraits< SampleFormat::S8 >::MAX = (sum_type(1) << (BITS - 1)) - 1
| static

The maximum sample value.

Definition at line 87 of file Traits.hxx.

constexpr value_type SampleTraits< SampleFormat::S8 >::MIN = -(sum_type(1) << (BITS - 1))
| static

The minimum sample value.

Definition at line 82 of file Traits.hxx.

constexpr size_t SampleTraits< SampleFormat::S8 >::SAMPLE_SIZE = sizeof(value_type)
| static

The size of one sample in bytes.

Definition at line 71 of file Traits.hxx.

constexpr value_type SampleTraits< SampleFormat::S8 >::SILENCE = 0
| static

A value which represents "silence".

Definition at line 92 of file Traits.hxx.

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

- pcm/Traits.hxx