#ifndef MEDIA_BASE_AUDIO_PARAMETERS_H_
#define MEDIA_BASE_AUDIO_PARAMETERS_H_
#include <stdint.h>
#include <optional>
#include <string>
#include <vector>
#include "base/compiler_specific.h"
#include "base/numerics/checked_math.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/audio_latency.h"
#include "media/base/audio_point.h"
#include "media/base/channel_layout.h"
#include "media/base/media_shmem_export.h"
#include "media/base/sample_format.h"
namespace media {
#if BUILDFLAG(IS_WIN)
#pragma warning(push)
#pragma warning(disable : 4324)
#endif
constexpr int kParametersAlignment = …;
struct MEDIA_SHMEM_EXPORT alignas(kParametersAlignment)
AudioInputBufferParameters { … };
struct MEDIA_SHMEM_EXPORT alignas(kParametersAlignment)
AudioOutputBufferParameters { … };
#if BUILDFLAG(IS_WIN)
#pragma warning(pop)
#endif
struct MEDIA_SHMEM_EXPORT AudioInputBuffer { … };
struct MEDIA_SHMEM_EXPORT AudioOutputBuffer { … };
struct MEDIA_SHMEM_EXPORT AudioRendererAlgorithmParameters { … };
class AudioParameters;
MEDIA_SHMEM_EXPORT base::CheckedNumeric<uint32_t>
ComputeAudioInputBufferSizeChecked(const AudioParameters& parameters,
uint32_t audio_bus_count);
MEDIA_SHMEM_EXPORT uint32_t
ComputeAudioInputBufferSize(const AudioParameters& parameters,
uint32_t audio_bus_count);
MEDIA_SHMEM_EXPORT uint32_t
ComputeAudioInputBufferSize(int channels, int frames, uint32_t audio_bus_count);
MEDIA_SHMEM_EXPORT base::CheckedNumeric<uint32_t>
ComputeAudioOutputBufferSizeChecked(const AudioParameters& parameters);
MEDIA_SHMEM_EXPORT uint32_t
ComputeAudioOutputBufferSize(const AudioParameters& parameters);
MEDIA_SHMEM_EXPORT uint32_t ComputeAudioOutputBufferSize(int channels,
int frames);
class MEDIA_SHMEM_EXPORT ChannelLayoutConfig { … };
template <>
ChannelLayoutConfig ChannelLayoutConfig::FromLayout<CHANNEL_LAYOUT_DISCRETE>() =
delete;
class MEDIA_SHMEM_EXPORT AudioParameters { … };
inline bool operator<(const AudioParameters& a, const AudioParameters& b) { … }
}
#endif