diff options
Diffstat (limited to 'src/devices/sound/cdda.cpp')
-rw-r--r-- | src/devices/sound/cdda.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/devices/sound/cdda.cpp b/src/devices/sound/cdda.cpp index e24127a65c1..f0fc9e4d000 100644 --- a/src/devices/sound/cdda.cpp +++ b/src/devices/sound/cdda.cpp @@ -18,8 +18,8 @@ void cdda_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { get_audio_data(&outputs[0][0], &outputs[1][0], samples); - m_audio_volume[0] = (INT16)outputs[0][0]; - m_audio_volume[1] = (INT16)outputs[1][0]; + m_audio_volume[0] = (int16_t)outputs[0][0]; + m_audio_volume[1] = (int16_t)outputs[1][0]; } //------------------------------------------------- @@ -29,7 +29,7 @@ void cdda_device::sound_stream_update(sound_stream &stream, stream_sample_t **in void cdda_device::device_start() { /* allocate an audio cache */ - m_audio_cache = std::make_unique<UINT8[]>(CD_MAX_SECTOR_DATA * MAX_SECTORS ); + m_audio_cache = std::make_unique<uint8_t[]>(CD_MAX_SECTOR_DATA * MAX_SECTORS ); m_stream = machine().sound().stream_alloc(*this, 0, 2, 44100); @@ -69,7 +69,7 @@ void cdda_device::set_cdrom(void *file) Book audio track -------------------------------------------------*/ -void cdda_device::start_audio(UINT32 startlba, UINT32 numblocks) +void cdda_device::start_audio(uint32_t startlba, uint32_t numblocks) { m_stream->update(); m_audio_playing = TRUE; @@ -111,7 +111,7 @@ void cdda_device::pause_audio(int pause) (physical sector) during Red Book playback -------------------------------------------------*/ -UINT32 cdda_device::get_audio_lba() +uint32_t cdda_device::get_audio_lba() { m_stream->update(); return m_audio_lba; @@ -159,10 +159,10 @@ int cdda_device::audio_ended() converts it to 2 16-bit 44.1 kHz streams -------------------------------------------------*/ -void cdda_device::get_audio_data(stream_sample_t *bufL, stream_sample_t *bufR, UINT32 samples_wanted) +void cdda_device::get_audio_data(stream_sample_t *bufL, stream_sample_t *bufR, uint32_t samples_wanted) { int i; - INT16 *audio_cache = (INT16 *) m_audio_cache.get(); + int16_t *audio_cache = (int16_t *) m_audio_cache.get(); while (samples_wanted > 0) { @@ -190,8 +190,8 @@ void cdda_device::get_audio_data(stream_sample_t *bufL, stream_sample_t *bufR, U for (i = 0; i < samples; i++) { /* CD-DA data on the disc is big-endian */ - *bufL++ = (INT16) big_endianize_int16( audio_cache[ m_audio_bptr ] ); m_audio_bptr++; - *bufR++ = (INT16) big_endianize_int16( audio_cache[ m_audio_bptr ] ); m_audio_bptr++; + *bufL++ = (int16_t) big_endianize_int16( audio_cache[ m_audio_bptr ] ); m_audio_bptr++; + *bufR++ = (int16_t) big_endianize_int16( audio_cache[ m_audio_bptr ] ); m_audio_bptr++; } samples_wanted -= samples; @@ -248,14 +248,14 @@ void cdda_device::set_channel_volume(int channel, int volume) for either speaker, used for volume control display -------------------------------------------------*/ -INT16 cdda_device::get_channel_volume(int channel) +int16_t cdda_device::get_channel_volume(int channel) { return m_audio_volume[channel]; } const device_type CDDA = &device_creator<cdda_device>; -cdda_device::cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cdda_device::cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, CDDA, "CD/DA", tag, owner, clock, "cdda", __FILE__), device_sound_interface(mconfig, *this) { |