summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound
diff options
context:
space:
mode:
author Aaron Giles <aaronsgiles@users.noreply.github.com>2020-09-27 20:46:58 -0700
committer GitHub <noreply@github.com>2020-09-28 13:46:58 +1000
commit7b8913fefa46d67e4be7c662f20a4e26e21000eb (patch)
tree5e8e471549b9c640aca9ba995de7e0c470154581 /src/devices/sound
parent52514f1acd4c825aee93acb93b286af1c8712807 (diff)
Complete sound modernization of remaining devices. Legacy callbacks and stream_sample_t removed. (#7297)
* a2mcms/coco_ssc/gus/cassette/floppy/8364_paula/laserdsc/s2636/spg2xx_audio/arcadia/channelf/cmi01a/cps3/dai_snd: Update to new stream callbacks * dsbz80/elan_eu3a05/exidy/exidy440/flower/geebee/gomoku/gridlee: Update to new stream callbacks * hyprolyb/lynx/micro3d/phoenix/pleiads/polepos: Update to new sound stream callback * redbaron/segag80r/segausb/seibu/snk6502/socrates/special/svis_snd: Update to new stream callbacks. * tiamc1/turrett/tvc/tx1/vboy/vc4000: Update to new stream callbacks * warpwarp/wiping/wswan/xavix/esq1/istrebiteli/milton6805/pv1000/mega32x/gic: Update to new stream callback * sound: Remove legacy stream support and stream_sample_t * * gomoku/wiping: Remove silly mixer tables in favor of math * micro3d: Remove tiny vectors in favor of fixed arrays * phoenix: Went back to std::unique_ptr array for LFSR * wiping: Fixed the scale factor.
Diffstat (limited to 'src/devices/sound')
-rw-r--r--src/devices/sound/astrocde.cpp2
-rw-r--r--src/devices/sound/dac76.cpp2
-rw-r--r--src/devices/sound/discrete.cpp2
-rw-r--r--src/devices/sound/es5503.h1
-rw-r--r--src/devices/sound/fm.h2
-rw-r--r--src/devices/sound/fmopl.h2
-rw-r--r--src/devices/sound/ics2115.cpp2
-rw-r--r--src/devices/sound/k053260.cpp4
-rw-r--r--src/devices/sound/k053260.h2
-rw-r--r--src/devices/sound/s_dsp.cpp4
-rw-r--r--src/devices/sound/ymf262.h2
11 files changed, 12 insertions, 13 deletions
diff --git a/src/devices/sound/astrocde.cpp b/src/devices/sound/astrocde.cpp
index e0fab62505b..91d0fdc46b9 100644
--- a/src/devices/sound/astrocde.cpp
+++ b/src/devices/sound/astrocde.cpp
@@ -146,7 +146,7 @@ void astrocade_io_device::sound_stream_update(sound_stream &stream, std::vector<
constexpr stream_buffer::sample_t sample_scale = 1.0f / 60.0f;
for (int sampindex = 0; sampindex < dest.samples(); sampindex += samples_this_time)
{
- stream_sample_t cursample = 0;
+ s32 cursample = 0;
/* compute the number of cycles until the next master oscillator reset */
/* or until the next noise boundary */
diff --git a/src/devices/sound/dac76.cpp b/src/devices/sound/dac76.cpp
index bbeb5728577..1c73d7b02c1 100644
--- a/src/devices/sound/dac76.cpp
+++ b/src/devices/sound/dac76.cpp
@@ -79,7 +79,7 @@ void dac76_device::sound_stream_update(sound_stream &stream, std::vector<read_st
{
// get current output level
int step_size = (2 << m_chord);
- stream_sample_t vout = m_level[m_chord] + m_step * step_size;
+ s32 vout = m_level[m_chord] + m_step * step_size;
// apply sign bit
vout *= (m_sb ? +1 : -1);
diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp
index 1d5647e45cd..7cec35b77fe 100644
--- a/src/devices/sound/discrete.cpp
+++ b/src/devices/sound/discrete.cpp
@@ -1026,7 +1026,7 @@ void discrete_sound_device::device_reset()
// discrete_device_process - process a number of
// samples.
//
-// input / output buffers are stream_sample_t
+// input / output buffers are s32
// to not to have to convert the buffers.
// a "discrete cpu" device will pass nullptr here
//-------------------------------------------------
diff --git a/src/devices/sound/es5503.h b/src/devices/sound/es5503.h
index 2d301f5c05e..2fd316aad8e 100644
--- a/src/devices/sound/es5503.h
+++ b/src/devices/sound/es5503.h
@@ -36,7 +36,6 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr) override;
// device_sound_interface overrides
- //virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
// device_rom_interface overrides
diff --git a/src/devices/sound/fm.h b/src/devices/sound/fm.h
index 32f768a824b..45381d7dda9 100644
--- a/src/devices/sound/fm.h
+++ b/src/devices/sound/fm.h
@@ -50,7 +50,7 @@ template <typename X> constexpr TIME_TYPE MULTIPLY_TIME_BY_INT(TIME_TYPE const &
#endif
-typedef stream_sample_t FMSAMPLE;
+typedef s32 FMSAMPLE;
/*
#if (FM_SAMPLE_BITS==16)
typedef int16_t FMSAMPLE;
diff --git a/src/devices/sound/fmopl.h b/src/devices/sound/fmopl.h
index b70c46f93e3..bb484b0e41b 100644
--- a/src/devices/sound/fmopl.h
+++ b/src/devices/sound/fmopl.h
@@ -16,7 +16,7 @@
/* select output bits size of output : 8 or 16 */
#define OPL_SAMPLE_BITS 16
-typedef stream_sample_t OPLSAMPLE;
+typedef s32 OPLSAMPLE;
/*
#if (OPL_SAMPLE_BITS==16)
typedef int16_t OPLSAMPLE;
diff --git a/src/devices/sound/ics2115.cpp b/src/devices/sound/ics2115.cpp
index 80e4aa9cd09..868bcb70bc4 100644
--- a/src/devices/sound/ics2115.cpp
+++ b/src/devices/sound/ics2115.cpp
@@ -443,7 +443,7 @@ void ics2115_device::sound_stream_update(sound_stream &stream, std::vector<read_
/*
#ifdef ICS2115_DEBUG
u32 curaddr = ((voice.osc.saddr << 20) & 0xffffff) | (voice.osc.acc >> 12);
- stream_sample_t sample = get_sample(voice);
+ s32 sample = get_sample(voice);
logerror("[%06x=%04x]", curaddr, (s16)sample);
#endif
*/
diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp
index 0032d834df6..7337b0c8b91 100644
--- a/src/devices/sound/k053260.cpp
+++ b/src/devices/sound/k053260.cpp
@@ -311,7 +311,7 @@ void k053260_device::sound_stream_update(sound_stream &stream, std::vector<read_
{
for ( int j = 0; j < outputs[0].samples(); j++ )
{
- stream_sample_t buffer[2] = {0, 0};
+ s32 buffer[2] = {0, 0};
for (auto & voice : m_voice)
{
@@ -435,7 +435,7 @@ void k053260_device::KDSC_Voice::key_off()
m_playing = false;
}
-void k053260_device::KDSC_Voice::play(stream_sample_t *outputs)
+void k053260_device::KDSC_Voice::play(s32 *outputs)
{
m_counter += CLOCKS_PER_SAMPLE;
diff --git a/src/devices/sound/k053260.h b/src/devices/sound/k053260.h
index a50b8b9196e..ad14244ceb9 100644
--- a/src/devices/sound/k053260.h
+++ b/src/devices/sound/k053260.h
@@ -79,7 +79,7 @@ private:
inline void update_pan_volume();
inline void key_on();
inline void key_off();
- inline void play(stream_sample_t *outputs);
+ inline void play(s32 *outputs);
inline bool playing() { return m_playing; }
inline u8 read_rom(bool side_effects);
diff --git a/src/devices/sound/s_dsp.cpp b/src/devices/sound/s_dsp.cpp
index 52d255dbfc6..98cd204b503 100644
--- a/src/devices/sound/s_dsp.cpp
+++ b/src/devices/sound/s_dsp.cpp
@@ -1074,7 +1074,7 @@ void s_dsp_device::sound_stream_update(sound_stream &stream, std::vector<read_st
dsp_update(mix);
/* Update the buffers */
- outputs[0].put_int(i, (stream_sample_t)mix[0], 32768);
- outputs[1].put_int(i, (stream_sample_t)mix[1], 32768);
+ outputs[0].put_int(i, (s32)mix[0], 32768);
+ outputs[1].put_int(i, (s32)mix[1], 32768);
}
}
diff --git a/src/devices/sound/ymf262.h b/src/devices/sound/ymf262.h
index 3c02e0da16c..fe131169fcf 100644
--- a/src/devices/sound/ymf262.h
+++ b/src/devices/sound/ymf262.h
@@ -8,7 +8,7 @@
/* select number of output bits: 8 or 16 */
#define OPL3_SAMPLE_BITS 16
-typedef stream_sample_t OPL3SAMPLE;
+typedef s32 OPL3SAMPLE;
/*
#if (OPL3_SAMPLE_BITS==16)
typedef int16_t OPL3SAMPLE;