kodi
xbmc
cores
AudioEngine
Utils
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
19
struct
AEAudioFormat
20
{
24
enum
AEDataFormat
m_dataFormat
;
25
29
unsigned
int
m_sampleRate
;
30
34
CAEChannelInfo
m_channelLayout
;
35
39
unsigned
int
m_frames
;
40
44
unsigned
int
m_frameSize
;
45
49
CAEStreamInfo
m_streamInfo
;
50
51
AEAudioFormat
()
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
CAEStreamInfo
Definition:
AEStreamInfo.h:22
AEAudioFormat::m_streamInfo
CAEStreamInfo m_streamInfo
Stream info of raw passthrough.
Definition:
AEAudioFormat.h:49
AEAudioFormat::m_frameSize
unsigned int m_frameSize
The size of one frame in bytes.
Definition:
AEAudioFormat.h:44
AEAudioFormat::m_frames
unsigned int m_frames
The number of frames per period.
Definition:
AEAudioFormat.h:39
AEAudioFormat
The audio format structure that fully defines a stream's audio information.
Definition:
AEAudioFormat.h:19
CAEChannelInfo
Definition:
AEChannelInfo.h:19
AEAudioFormat::m_channelLayout
CAEChannelInfo m_channelLayout
The stream's channel layout.
Definition:
AEAudioFormat.h:34
AEAudioFormat::m_dataFormat
enum AEDataFormat m_dataFormat
The stream's data format (eg, AE_FMT_S16LE)
Definition:
AEAudioFormat.h:24
fmt
AEAudioFormat::m_sampleRate
unsigned int m_sampleRate
The stream's sample rate (eg, 48000)
Definition:
AEAudioFormat.h:29
Generated by
1.8.13