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();
19  WavImage(const WavImage&) = delete;
20  WavImage& operator=(const WavImage&) = delete;
21 
22  int16_t getSampleAt(EmuTime::param time) override;
23  EmuTime getEndTime() const override;
24  unsigned getFrequency() const override;
25  void fillBuffer(unsigned pos, float** bufs, unsigned num) const override;
26  float getAmplificationFactorImpl() const override;
27 
28 private:
29  const WavData* wav;
30  DynamicClock clock;
31 };
32 
33 } // namespace openmsx
34 
35 #endif
openmsx::WavImage::getEndTime
EmuTime getEndTime() const override
Definition: WavImage.cc:138
openmsx::WavData
Definition: WavData.hh:15
openmsx::CassetteImage
Definition: CassetteImage.hh:12
openmsx::WavImage::WavImage
WavImage(const WavImage &)=delete
openmsx::DynamicClock
Represents a clock with a variable frequency.
Definition: DynamicClock.hh:17
openmsx::filename
constexpr const char *const filename
Definition: FirmwareSwitch.cc:10
WavData.hh
openmsx::WavImage::fillBuffer
void fillBuffer(unsigned pos, float **bufs, unsigned num) const override
Definition: WavImage.cc:150
openmsx::WavImage::~WavImage
~WavImage()
Definition: WavImage.cc:111
CassetteImage.hh
openmsx::WavImage::getAmplificationFactorImpl
float getAmplificationFactorImpl() const override
Definition: WavImage.cc:161
openmsx::WavImage
Definition: WavImage.hh:15
openmsx::WavImage::getFrequency
unsigned getFrequency() const override
Definition: WavImage.cc:145
openmsx::Filename
Filename
Definition: Filename.cc:50
openmsx::FilePool
Definition: FilePool.hh:16
DynamicClock.hh
openmsx::Filename
This class represents a filename.
Definition: Filename.hh:18
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::WavImage::getSampleAt
int16_t getSampleAt(EmuTime::param time) override
Definition: WavImage.cc:116
openmsx::WavImage::operator=
WavImage & operator=(const WavImage &)=delete
openmsx::WavImage::WavImage
WavImage(const Filename &filename, FilePool &filePool)
Definition: WavImage.cc:102