summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/sound.cpp')
-rw-r--r--src/emu/sound.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp
index 696742a87e2..a08ede3f471 100644
--- a/src/emu/sound.cpp
+++ b/src/emu/sound.cpp
@@ -38,7 +38,7 @@
#define LOG_OSD_STREAMS (1U << 3)
#define LOG_ORDER (1U << 4)
-#define VERBOSE -1
+#define VERBOSE 0
#include "logmacro.h"
@@ -498,12 +498,12 @@ u64 sound_stream::get_current_sample_index() const
void sound_stream::update()
{
- if(!is_active() || m_in_update)
+ if(!is_active() || m_in_update || m_device.machine().phase() <= machine_phase::RESET)
return;
// Find out where we are and how much we have to do
u64 idx = get_current_sample_index();
- m_samples_to_update = idx - m_output_buffer.write_sample();
+ m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1
if(m_samples_to_update > 0) {
m_in_update = true;
@@ -520,12 +520,12 @@ void sound_stream::update()
void sound_stream::update_nodeps()
{
- if(!is_active() || m_in_update)
+ if(!is_active() || m_in_update || m_device.machine().phase() <= machine_phase::RESET)
return;
// Find out where we are and how much we have to do
u64 idx = get_current_sample_index();
- m_samples_to_update = idx - m_output_buffer.write_sample();
+ m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1
if(m_samples_to_update > 0) {
m_in_update = true;
@@ -859,7 +859,7 @@ void sound_manager::after_devices_init()
void sound_manager::input_get(int id, sound_stream &stream)
{
u32 samples = stream.samples();
- u64 end_pos = stream.sample_index();
+ u64 end_pos = stream.end_index();
u32 skip = stream.output_count();
for(const auto &step : m_microphones[id].m_input_mixing_steps) {