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 
19  int16_t getSampleAt(EmuTime::param time) override;
20  EmuTime getEndTime() const override;
21  unsigned getFrequency() const override;
22  void fillBuffer(unsigned pos, float** bufs, unsigned num) const override;
23  float getAmplificationFactorImpl() const override;
24 
25 private:
26  WavData wav;
27  DynamicClock clock;
28 };
29 
30 } // namespace openmsx
31 
32 #endif
openmsx::WavImage::getEndTime
EmuTime getEndTime() const override
Definition: WavImage.cc:63
openmsx::WavData
Definition: WavData.hh:15
openmsx::CassetteImage
Definition: CassetteImage.hh:12
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:75
CassetteImage.hh
openmsx::WavImage::getAmplificationFactorImpl
float getAmplificationFactorImpl() const override
Definition: WavImage.cc:86
openmsx::WavImage
Definition: WavImage.hh:15
openmsx::WavImage::getFrequency
unsigned getFrequency() const override
Definition: WavImage.cc:70
openmsx::Filename
Filename
Definition: Filename.cc:50
openmsx::FilePool
Definition: FilePool.hh:26
DynamicClock.hh
openmsx::Filename
This class represents a filename.
Definition: Filename.hh:18
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::WavImage::getSampleAt
int16_t getSampleAt(EmuTime::param time) override
Definition: WavImage.cc:41
openmsx::WavImage::WavImage
WavImage(const Filename &filename, FilePool &filePool)
Definition: WavImage.cc:31