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 #include "DynamicClock.hh"
7 
8 namespace openmsx {
9 
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
BlipBuffer.hh
CHANNELS
constexpr unsigned CHANNELS
Definition: YM2413Test.cc:20
openmsx::ResampleAlgo::input
ResampledSoundDevice & input
Definition: ResampleAlgo.hh:32
openmsx::ResampledSoundDevice
Definition: ResampledSoundDevice.hh:17
openmsx::ResampleBlip::ResampleBlip
ResampleBlip(ResampledSoundDevice &input, const DynamicClock &hostClock)
Definition: ResampleBlip.cc:12
openmsx::BlipBuffer
Definition: BlipBuffer.hh:15
openmsx::DynamicClock
Represents a clock with a variable frequency.
Definition: DynamicClock.hh:17
ResampleAlgo.hh
openmsx::ResampleBlip::generateOutputImpl
bool generateOutputImpl(float *dataOut, unsigned num, EmuTime::param time) override
Definition: ResampleBlip.cc:28
openmsx::ResampleBlip
Definition: ResampleBlip.hh:14
DynamicClock.hh
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::ResampleAlgo
Definition: ResampleAlgo.hh:12
openmsx::FixedPoint< 16 >