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 <array>
7
8namespace openmsx {
9
10class DynamicClock;
11class ResampledSoundDevice;
12
13template<unsigned CHANNELS>
14class ResampleBlip final : public ResampleAlgo
15{
16public:
18
19 bool generateOutputImpl(float* dataOut, size_t num,
20 EmuTime::param time) override;
21
22private:
23 std::array<BlipBuffer, CHANNELS> blip;
24 const DynamicClock& hostClock; // time of the last host-sample,
25 // ticks once per host sample
26 using FP = FixedPoint<16>;
27 const FP step;
28 std::array<float, CHANNELS> lastInput;
29};
30
31} // namespace openmsx
32
33#endif
Represents a clock with a variable frequency.
ResampledSoundDevice & input
bool generateOutputImpl(float *dataOut, size_t num, EmuTime::param time) override
This file implemented 3 utility functions:
Definition Autofire.cc:11