Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
zep::audio::PcmFormat Class Reference

PCM audio format. More...

#include <PcmFormat.hpp>

Public Types

enum  ChannelBits : unsigned { kLeftChannel = (1u << 0) , kRightChannel = (1u << 1) , kStereo = kLeftChannel | kRightChannel }
 チャンネルマスクの値定義
 

Public Member Functions

 PcmFormat () noexcept
 Construct a PcmFormat object by default.
 
 PcmFormat (int sampling_rate, unsigned channel_mask) noexcept
 Construct a PcmFormat object with initial values.
 
 PcmFormat () noexcept
 PcmFormatオブジェクトをデフォルト構築する。
 
 PcmFormat (int sampling_rate, unsigned channel_mask) noexcept
 PcmFormatオブジェクトを初期値付きで構築する。
 
int GetSamplingRate () const noexcept
 サンプリングレート(Hz単位)を取得する。
 
void SetSamplingRate (int new_value) noexcept
 サンプリングレート(Hz単位)を設定する。
 
unsigned GetChannelMask () const noexcept
 チャンネルマスクを取得する。
 
void SetChannelMask (unsigned new_value) noexcept
 チャンネルマスクを設定する。
 
int GetNumOfChannels () const noexcept
 チャンネル数を取得する。
 
bool operator== (const PcmFormat &other) const noexcept
 PcmFormat同士を等値比較する
 
bool operator!= (const PcmFormat &other) const noexcept
 PcmFormat同士を非等値比較する
 

Detailed Description

PCM audio format.

PCM音声のフォーマット

Constructor & Destructor Documentation

◆ PcmFormat() [1/4]

zep::audio::PcmFormat::PcmFormat ( )
inlinenoexcept

Construct a PcmFormat object by default.

Note
Each field is initialized with an invalid value.

◆ PcmFormat() [2/4]

zep::audio::PcmFormat::PcmFormat ( int  sampling_rate,
unsigned  channel_mask 
)
inlinenoexcept

Construct a PcmFormat object with initial values.

Parameters
sampling_rateInitial value of sampling rate [Hz].
channel_maskInitial value of channel mask

◆ PcmFormat() [3/4]

zep::audio::PcmFormat::PcmFormat ( )
inlinenoexcept

PcmFormatオブジェクトをデフォルト構築する。

Note
各フィールドは無効な値で初期化される。

◆ PcmFormat() [4/4]

zep::audio::PcmFormat::PcmFormat ( int  sampling_rate,
unsigned  channel_mask 
)
inlinenoexcept

PcmFormatオブジェクトを初期値付きで構築する。

Parameters
sampling_rateサンプリングレートの初期値[Hz]
channel_maskチャンネルマスクの初期値

Member Function Documentation

◆ GetChannelMask()

unsigned zep::audio::PcmFormat::GetChannelMask ( ) const
inlinenoexcept

チャンネルマスクを取得する。

Attention
チャネル数とは異なる。
See also
GetNumOfChannels()

◆ GetNumOfChannels()

int zep::audio::PcmFormat::GetNumOfChannels ( ) const
inlinenoexcept

チャンネル数を取得する。

Note
チャンネルマスクの1のビットの数に等しい。

◆ operator!=()

bool zep::audio::PcmFormat::operator!= ( const PcmFormat other) const
inlinenoexcept

PcmFormat同士を非等値比較する

Parameters
other比較対象
Return values
true一致しない
false一致する

◆ operator==()

bool zep::audio::PcmFormat::operator== ( const PcmFormat other) const
inlinenoexcept

PcmFormat同士を等値比較する

Parameters
other比較対象
Return values
true一致する
false一致しない

◆ SetChannelMask()

void zep::audio::PcmFormat::SetChannelMask ( unsigned  new_value)
inlinenoexcept

チャンネルマスクを設定する。

Parameters
new_valueチャンネルマスク(bit0=Left, bit1=Right)

◆ SetSamplingRate()

void zep::audio::PcmFormat::SetSamplingRate ( int  new_value)
inlinenoexcept

サンプリングレート(Hz単位)を設定する。

Parameters
new_valueサンプリングレート [Hz]

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