kodi
AEAudioFormat.h
1 /*
2  * Copyright (C) 2010-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "AEChannelInfo.h"
12 #include "AEStreamInfo.h"
13 
14 #define AE_IS_PLANAR(x) ((x) >= AE_FMT_U8P && (x) <= AE_FMT_FLOATP)
15 
20 {
24  enum AEDataFormat m_dataFormat;
25 
29  unsigned int m_sampleRate;
30 
35 
39  unsigned int m_frames;
40 
44  unsigned int m_frameSize;
45 
50 
52  {
53  m_dataFormat = AE_FMT_INVALID;
54  m_sampleRate = 0;
55  m_frames = 0;
56  m_frameSize = 0;
57  }
58 
59  bool operator==(const AEAudioFormat& fmt) const
60  {
61  return m_dataFormat == fmt.m_dataFormat &&
62  m_sampleRate == fmt.m_sampleRate &&
63  m_channelLayout == fmt.m_channelLayout &&
64  m_frames == fmt.m_frames &&
65  m_frameSize == fmt.m_frameSize &&
66  m_streamInfo == fmt.m_streamInfo;
67  }
68 };
69 
Definition: AEStreamInfo.h:22
CAEStreamInfo m_streamInfo
Stream info of raw passthrough.
Definition: AEAudioFormat.h:49
unsigned int m_frameSize
The size of one frame in bytes.
Definition: AEAudioFormat.h:44
unsigned int m_frames
The number of frames per period.
Definition: AEAudioFormat.h:39
The audio format structure that fully defines a stream&#39;s audio information.
Definition: AEAudioFormat.h:19
Definition: AEChannelInfo.h:19
CAEChannelInfo m_channelLayout
The stream&#39;s channel layout.
Definition: AEAudioFormat.h:34
enum AEDataFormat m_dataFormat
The stream&#39;s data format (eg, AE_FMT_S16LE)
Definition: AEAudioFormat.h:24
unsigned int m_sampleRate
The stream&#39;s sample rate (eg, 48000)
Definition: AEAudioFormat.h:29