openMSX
sound
ResampleBlip.hh
Go to the documentation of this file.
1
#ifndef RESAMPLEBLIP_HH
2
#define RESAMPLEBLIP_HH
3
4
#include "
ResampleAlgo.hh
"
5
#include "
BlipBuffer.hh
"
6
#include <array>
7
8
namespace
openmsx
{
9
10
class
DynamicClock
;
11
class
ResampledSoundDevice;
12
13
template
<
unsigned
CHANNELS>
14
class
ResampleBlip
final :
public
ResampleAlgo
15
{
16
public
:
17
ResampleBlip
(
ResampledSoundDevice
&
input
,
const
DynamicClock
& hostClock);
18
19
bool
generateOutputImpl
(
float
* dataOut,
size_t
num,
20
EmuTime::param time)
override
;
21
22
private
:
23
std::array<BlipBuffer, CHANNELS> blip;
24
const
DynamicClock
& hostClock;
// time of the last host-sample,
25
// ticks once per host sample
26
using
FP
=
FixedPoint<16>
;
27
const
FP
step;
28
std::array<float, CHANNELS> lastInput;
29
};
30
31
}
// namespace openmsx
32
33
#endif
BlipBuffer.hh
ResampleAlgo.hh
openmsx::DynamicClock
Represents a clock with a variable frequency.
Definition
DynamicClock.hh:17
openmsx::FixedPoint< 16 >
openmsx::ResampleAlgo
Definition
ResampleAlgo.hh:12
openmsx::ResampleAlgo::input
ResampledSoundDevice & input
Definition
ResampleAlgo.hh:32
openmsx::ResampleBlip
Definition
ResampleBlip.hh:15
openmsx::ResampleBlip::generateOutputImpl
bool generateOutputImpl(float *dataOut, size_t num, EmuTime::param time) override
Definition
ResampleBlip.cc:31
openmsx::ResampledSoundDevice
Definition
ResampledSoundDevice.hh:20
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
openmsx::DynamicClock
DynamicClock
Definition
DynamicClock.cc:26
Generated on Sat Dec 7 2024 13:14:02 for openMSX by
1.9.8