diff options
Diffstat (limited to 'src/emu/sound/dac.h')
-rw-r--r-- | src/emu/sound/dac.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/sound/dac.h b/src/emu/sound/dac.h index 15bfb4b4ec0..fdafa4eaa9f 100644 --- a/src/emu/sound/dac.h +++ b/src/emu/sound/dac.h @@ -58,7 +58,7 @@ // ======================> dac_device class dac_device : public device_t, - public device_sound_interface + public device_sound_interface { // default to 4x oversampling static const UINT32 DEFAULT_SAMPLE_RATE = 48000 * 4; @@ -70,10 +70,10 @@ public: // public interface INT16 output() const { return m_output; } void write(INT16 data) { m_stream->update(); m_output = data; } - void write_unsigned8(UINT8 data) { write(data * 32767 / 255); } // 0..255, mapped to 0..32767 - void write_signed8(UINT8 data) { write((data - 0x80) * 32767 / 128); } // 0..255, mapped to -32767..32767 - void write_unsigned16(UINT16 data) { write(data / 2); } // 0..65535, mapped to 0..32767 - void write_signed16(UINT16 data) { write(data - 0x8000); } // 0..65535, mapped to -32768..32767 + void write_unsigned8(UINT8 data) { write(data * 32767 / 255); } // 0..255, mapped to 0..32767 + void write_signed8(UINT8 data) { write((data - 0x80) * 32767 / 128); } // 0..255, mapped to -32767..32767 + void write_unsigned16(UINT16 data) { write(data / 2); } // 0..65535, mapped to 0..32767 + void write_signed16(UINT16 data) { write(data - 0x8000); } // 0..65535, mapped to -32768..32767 // wrappers DECLARE_WRITE8_MEMBER( write_unsigned8 ); @@ -88,8 +88,8 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); // internal state - sound_stream * m_stream; - INT16 m_output; + sound_stream * m_stream; + INT16 m_output; }; |