| e8555c89 Andy McCall |
1 |
#ifndef RESAMPLEBLIP_HH |
| 2 |
#define RESAMPLEBLIP_HH |
| 3 |
|
| 4 |
#include "BlipBuffer.hh" |
| 5 |
#include "ResampleAlgo.hh" |
| 6 |
|
| 7 |
#include <array> |
| 8 |
|
| 9 |
namespace openmsx { |
| 10 |
|
| 11 |
class DynamicClock; |
| 12 |
class ResampledSoundDevice; |
| 13 |
|
| 14 |
template<unsigned CHANNELS> |
| 15 |
class ResampleBlip final : public ResampleAlgo |
| 16 |
{ |
| 17 |
public: |
| 18 |
ResampleBlip(ResampledSoundDevice& input, const DynamicClock& hostClock); |
| 19 |
|
| 20 |
bool generateOutputImpl(float* dataOut, size_t num, |
| 21 |
EmuTime time) override; |
| 22 |
|
| 23 |
private: |
| 24 |
std::array<BlipBuffer, CHANNELS> blip; |
| 25 |
const DynamicClock& hostClock; |
| 26 |
|
| 27 |
using FP = FixedPoint<16>; |
| 28 |
const FP step; |
| 29 |
std::array<float, CHANNELS> lastInput; |
| 30 |
}; |
| 31 |
|
| 32 |
} |
| 33 |
|
| 34 |
#endif |