openMSX
sound
DACSound16S.hh
Go to the documentation of this file.
1
// This class implements a 16 bit signed DAC
2
3
#ifndef DACSOUND16S_HH
4
#define DACSOUND16S_HH
5
6
#include "
SoundDevice.hh
"
7
#include "
BlipBuffer.hh
"
8
#include <cstdint>
9
10
namespace
openmsx
{
11
12
class
DACSound16S
:
public
SoundDevice
13
{
14
public
:
15
DACSound16S
(std::string_view name,
static_string_view
desc,
16
const
DeviceConfig
& config);
17
virtual
~DACSound16S
();
18
19
void
reset
(EmuTime::param time);
20
void
writeDAC
(int16_t value, EmuTime::param time);
21
22
template
<
typename
Archive>
23
void
serialize
(Archive& ar,
unsigned
version);
24
25
private
:
26
// SoundDevice
27
void
setOutputRate(
unsigned
hostSampleRate,
double
speed)
override
;
28
void
generateChannels(std::span<float*> bufs,
unsigned
num)
override
;
29
bool
updateBuffer(
size_t
length,
float
* buffer,
30
EmuTime::param time)
override
;
31
32
private
:
33
BlipBuffer
blip;
34
int16_t lastWrittenValue = 0;
35
};
36
37
}
// namespace openmsx
38
39
#endif
BlipBuffer.hh
SoundDevice.hh
openmsx::BlipBuffer
Definition
BlipBuffer.hh:16
openmsx::DACSound16S
Definition
DACSound16S.hh:13
openmsx::DACSound16S::reset
void reset(EmuTime::param time)
Definition
DACSound16S.cc:29
openmsx::DACSound16S::serialize
void serialize(Archive &ar, unsigned version)
Definition
DACSound16S.cc:63
openmsx::DACSound16S::~DACSound16S
virtual ~DACSound16S()
Definition
DACSound16S.cc:19
openmsx::DACSound16S::writeDAC
void writeDAC(int16_t value, EmuTime::param time)
Definition
DACSound16S.cc:34
openmsx::DeviceConfig
Definition
DeviceConfig.hh:21
openmsx::SoundDevice
Definition
SoundDevice.hh:20
static_string_view
static_string_view
Definition
static_string_view.hh:28
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
Generated on Thu Dec 19 2024 23:13:46 for openMSX by
1.9.8