MPD  0.20.15
Data Structures | Functions
PcmUtils.hxx File Reference
#include "Compiler.h"
#include <limits>
#include <stdint.h>
Include dependency graph for PcmUtils.hxx:

Go to the source code of this file.

Data Structures

struct  SampleTraits< F >
 This template describes the specified SampleFormat. More...
 

Functions

template<SampleFormat F, class Traits = SampleTraits<F>>
static gcc_const Traits::value_type PcmClamp (typename Traits::long_type x) noexcept
 Check if the value is within the range of the provided bit size, and caps it if necessary. More...
 

Function Documentation

◆ PcmClamp()

template<SampleFormat F, class Traits = SampleTraits<F>>
static gcc_const Traits::value_type PcmClamp ( typename Traits::long_type  x)
inlinestaticnoexcept

Check if the value is within the range of the provided bit size, and caps it if necessary.

Definition at line 39 of file PcmUtils.hxx.