summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/tiasound.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2025-04-14 11:31:53 +0200
committer Olivier Galibert <galibert@pobox.com>2025-04-27 22:23:20 +0200
commitd0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 (patch)
treebe35c94340442af08c316a8679089ee68e119fac /src/devices/sound/tiasound.cpp
parentec636faeba5c5841c5a4a35b7c9dc2f06a00f538 (diff)
New sound infrastructure.
Should be added soon: - mute - speaker/microphone resampling To be added a little later: - compression - reverb Needs to be added by someone else: - coreaudio - direct - portaudio - xaudio2 - js
Diffstat (limited to 'src/devices/sound/tiasound.cpp')
-rw-r--r--src/devices/sound/tiasound.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/sound/tiasound.cpp b/src/devices/sound/tiasound.cpp
index 87fa657bfab..31679c71efb 100644
--- a/src/devices/sound/tiasound.cpp
+++ b/src/devices/sound/tiasound.cpp
@@ -314,7 +314,7 @@ void tia_write(void *chip, offs_t offset, uint8_t data)
/* */
/*****************************************************************************/
-void tia_process(void *_chip, write_stream_view &buffer)
+void tia_process(void *_chip, sound_stream &stream)
{
tia *chip = (tia *)_chip;
uint8_t audc0, audc1;
@@ -336,7 +336,7 @@ void tia_process(void *_chip, write_stream_view &buffer)
div_n_cnt1 = chip->Div_n_cnt[1];
/* loop until the buffer is filled */
- for (int sampindex = 0; sampindex < buffer.samples(); )
+ for (int sampindex = 0; sampindex < stream.samples(); )
{
/* Process channel 0 */
if (div_n_cnt0 > 1)
@@ -532,7 +532,7 @@ void tia_process(void *_chip, write_stream_view &buffer)
chip->Samp_n_cnt += chip->Samp_n_max;
/* calculate the latest output value and place in buffer */
- buffer.put_int(sampindex++, outvol_0 + outvol_1, 32768);
+ stream.put_int(0, sampindex++, outvol_0 + outvol_1, 32768);
}
}
else
@@ -543,9 +543,9 @@ void tia_process(void *_chip, write_stream_view &buffer)
* byte contains the fractional part */
chip->Samp_n_cnt -= 256;
/* calculate the latest output value and place in buffer */
- buffer.put_int(sampindex++, outvol_0 + outvol_1, 32768);
+ stream.put_int(0, sampindex++, outvol_0 + outvol_1, 32768);
}
- while ((chip->Samp_n_cnt >= 256) && (sampindex < buffer.samples()));
+ while ((chip->Samp_n_cnt >= 256) && (sampindex < stream.samples()));
/* adjust the sample counter if necessary */
if (chip->Samp_n_cnt < 256)