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
9namespace openmsx {
10
11class Filename;
12class FilePool;
13
14class WavImage final : public CassetteImage
15{
16public:
17 explicit WavImage(const Filename& filename, FilePool& filePool);
18 WavImage(const WavImage&) = delete;
19 WavImage(WavImage&&) = delete;
20 WavImage& operator=(const WavImage&) = delete;
22 ~WavImage() override;
23
24 [[nodiscard]] int16_t getSampleAt(EmuTime::param time) const override;
25 [[nodiscard]] EmuTime getEndTime() const override;
26 [[nodiscard]] unsigned getFrequency() const override;
27 void fillBuffer(unsigned pos, std::span<float*, 1> bufs, unsigned num) const override;
28 [[nodiscard]] float getAmplificationFactorImpl() const override;
29
30private:
31 const WavData* wav;
32 DynamicClock clock{EmuTime::zero()};
33};
34
35} // namespace openmsx
36
37#endif
Represents a clock with a variable frequency.
This class represents a filename.
Definition Filename.hh:20
WavImage & operator=(WavImage &&)=delete
WavImage(WavImage &&)=delete
~WavImage() override
Definition WavImage.cc:116
void fillBuffer(unsigned pos, std::span< float *, 1 > bufs, unsigned num) const override
Definition WavImage.cc:155
float getAmplificationFactorImpl() const override
Definition WavImage.cc:166
int16_t getSampleAt(EmuTime::param time) const override
Definition WavImage.cc:121
WavImage(const WavImage &)=delete
WavImage & operator=(const WavImage &)=delete
EmuTime getEndTime() const override
Definition WavImage.cc:143
unsigned getFrequency() const override
Definition WavImage.cc:150
This file implemented 3 utility functions:
Definition Autofire.cc:11