openMSX
WavImage.hh
Go to the documentation of this file.
1 #ifndef WAVIMAGE_HH
2 #define WAVIMAGE_HH
3 
4 #include "CassetteImage.hh"
5 #include "WavData.hh"
6 #include "DynamicClock.hh"
7 #include <cstdint>
8 
9 namespace openmsx {
10 
11 class Filename;
12 class FilePool;
13 
14 class WavImage final : public CassetteImage
15 {
16 public:
17  explicit WavImage(const Filename& filename, FilePool& filePool);
18  ~WavImage() override;
19  WavImage(const WavImage&) = delete;
20  WavImage& operator=(const WavImage&) = delete;
21 
22  int16_t getSampleAt(EmuTime::param time) const override;
23  [[nodiscard]] EmuTime getEndTime() const override;
24  [[nodiscard]] unsigned getFrequency() const override;
25  void fillBuffer(unsigned pos, float** bufs, unsigned num) const override;
26  [[nodiscard]] float getAmplificationFactorImpl() const override;
27 
28 private:
29  const WavData* wav;
30  DynamicClock clock;
31 };
32 
33 } // namespace openmsx
34 
35 #endif
Represents a clock with a variable frequency.
Definition: DynamicClock.hh:16
This class represents a filename.
Definition: Filename.hh:18
WavImage(const Filename &filename, FilePool &filePool)
Definition: WavImage.cc:104
~WavImage() override
Definition: WavImage.cc:113
void fillBuffer(unsigned pos, float **bufs, unsigned num) const override
Definition: WavImage.cc:152
float getAmplificationFactorImpl() const override
Definition: WavImage.cc:163
WavImage & operator=(const WavImage &)=delete
int16_t getSampleAt(EmuTime::param time) const override
Definition: WavImage.cc:118
WavImage(const WavImage &)=delete
EmuTime getEndTime() const override
Definition: WavImage.cc:140
unsigned getFrequency() const override
Definition: WavImage.cc:147
This file implemented 3 utility functions:
Definition: Autofire.cc:9
constexpr const char *const filename