| e8555c89 Andy McCall |
1 |
#include "DACSound8U.hh" |
| 2 |
|
| 3 |
#include "DeviceConfig.hh" |
| 4 |
#include "MSXMotherBoard.hh" |
| 5 |
|
| 6 |
#include "narrow.hh" |
| 7 |
|
| 8 |
namespace openmsx { |
| 9 |
|
| 10 |
DACSound8U::DACSound8U(std::string_view name_, static_string_view desc, |
| 11 |
const DeviceConfig& config) |
| 12 |
: DACSound16S(name_, desc, config) |
| 13 |
{ |
| 14 |
|
| 15 |
|
| 16 |
setSoftwareVolume(256.0f, config.getMotherBoard().getCurrentTime()); |
| 17 |
} |
| 18 |
|
| 19 |
void DACSound8U::writeDAC(uint8_t value, EmuTime time) |
| 20 |
{ |
| 21 |
DACSound16S::writeDAC(narrow<int16_t>(narrow<int>(value) - 0x80), time); |
| 22 |
} |
| 23 |
|
| 24 |
} |