openMSX
ResampleHQ.hh
Go to the documentation of this file.
1 #ifndef RESAMPLEHQ_HH
2 #define RESAMPLEHQ_HH
3 
4 #include "ResampleAlgo.hh"
5 #include "DynamicClock.hh"
6 #include <cstdint>
7 #include <vector>
8 
9 namespace openmsx {
10 
11 class ResampledSoundDevice;
12 
13 template <unsigned CHANNELS>
14 class ResampleHQ final : public ResampleAlgo
15 {
16 public:
18  ~ResampleHQ() override;
19 
20  bool generateOutputImpl(float* dataOut, unsigned num,
21  EmuTime::param time) override;
22 
23 private:
24  void calcOutput(float pos, float* output);
25  void prepareData(unsigned emuNum);
26 
27  const DynamicClock& hostClock;
28 
29  const float ratio;
30  unsigned bufStart;
31  unsigned bufEnd;
32  unsigned nonzeroSamples;
33  unsigned filterLen;
34  std::vector<float> buffer;
35  float* table;
36  int16_t* permute;
37 };
38 
39 } // namespace openmsx
40 
41 #endif
openmsx::ResampleAlgo::input
ResampledSoundDevice & input
Definition: ResampleAlgo.hh:32
openmsx::ResampledSoundDevice
Definition: ResampledSoundDevice.hh:17
openmsx::ResampleHQ::ResampleHQ
ResampleHQ(ResampledSoundDevice &input, const DynamicClock &hostClock)
Definition: ResampleHQ.cc:373
openmsx::ResampleHQ::generateOutputImpl
bool generateOutputImpl(float *dataOut, unsigned num, EmuTime::param time) override
Definition: ResampleHQ.cc:642
openmsx::DynamicClock
Represents a clock with a variable frequency.
Definition: DynamicClock.hh:17
ResampleAlgo.hh
openmsx::ResampleHQ
Definition: ResampleHQ.hh:15
DynamicClock.hh
openmsx::ResampleHQ::~ResampleHQ
~ResampleHQ() override
Definition: ResampleHQ.cc:391
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::ResampleAlgo
Definition: ResampleAlgo.hh:12