RAVENNAKIT
Loading...
Searching...
No Matches
rav::int24_t Class Reference

A custom type to represent a 3-byte audio sample. More...

#include <int24.hpp>

Public Member Functions

 int24_t ()=default
 ~int24_t ()=default
 int24_t (const float value)
 Construct an int24_t from a float value.
 int24_t (const double value)
 Construct an int24_t from a double value.
 int24_t (int32_t value)
 Construct an int24_t from an int32_t value.
 int24_t (const int24_t &other)=default
 int24_t (int24_t &&other) noexcept=default
int24_t & operator= (const int24_t &other)=default
int24_t & operator= (int24_t &&other) noexcept=default
bool operator== (const int32_t other) const
 operator int32_t () const

Detailed Description

A custom type to represent a 3-byte audio sample.

The size of this class is always 3 bytes to make it suitable to memcpy to/from audio buffers.

Definition at line 38 of file int24.hpp.

Constructor & Destructor Documentation

◆ int24_t() [1/6]

rav::int24_t::int24_t ( )
default

◆ ~int24_t()

rav::int24_t::~int24_t ( )
default

◆ int24_t() [2/6]

rav::int24_t::int24_t ( const float value)
inlineexplicit

Construct an int24_t from a float value.

Parameters
valueThe value to store in the int24_t.

Definition at line 47 of file int24.hpp.

◆ int24_t() [3/6]

rav::int24_t::int24_t ( const double value)
inlineexplicit

Construct an int24_t from a double value.

Parameters
valueThe value to store in the int24_t.

Definition at line 53 of file int24.hpp.

◆ int24_t() [4/6]

rav::int24_t::int24_t ( int32_t value)
inline

Construct an int24_t from an int32_t value.

The value is truncated to 24 bits.

Parameters
valueThe value to store in the int24_t.

Definition at line 60 of file int24.hpp.

◆ int24_t() [5/6]

rav::int24_t::int24_t ( const int24_t & other)
default

◆ int24_t() [6/6]

rav::int24_t::int24_t ( int24_t && other)
defaultnoexcept

Member Function Documentation

◆ operator int32_t()

rav::int24_t::operator int32_t ( ) const
inlineexplicit
Returns
The value stored in the int24_t as an int32_t.

Definition at line 77 of file int24.hpp.

◆ operator=() [1/2]

int24_t & rav::int24_t::operator= ( const int24_t & other)
default

◆ operator=() [2/2]

int24_t & rav::int24_t::operator= ( int24_t && other)
defaultnoexcept

◆ operator==()

bool rav::int24_t::operator== ( const int32_t other) const
inline

Definition at line 70 of file int24.hpp.


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