10#ifndef ZEP_AUDIO_PCM_FORMAT_HPP_
11#define ZEP_AUDIO_PCM_FORMAT_HPP_
36 PcmFormat(
int sampling_rate,
unsigned channel_mask)
noexcept {
57 kLeftChannel = (1u << 0), kRightChannel = (1u << 0)
58 kRightChannel = (1u << 1), kStereo = kLeftChannel | kRightChannel
59 kStereo = kLeftChannel | kRightChannel,
75 channel_mask_ = new_value;
83 auto mask = channel_mask_;
84 int num_of_channels = 0;
91 return num_of_channels; }
101 bool operator==(
const PcmFormat& other)
const noexcept {
102 return sampling_rate_ == other.sampling_rate_ &&
103 channel_mask_ == other.channel_mask_;
113 bool operator!=(
const PcmFormat& other)
const noexcept {
114 return ! (*
this == other);
121 int sampling_rate_ = 0;
126 unsigned channel_mask_ = 0u; }
enum zep::audio::ChannelBits GetSamplingRate
Get sampling rate (in Hz).
Definition PcmFormat.hpp:44
int GetNumOfChannels() const noexcept
Get the number of channels.
Definition PcmFormat.hpp:82
unsigned GetChannelMask() const noexcept
Get the channel mask.
Definition PcmFormat.hpp:67
ChannelBits
Channel mask value definition.
Definition PcmFormat.hpp:56
void SetChannelMask(unsigned new_value) noexcept
Set the channel mask.
Definition PcmFormat.hpp:74
void SetSamplingRate(int new_value) noexcept
Set sampling rate (in Hz).
Definition PcmFormat.hpp:51
Namespace for ZEP SDK.
Definition FactoryInterface.hpp:19