summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/disound.cpp
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2020-09-17 00:45:29 -0700
committer Aaron Giles <aaron@aarongiles.com>2020-09-17 00:46:06 -0700
commitdc0ede3c90717ed25de0695c555b861f06344f18 (patch)
treecbc28d80cb2ebe963a3b068148aa78e4ebdaa6ce /src/emu/disound.cpp
parent4118f19c48ceaa71c1aa6ab8b1a34e8907c98563 (diff)
sound: Improved view interfaces to match usage patterns
* read/write_stream_views now have an internal index * get/put/add/fill/copy now implicitly use and advance this index * new method reset() can (re)set the internal index * new method done() checks if index is past the end * new method remaining() indicates how many samples remain * get_indexed/put_indexed/etc available for random access * updated all consumers to new interfaces
Diffstat (limited to 'src/emu/disound.cpp')
-rw-r--r--src/emu/disound.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp
index 29d8b4e13b5..1e7be43b32f 100644
--- a/src/emu/disound.cpp
+++ b/src/emu/disound.cpp
@@ -512,9 +512,9 @@ void device_mixer_interface::sound_stream_update(sound_stream &stream, std::vect
int outputnum = m_outputmap[inputnum];
auto &output = outputs[outputnum];
if (!m_output_clear[outputnum])
- output.copy(input);
+ output.copy_indexed(0, input);
else
- output.add(input);
+ output.add_indexed(0, input);
m_output_clear[outputnum] = true;
}
@@ -522,5 +522,5 @@ void device_mixer_interface::sound_stream_update(sound_stream &stream, std::vect
// clear anything unused
for (int outputnum = 0; outputnum < m_outputs; outputnum++)
if (!m_output_clear[outputnum])
- outputs[outputnum].fill(0);
+ outputs[outputnum].fill_indexed(0, 0);
}