kodi
AEResample.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 "cores/AudioEngine/Interfaces/AE.h"
12 
13 namespace ActiveAE
14 {
15 
17 {
18 public:
19  // return the name of this sync for logging
20  virtual const char *GetName() = 0;
21  IAEResample() = default;
22  virtual ~IAEResample() = default;
23  virtual bool Init(SampleConfig dstConfig, SampleConfig srcConfig, bool upmix, bool normalize, double centerMix,
24  CAEChannelInfo *remapLayout, AEQuality quality, bool force_resample) = 0;
25  virtual int Resample(uint8_t **dst_buffer, int dst_samples, uint8_t **src_buffer, int src_samples, double ratio) = 0;
26  virtual int64_t GetDelay(int64_t base) = 0;
27  virtual int GetBufferedSamples() = 0;
28  virtual bool WantsNewSamples(int samples) = 0;
29  virtual int CalcDstSampleCount(int src_samples, int dst_rate, int src_rate) = 0;
30  virtual int GetSrcBufferSize(int samples) = 0;
31  virtual int GetDstBufferSize(int samples) = 0;
32 };
33 
34 }
Definition: Application.h:67
Definition: AE.h:68
Definition: AEChannelInfo.h:19
Definition: AEResample.h:16