summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/tms36xx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/tms36xx.cpp')
-rw-r--r--src/devices/sound/tms36xx.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/devices/sound/tms36xx.cpp b/src/devices/sound/tms36xx.cpp
index 54ec071dfa8..e969987d129 100644
--- a/src/devices/sound/tms36xx.cpp
+++ b/src/devices/sound/tms36xx.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "tms36xx.h"
-#define VERBOSE 1
+//#define VERBOSE 1
#include "logmacro.h"
@@ -397,20 +397,15 @@ void tms36xx_device::device_start()
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void tms36xx_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void tms36xx_device::sound_stream_update(sound_stream &stream)
{
int samplerate = m_samplerate;
- stream_sample_t *buffer = outputs[0];
/* no tune played? */
if( !tunes[m_tune_num] || m_voices == 0 )
- {
- while (--samples >= 0)
- buffer[samples] = 0;
return;
- }
- while( samples-- > 0 )
+ for (int sampindex = 0; sampindex < stream.samples(); sampindex++)
{
int sum = 0;
@@ -444,7 +439,7 @@ void tms36xx_device::sound_stream_update(sound_stream &stream, stream_sample_t *
TONE( 0) TONE( 1) TONE( 2) TONE( 3) TONE( 4) TONE( 5)
TONE( 6) TONE( 7) TONE( 8) TONE( 9) TONE(10) TONE(11)
- *buffer++ = sum / m_voices;
+ stream.put_int(0, sampindex, sum, 32768 * m_voices);
}
}