openMSX
ResampleBlip.hh
Go to the documentation of this file.
1 #ifndef RESAMPLEBLIP_HH
2 #define RESAMPLEBLIP_HH
3 
4 #include "ResampleAlgo.hh"
5 #include "BlipBuffer.hh"
6 
7 namespace openmsx {
8 
9 class DynamicClock;
10 class ResampledSoundDevice;
11 
12 template<unsigned CHANNELS>
13 class ResampleBlip final : public ResampleAlgo
14 {
15 public:
17 
18  bool generateOutputImpl(float* dataOut, unsigned num,
19  EmuTime::param time) override;
20 
21 private:
22  BlipBuffer blip[CHANNELS];
23  const DynamicClock& hostClock; // time of the last host-sample,
24  // ticks once per host sample
25  using FP = FixedPoint<16>;
26  const FP step;
27  float lastInput[CHANNELS];
28 };
29 
30 } // namespace openmsx
31 
32 #endif
constexpr unsigned CHANNELS
Definition: YM2413Test.cc:20
Represents a clock with a variable frequency.
Definition: DynamicClock.hh:16
ResampledSoundDevice & input
Definition: ResampleAlgo.hh:32
ResampleBlip(ResampledSoundDevice &input, const DynamicClock &hostClock)
Definition: ResampleBlip.cc:13
bool generateOutputImpl(float *dataOut, unsigned num, EmuTime::param time) override
Definition: ResampleBlip.cc:29
This file implemented 3 utility functions:
Definition: Autofire.cc:9