Zao SDK for Jetson / libzao-endpoint API リファレンス 1.5.0.0 (2024-09-25)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
zao::endpoint::audio::PcmFormat Class Reference

PCM音声のフォーマット More...

#include <PcmFormat.hpp>

Public Types

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

Public Member Functions

 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音声のフォーマット

Constructor & Destructor Documentation

◆ PcmFormat() [1/2]

zao::endpoint::audio::PcmFormat::PcmFormat ( )
inlinenoexcept

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

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

◆ PcmFormat() [2/2]

zao::endpoint::audio::PcmFormat::PcmFormat ( int  sampling_rate,
unsigned  channel_mask 
)
inlinenoexcept

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

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

Member Function Documentation

◆ GetChannelMask()

unsigned zao::endpoint::audio::PcmFormat::GetChannelMask ( ) const
inlinenoexcept

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

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

◆ GetNumOfChannels()

int zao::endpoint::audio::PcmFormat::GetNumOfChannels ( ) const
inlinenoexcept

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

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

◆ operator!=()

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

PcmFormat同士を非等値比較する

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

◆ operator==()

bool zao::endpoint::audio::PcmFormat::operator== ( const PcmFormat other) const
inlinenoexcept

PcmFormat同士を等値比較する

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

◆ SetChannelMask()

void zao::endpoint::audio::PcmFormat::SetChannelMask ( unsigned  new_value)
inlinenoexcept

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

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

◆ SetSamplingRate()

void zao::endpoint::audio::PcmFormat::SetSamplingRate ( int  new_value)
inlinenoexcept

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

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

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