/usr/include/kodi/kodi_audioengine_types.h is in kodi-addons-dev 2:17.1+dfsg1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | #pragma once
/*
* Copyright (C) 2005-2015 Team Kodi
* http://kodi.tv
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
/*!
* Common data structures shared between KODI and KODI's binary add-ons
*/
#ifdef BUILD_KODI_ADDON
#include "kodi/AudioEngine/AEChannelInfo.h"
#else
#include "cores/AudioEngine/Utils/AEChannelInfo.h"
#endif
#ifdef TARGET_WINDOWS
#include <windows.h>
#else
#ifndef __cdecl
#define __cdecl
#endif
#ifndef __declspec
#define __declspec(X)
#endif
#endif
#include <cstddef>
#undef ATTRIBUTE_PACKED
#undef PRAGMA_PACK_BEGIN
#undef PRAGMA_PACK_END
#if defined(__GNUC__)
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
#define ATTRIBUTE_PACKED __attribute__ ((packed))
#define PRAGMA_PACK 0
#endif
#endif
#if !defined(ATTRIBUTE_PACKED)
#define ATTRIBUTE_PACKED
#define PRAGMA_PACK 1
#endif
/* current Audio DSP API version */
#define KODI_AUDIOENGINE_API_VERSION "0.0.1"
/* min. Audio DSP API version */
#define KODI_AUDIOENGINE_MIN_API_VERSION "0.0.1"
#ifdef __cplusplus
extern "C" {
#endif
/**
* A stream handle pointer, which is only used internally by the addon stream handle
*/
typedef void AEStreamHandle;
/**
* The audio format structure that fully defines a stream's audio information
*/
typedef struct AudioEngineFormat
{
/**
* The stream's data format (eg, AE_FMT_S16LE)
*/
enum AEDataFormat m_dataFormat;
/**
* The stream's sample rate (eg, 48000)
*/
unsigned int m_sampleRate;
/**
* The encoded streams sample rate if a bitstream, otherwise undefined
*/
unsigned int m_encodedRate;
/**
* The amount of used speaker channels
*/
unsigned int m_channelCount;
/**
* The stream's channel layout
*/
enum AEChannel m_channels[AE_CH_MAX];
/**
* The number of frames per period
*/
unsigned int m_frames;
/**
* The size of one frame in bytes
*/
unsigned int m_frameSize;
AudioEngineFormat()
{
m_dataFormat = AE_FMT_INVALID;
m_sampleRate = 0;
m_encodedRate = 0;
m_frames = 0;
m_frameSize = 0;
m_channelCount = 0;
for (unsigned int ch = 0; ch < AE_CH_MAX; ch++)
{
m_channels[ch] = AE_CH_NULL;
}
}
bool compareFormat(const AudioEngineFormat *fmt)
{
if (!fmt)
{
return false;
}
if (m_dataFormat != fmt->m_dataFormat ||
m_sampleRate != fmt->m_sampleRate ||
m_encodedRate != fmt->m_encodedRate ||
m_frames != fmt->m_frames ||
m_frameSize != fmt->m_frameSize ||
m_channelCount != fmt->m_channelCount)
{
return false;
}
for (unsigned int ch = 0; ch < AE_CH_MAX; ch++)
{
if (fmt->m_channels[ch] != m_channels[ch])
{
return false;
}
}
return true;
}
} AudioEngineFormat;
#ifdef __cplusplus
}
#endif
|