diff options
Diffstat (limited to 'src')
34 files changed, 106 insertions, 105 deletions
diff --git a/src/devices/bus/a2bus/a2mockingboard.cpp b/src/devices/bus/a2bus/a2mockingboard.cpp index 635ceb980f0..dbe2463a4a8 100644 --- a/src/devices/bus/a2bus/a2mockingboard.cpp +++ b/src/devices/bus/a2bus/a2mockingboard.cpp @@ -194,7 +194,7 @@ void a2bus_phasor_device::device_add_mconfig(machine_config &config) m_via1->writepb_handler().set(FUNC(a2bus_phasor_device::via1_out_b)); m_via2->writepb_handler().set(FUNC(a2bus_phasor_device::via2_out_b)); - SPEAKER(config, "speaker2").front(); + SPEAKER(config, "speaker2", 2).front(); m_ay2->reset_routes().add_route(ALL_OUTPUTS, "speaker2", 0.5, 0); diff --git a/src/devices/bus/coco/coco_stecomp.cpp b/src/devices/bus/coco/coco_stecomp.cpp index 93b4b63908b..dc895555418 100644 --- a/src/devices/bus/coco/coco_stecomp.cpp +++ b/src/devices/bus/coco/coco_stecomp.cpp @@ -68,7 +68,7 @@ namespace void coco_stereo_composer_device::device_add_mconfig(machine_config &config) { - SPEAKER(config, "sc_speaker").front(); + SPEAKER(config, "sc_speaker", 2).front(); DAC_8BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "sc_speaker", 0.5, 0); DAC_8BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "sc_speaker", 0.5, 1); diff --git a/src/devices/bus/st/replay.cpp b/src/devices/bus/st/replay.cpp index f7df23a2dcc..15dc3aacf97 100644 --- a/src/devices/bus/st/replay.cpp +++ b/src/devices/bus/st/replay.cpp @@ -40,7 +40,6 @@ private: void cartmap(address_map &map) ATTR_COLD; u16 dac_w(offs_t data); - u8 adc_r(); }; st_replay_device::st_replay_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : @@ -63,13 +62,6 @@ u16 st_replay_device::dac_w(offs_t data) return 0xffff; } -u8 st_replay_device::adc_r() -{ - double tm = machine().time().as_double(); - s8 level = 127 * sin(tm*440*2*M_PI); - return level + 0x80; -} - void st_replay_device::map(address_space_installer &space) { space.install_device(0xfa0000, 0xfbffff, *this, &st_replay_device::cartmap); diff --git a/src/devices/machine/acorn_vidc.cpp b/src/devices/machine/acorn_vidc.cpp index daeb50d8ea3..dd6137c75b9 100644 --- a/src/devices/machine/acorn_vidc.cpp +++ b/src/devices/machine/acorn_vidc.cpp @@ -109,7 +109,7 @@ device_memory_interface::space_config_vector acorn_vidc10_device::memory_space_c void acorn_vidc10_device::device_add_mconfig(machine_config &config) { - SPEAKER(config, m_speaker).front(); + SPEAKER(config, m_speaker, 2).front(); for (int i = 0; i < m_sound_max_channels; i++) { // custom DAC diff --git a/src/devices/machine/vrender0.cpp b/src/devices/machine/vrender0.cpp index 2fe339a083a..34ba7fb31bb 100644 --- a/src/devices/machine/vrender0.cpp +++ b/src/devices/machine/vrender0.cpp @@ -134,7 +134,7 @@ void vrender0soc_device::device_add_mconfig(machine_config &config) PALETTE(config, m_palette, palette_device::RGB_565); - SPEAKER(config, m_speaker).front(); + SPEAKER(config, m_speaker, 2).front(); SOUND_VRENDER0(config, m_vr0snd, DERIVED_CLOCK(1,1)); // Correct? m_vr0snd->set_addrmap(vr0sound_device::AS_TEXTURE, &vrender0soc_device::texture_map); diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 0b403ae0477..859e6b4506f 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -333,9 +333,12 @@ int running_machine::run(bool quiet) // execute CPUs if not paused if (!m_paused) m_scheduler.timeslice(); - // otherwise, just pump video updates through + // otherwise, just pump video updates and sound mapping updates through else + { m_video->frame_update(); + sound().mapping_update(); + } // handle save/load if (m_saveload_schedule != saveload_schedule::NONE) diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 2cad8289f80..5fabc513662 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -281,6 +281,7 @@ sound_stream::sound_stream(device_t &device, u32 inputs, u32 outputs, u32 sample m_output_adaptive(sample_rate == SAMPLE_RATE_OUTPUT_ADAPTIVE || sample_rate == SAMPLE_RATE_ADAPTIVE), m_synchronous((flags & STREAM_SYNCHRONOUS) != 0), m_started(false), + m_in_update(false), m_sync_timer(nullptr), m_callback(std::move(callback)) { @@ -498,26 +499,28 @@ u64 sound_stream::get_current_sample_index() const void sound_stream::update() { - if(!is_active()) + if(!is_active() || m_in_update) 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(); - if(m_samples_to_update <= 0) return; + m_in_update = true; + // If there's anything to do, well, do it, starting with the dependencies for(auto &stream : m_dependant_streams) stream->update_nodeps(); do_update(); + m_in_update = false; } void sound_stream::update_nodeps() { - if(!is_active()) + if(!is_active() || m_in_update) return; // Find out where we are and how much we have to do @@ -526,8 +529,11 @@ void sound_stream::update_nodeps() if(m_samples_to_update <= 0) return; + m_in_update = true; + // If there's anything to do, well, do it do_update(); + m_in_update = false; } void sound_stream::create_resamplers() diff --git a/src/emu/sound.h b/src/emu/sound.h index bca66c88a7c..3b30a58dc66 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -356,6 +356,7 @@ private: bool m_output_adaptive; // adaptive stream that runs at the sample rate of its output bool m_synchronous; // synchronous stream that runs at the rate of its input bool m_started; + bool m_in_update; emu_timer *m_sync_timer; // update timer for synchronous streams // callback information @@ -463,6 +464,8 @@ public: std::vector<audio_effect *> default_effect_chain() const; void default_effect_changed(u32 entry); + void mapping_update(); + private: struct effect_step { std::unique_ptr<audio_effect> m_effect; @@ -574,7 +577,6 @@ private: // handle mixing mapping update if needed static std::vector<u32> find_channel_mapping(const std::array<double, 3> &position, const osd::audio_info::node_info *node); void startup_cleanups(); - void mapping_update(); void streams_update(); template<bool is_output, typename S> void apply_osd_changes(std::vector<S> &streams); void osd_information_update(); diff --git a/src/emu/speaker.cpp b/src/emu/speaker.cpp index bcfd5609d5e..d57f9119c24 100644 --- a/src/emu/speaker.cpp +++ b/src/emu/speaker.cpp @@ -44,6 +44,8 @@ std::string sound_io_device::get_position_name(u32 channel) const sound_io_device &sound_io_device::set_position(u32 channel, double x, double y, double z) { + if(channel >= m_positions.size()) + fatalerror("%s: Requested channel %d on %d channel device\n", tag(), channel, m_positions.size()); m_positions[channel][0] = x; m_positions[channel][1] = y; m_positions[channel][2] = z; diff --git a/src/mame/alesis/alesis_a.cpp b/src/mame/alesis/alesis_a.cpp index 27d8c6231e4..5495a71e74c 100644 --- a/src/mame/alesis/alesis_a.cpp +++ b/src/mame/alesis/alesis_a.cpp @@ -47,8 +47,8 @@ alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const ch void alesis_dm3ag_device::device_add_mconfig(machine_config &config) { - SPEAKER(config, "speaker1").front(); - SPEAKER(config, "speaker2").front(); + SPEAKER(config, "speaker1", 2).front(); + SPEAKER(config, "speaker2", 2).front(); PCM54HP(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker1", 1.0, 0).add_route(ALL_OUTPUTS, "speaker1", 1.0, 1); // PCM54HP DAC + R63/R73-75 + Sample and hold } diff --git a/src/mame/apple/apple2gs.cpp b/src/mame/apple/apple2gs.cpp index 4eb4c1bd43a..94df9d333ab 100644 --- a/src/mame/apple/apple2gs.cpp +++ b/src/mame/apple/apple2gs.cpp @@ -136,7 +136,7 @@ public: m_a2common(*this, "a2common"), // m_a2host(*this, "a2host"), m_gameio(*this, "gameio"), - m_speaker(*this, "speaker"), + m_speaker(*this, "speaker_sound"), m_upperbank(*this, A2GS_UPPERBANK_TAG), m_upperaux(*this, A2GS_AUXUPPER_TAG), m_upper00(*this, A2GS_00UPPER_TAG), diff --git a/src/mame/apple/mac128.cpp b/src/mame/apple/mac128.cpp index c06f9eee942..5470aae73b1 100644 --- a/src/mame/apple/mac128.cpp +++ b/src/mame/apple/mac128.cpp @@ -1161,7 +1161,7 @@ void mac128_state::macplus(machine_config &config) // SCSI bus and devices // These machines were strictly external CD-ROMs so sound didn't route back into them; the AppleCD SC had // RCA jacks for connection to speakers/a stereo. - SPEAKER(config, "speaker", 2).front(); + SPEAKER(config, "speakers", 2).front(); NSCSI_BUS(config, m_scsibus); NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr); @@ -1170,8 +1170,8 @@ void mac128_state::macplus(machine_config &config) NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config( [](device_t *device) { - device->subdevice<cdda_device>("cdda")->add_route(0, "^^speaker", 1.0, 0); - device->subdevice<cdda_device>("cdda")->add_route(1, "^^speaker", 1.0, 1); + device->subdevice<cdda_device>("cdda")->add_route(0, "^^speakers", 1.0, 0); + device->subdevice<cdda_device>("cdda")->add_route(1, "^^speakers", 1.0, 1); }); NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr); NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr); diff --git a/src/mame/atari/atarigt.cpp b/src/mame/atari/atarigt.cpp index 6199a3bef05..98275fc6fbb 100644 --- a/src/mame/atari/atarigt.cpp +++ b/src/mame/atari/atarigt.cpp @@ -924,7 +924,7 @@ void atarigt_state::tmek(machine_config &config) m_adc->in_callback<7>().set_ioport("AN3"); // 5 Channel output (4 Channel input connected to Quad Amp PCB) - SPEAKER(config, "speaker").front_left().headrest_left(2).headrest_right(3); + SPEAKER(config, "speaker", 4).front().headrest_left(2).headrest_right(3); //SPEAKER(config, "subwoofer").seat(); Not implemented, Quad Amp PCB output; m_cage->set_speedup(0x4fad); diff --git a/src/mame/atari/metalmx.cpp b/src/mame/atari/metalmx.cpp index aba61fe4add..ee18f1fcc12 100644 --- a/src/mame/atari/metalmx.cpp +++ b/src/mame/atari/metalmx.cpp @@ -760,7 +760,7 @@ void metalmx_state::metalmx(machine_config &config) // TODO: copied from atarigt.cpp; Same configurations as T-Mek? // 5 Channel output (4 Channel input connected to Quad Amp PCB) - SPEAKER(config, "speaker").front().headrest_left(2).headrest_right(3); + SPEAKER(config, "speaker", 4).front().headrest_left(2).headrest_right(3); //SPEAKER(config, "subwoofer").seat(); Not implemented, Quad Amp PCB output; ATARI_CAGE(config, m_cage, 0); diff --git a/src/mame/cinematronics/dlair.cpp b/src/mame/cinematronics/dlair.cpp index 187ff0e85a2..dad18ed8851 100644 --- a/src/mame/cinematronics/dlair.cpp +++ b/src/mame/cinematronics/dlair.cpp @@ -65,7 +65,7 @@ public: dlair_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), + m_speaker(*this, "speaker_sound"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), m_ldv1000(*this, "ld_ldv1000"), diff --git a/src/mame/fujitsu/fmtowns.h b/src/mame/fujitsu/fmtowns.h index 90cc3861eee..f498c467bf8 100644 --- a/src/mame/fujitsu/fmtowns.h +++ b/src/mame/fujitsu/fmtowns.h @@ -102,7 +102,7 @@ public: , m_scsi(*this, "fmscsi") , m_flop(*this, "fdc:%u", 0U) , m_pad_ports(*this, "pad%u", 1U) - , m_speaker(*this, "speaker") + , m_speaker(*this, "speaker_sound") , m_pic_master(*this, "pic8259_master") , m_pic_slave(*this, "pic8259_slave") , m_pit(*this, "pit") diff --git a/src/mame/konami/viper.cpp b/src/mame/konami/viper.cpp index f2dee32f546..1bbfaf15433 100644 --- a/src/mame/konami/viper.cpp +++ b/src/mame/konami/viper.cpp @@ -2629,7 +2629,7 @@ void viper_state::viper_fullbody(machine_config &config) { viper(config); config.device_remove("speaker"); - SPEAKER(config, "speaker").front_center(0).rear_center(1); + SPEAKER(config, "speaker", 2).front_center(0).rear_center(1); DMADAC(config.replace(), "dacl").add_route(ALL_OUTPUTS, "speaker", 1.0, 0); DMADAC(config.replace(), "dacr").add_route(ALL_OUTPUTS, "speaker", 1.0, 1); } diff --git a/src/mame/misc/mindset.cpp b/src/mame/misc/mindset.cpp index 24a3961d341..8ac5ae2fc90 100644 --- a/src/mame/misc/mindset.cpp +++ b/src/mame/misc/mindset.cpp @@ -245,7 +245,7 @@ void mindset_sound_module::device_add_mconfig(machine_config &config) I8042(config, m_soundcpu, 12_MHz_XTAL/2); m_soundcpu->p1_out_cb().set(FUNC(mindset_sound_module::p1_w)); m_soundcpu->p2_out_cb().set(FUNC(mindset_sound_module::p2_w)); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5, 1); + DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, ":speaker", 0.5, 1); } diff --git a/src/mame/misc/policetr.cpp b/src/mame/misc/policetr.cpp index 97e96d6e2cd..68b66dda0f0 100644 --- a/src/mame/misc/policetr.cpp +++ b/src/mame/misc/policetr.cpp @@ -452,7 +452,7 @@ void policetr_state::policetr(machine_config &config) BT481(config, m_ramdac, 0); // Bt481AKPJ110 /* sound hardware */ - SPEAKER(config, m_speaker).front(); + SPEAKER(config, m_speaker, 2).front(); BSMT2000(config, m_bsmt, MASTER_CLOCK/2); m_bsmt->add_route(0, *m_speaker, 1.0, 0); diff --git a/src/mame/misc/vocalizer.cpp b/src/mame/misc/vocalizer.cpp index a7afd365fcd..2ee04be9816 100644 --- a/src/mame/misc/vocalizer.cpp +++ b/src/mame/misc/vocalizer.cpp @@ -532,7 +532,7 @@ void vocalizer_state::vocalizer(machine_config &config) if (i <= 8) m_es5503->add_route(i, "speaker", 1.0, 0); else if (i < 15) - m_es5503->add_route(i, "speaker", (15 - i, 0) / 7.0); + m_es5503->add_route(i, "speaker", (15 - i) / 7.0, 0); if (i >= 8) m_es5503->add_route(i, "speaker", 1.0, 1); diff --git a/src/mame/nec/pc8801.cpp b/src/mame/nec/pc8801.cpp index ef12be03b27..e8897c219e0 100644 --- a/src/mame/nec/pc8801.cpp +++ b/src/mame/nec/pc8801.cpp @@ -1706,7 +1706,7 @@ void pc8801_state::pc8801(machine_config &config) // Note: original models up to OPNA variants really have an internal mono speaker, // but user eventually can have a stereo mixing audio card mounted so for simplicity we MCM here. - SPEAKER(config, m_speaker).front(); + SPEAKER(config, m_speaker, 2).front(); // TODO: DAC_1BIT // 2400 Hz according to schematics, unaffected by clock speed setting (confirmed on real HW) diff --git a/src/mame/nec/pc88va.cpp b/src/mame/nec/pc88va.cpp index bef7285dd8a..bbf0b598dc4 100644 --- a/src/mame/nec/pc88va.cpp +++ b/src/mame/nec/pc88va.cpp @@ -1503,7 +1503,7 @@ void pc88va_state::pc88va(machine_config &config) MSX_GENERAL_PURPOSE_PORT(config, m_mouse_port, msx_general_purpose_port_devices, "joystick"); - SPEAKER(config, m_speaker).front(); + SPEAKER(config, m_speaker, 2).front(); // TODO: YM2203 for vanilla pc88va // PC-88VA-12 "Sound Board II", YM2608B diff --git a/src/mame/sinclair/chloe.cpp b/src/mame/sinclair/chloe.cpp index 03f7a44fdb1..0aed814cd92 100644 --- a/src/mame/sinclair/chloe.cpp +++ b/src/mame/sinclair/chloe.cpp @@ -955,23 +955,23 @@ void chloe_state::chloe(machine_config &config) PALETTE(config, m_palette, FUNC(chloe_state::spectrum_palette), 256); SCREEN_ULA_PLUS(config, m_ula, 0).set_raster_offset(SCR_256x192.left(), SCR_256x192.top()).set_palette(m_palette->device().tag(), 0x000, 0x000); - SPEAKER(config, "speaker", 2).front(); + SPEAKER(config, "speaker2", 2).front(); config.device_remove("ay8912"); AY8912(config, m_ay[0], 28_MHz_XTAL / 16) - .add_route(0, "speaker", 0.50, 0) - .add_route(2, "speaker", 0.25, 0) - .add_route(2, "speaker", 0.25, 1) - .add_route(1, "speaker", 0.50, 1); + .add_route(0, "speaker2", 0.50, 0) + .add_route(2, "speaker2", 0.25, 0) + .add_route(2, "speaker2", 0.25, 1) + .add_route(1, "speaker2", 0.50, 1); AY8912(config, m_ay[1], 28_MHz_XTAL / 16) - .add_route(0, "speaker", 0.50, 0) - .add_route(2, "speaker", 0.25, 0) - .add_route(2, "speaker", 0.25, 1) - .add_route(1, "speaker", 0.50, 1); + .add_route(0, "speaker2", 0.50, 0) + .add_route(2, "speaker2", 0.25, 0) + .add_route(2, "speaker2", 0.25, 1) + .add_route(1, "speaker2", 0.50, 1); DAC_8BIT_R2R(config, m_covox, 0) - .add_route(ALL_OUTPUTS, "speaker", 0.75, 0) - .add_route(ALL_OUTPUTS, "speaker", 0.75, 1); + .add_route(ALL_OUTPUTS, "speaker2", 0.75, 0) + .add_route(ALL_OUTPUTS, "speaker2", 0.75, 1); KBDC8042(config, m_kbdc); m_kbdc->set_keyboard_type(kbdc8042_device::KBDC8042_STANDARD); diff --git a/src/mame/sinclair/pentagon.cpp b/src/mame/sinclair/pentagon.cpp index ec529442e6f..b3eb756e59c 100644 --- a/src/mame/sinclair/pentagon.cpp +++ b/src/mame/sinclair/pentagon.cpp @@ -203,13 +203,13 @@ void pentagon_state::pentagon(machine_config &config) BETA_DISK(config, m_beta, 0); - SPEAKER(config, "speaker", 2).front(); + SPEAKER(config, "speakers", 2).front(); ay8912_device &ay8912(AY8912(config.replace(), "ay8912", 14_MHz_XTAL / 8)); - ay8912.add_route(0, "speaker", 0.50, 0); - ay8912.add_route(1, "speaker", 0.25, 0); - ay8912.add_route(1, "speaker", 0.25, 1); - ay8912.add_route(2, "speaker", 0.50, 1); + ay8912.add_route(0, "speakers", 0.50, 0); + ay8912.add_route(1, "speakers", 0.25, 0); + ay8912.add_route(1, "speakers", 0.25, 1); + ay8912.add_route(2, "speakers", 0.50, 1); config.device_remove("exp"); diff --git a/src/mame/sinclair/pentevo.cpp b/src/mame/sinclair/pentevo.cpp index e77dc02efc5..f4597e478df 100644 --- a/src/mame/sinclair/pentevo.cpp +++ b/src/mame/sinclair/pentevo.cpp @@ -768,19 +768,19 @@ void pentevo_state::pentevo(machine_config &config) m_sdcard->set_prefer_sdhc(); m_sdcard->spi_miso_callback().set(FUNC(pentevo_state::spi_miso_w)); - SPEAKER(config, "speaker", 2).front(); + SPEAKER(config, "speakers", 2).front(); config.device_remove("ay8912"); YM2149(config, m_ay[0], 14_MHz_XTAL / 8) - .add_route(0, "speaker", 0.50, 0) - .add_route(1, "speaker", 0.25, 0) - .add_route(1, "speaker", 0.25, 1) - .add_route(2, "speaker", 0.50, 1); + .add_route(0, "speakers", 0.50, 0) + .add_route(1, "speakers", 0.25, 0) + .add_route(1, "speakers", 0.25, 1) + .add_route(2, "speakers", 0.50, 1); YM2149(config, m_ay[1], 14_MHz_XTAL / 8) - .add_route(0, "speaker", 0.50, 0) - .add_route(1, "speaker", 0.25, 0) - .add_route(1, "speaker", 0.25, 1) - .add_route(2, "speaker", 0.50, 1); + .add_route(0, "speakers", 0.50, 0) + .add_route(1, "speakers", 0.25, 0) + .add_route(1, "speakers", 0.25, 1) + .add_route(2, "speakers", 0.50, 1); AT_KEYB(config, m_keyboard, pc_keyboard_device::KEYBOARD_TYPE::AT, 3); diff --git a/src/mame/sinclair/scorpion.cpp b/src/mame/sinclair/scorpion.cpp index ce568a30a33..2563675abf0 100644 --- a/src/mame/sinclair/scorpion.cpp +++ b/src/mame/sinclair/scorpion.cpp @@ -509,18 +509,18 @@ void scorpion_state::scorpion(machine_config &config) subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_scorpion); - SPEAKER(config, "speaker", 2).front(); + SPEAKER(config, "speaker2", 2).front(); AY8912(config, m_ay[0], 14_MHz_XTAL / 8) // BAC - .add_route(1, "speaker", 0.50, 0) - .add_route(0, "speaker", 0.25, 0) - .add_route(0, "speaker", 0.25, 1) - .add_route(2, "speaker", 0.50, 1); + .add_route(1, "speaker2", 0.50, 0) + .add_route(0, "speaker2", 0.25, 0) + .add_route(0, "speaker2", 0.25, 1) + .add_route(2, "speaker2", 0.50, 1); AY8912(config, m_ay[1], 14_MHz_XTAL / 8) - .add_route(1, "speaker", 0.50, 0) - .add_route(0, "speaker", 0.25, 0) - .add_route(0, "speaker", 0.25, 1) - .add_route(2, "speaker", 0.50, 1); + .add_route(1, "speaker2", 0.50, 0) + .add_route(0, "speaker2", 0.25, 0) + .add_route(0, "speaker2", 0.25, 1) + .add_route(2, "speaker2", 0.50, 1); BETA_DISK(config, m_beta, 0); diff --git a/src/mame/sinclair/specnext.cpp b/src/mame/sinclair/specnext.cpp index 12af744711b..623bf6a41b9 100644 --- a/src/mame/sinclair/specnext.cpp +++ b/src/mame/sinclair/specnext.cpp @@ -3467,21 +3467,21 @@ void specnext_state::tbblue(machine_config &config) m_sdcard->set_prefer_sdhc(); m_sdcard->spi_miso_callback().set(FUNC(specnext_state::spi_miso_w)); - SPEAKER(config, "speaker", 2).front(); + SPEAKER(config, "speakers", 2).front(); - DAC_8BIT_R2R(config, m_dac[0], 0).add_route(ALL_OUTPUTS, "speaker", 0.75, 0); - DAC_8BIT_R2R(config, m_dac[1], 0).add_route(ALL_OUTPUTS, "speaker", 0.75, 0); - DAC_8BIT_R2R(config, m_dac[2], 0).add_route(ALL_OUTPUTS, "speaker", 0.75, 1); - DAC_8BIT_R2R(config, m_dac[3], 0).add_route(ALL_OUTPUTS, "speaker", 0.75, 1); + DAC_8BIT_R2R(config, m_dac[0], 0).add_route(ALL_OUTPUTS, "speakers", 0.75, 0); + DAC_8BIT_R2R(config, m_dac[1], 0).add_route(ALL_OUTPUTS, "speakers", 0.75, 0); + DAC_8BIT_R2R(config, m_dac[2], 0).add_route(ALL_OUTPUTS, "speakers", 0.75, 1); + DAC_8BIT_R2R(config, m_dac[3], 0).add_route(ALL_OUTPUTS, "speakers", 0.75, 1); config.device_remove("ay8912"); for (auto i = 0; i < 3; ++i) { YM2149(config, m_ay[i], 14_MHz_XTAL / 8) - .add_route(0, "speaker", 0.50, 0) - .add_route(1, "speaker", 0.25, 0) - .add_route(1, "speaker", 0.25, 1) - .add_route(2, "speaker", 0.50, 1); + .add_route(0, "speakers", 0.50, 0) + .add_route(1, "speakers", 0.25, 0) + .add_route(1, "speakers", 0.25, 1) + .add_route(2, "speakers", 0.50, 1); } SPECNEXT_MULTIFACE(config, m_mf, 0); diff --git a/src/mame/sinclair/sprinter.cpp b/src/mame/sinclair/sprinter.cpp index 6d431614c2f..d15933896b4 100644 --- a/src/mame/sinclair/sprinter.cpp +++ b/src/mame/sinclair/sprinter.cpp @@ -1933,16 +1933,16 @@ void sprinter_state::sprinter(machine_config &config) m_maincpu->zc_callback<0>().append(m_maincpu, FUNC(z84c015_device::txcb_w)); m_maincpu->zc_callback<2>().set(m_maincpu, FUNC(z84c015_device::trg3)); - SPEAKER(config, "speaker", 2).front(); + SPEAKER(config, "speakers", 2).front(); ay8910_device &ay8910(AY8910(config.replace(), "ay8912", X_SP / 24)); - ay8910.add_route(0, "speaker", 0.50, 0); - ay8910.add_route(1, "speaker", 0.25, 0); - ay8910.add_route(1, "speaker", 0.25, 1); - ay8910.add_route(2, "speaker", 0.50, 1); + ay8910.add_route(0, "speakers", 0.50, 0); + ay8910.add_route(1, "speakers", 0.25, 0); + ay8910.add_route(1, "speakers", 0.25, 1); + ay8910.add_route(2, "speakers", 0.50, 1); - DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5, 0); - DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5, 1); + DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "speakers", 0.5, 0); + DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "speakers", 0.5, 1); subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_sprinter); } diff --git a/src/mame/sinclair/tsconf.cpp b/src/mame/sinclair/tsconf.cpp index 7321e147334..28f2b5a54a6 100644 --- a/src/mame/sinclair/tsconf.cpp +++ b/src/mame/sinclair/tsconf.cpp @@ -299,23 +299,19 @@ void tsconf_state::tsconf(machine_config &config) m_dma->on_ready_callback().set(FUNC(tsconf_state::dma_ready)); BETA_DISK(config, m_beta, 0); - SPEAKER(config, "speaker", 2).front(); - - SPI_SDCARD(config, m_sdcard, 0); - m_sdcard->set_prefer_sdhc(); - m_sdcard->spi_miso_callback().set(FUNC(tsconf_state::tsconf_spi_miso_w)); + SPEAKER(config, "speakers", 2).front(); config.device_remove("ay8912"); YM2149(config, m_ay[0], 14_MHz_XTAL / 8) - .add_route(0, "speaker", 0.50, 0) - .add_route(1, "speaker", 0.25, 0) - .add_route(1, "speaker", 0.25, 1) - .add_route(2, "speaker", 0.50, 1); + .add_route(0, "speakers", 0.50, 0) + .add_route(1, "speakers", 0.25, 0) + .add_route(1, "speakers", 0.25, 1) + .add_route(2, "speakers", 0.50, 1); YM2149(config, m_ay[1], 14_MHz_XTAL / 8) - .add_route(0, "speaker", 0.50, 0) - .add_route(1, "speaker", 0.25, 0) - .add_route(1, "speaker", 0.25, 1) - .add_route(2, "speaker", 0.50, 1); + .add_route(0, "speakers", 0.50, 0) + .add_route(1, "speakers", 0.25, 0) + .add_route(1, "speakers", 0.25, 1) + .add_route(2, "speakers", 0.50, 1); DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.75);; diff --git a/src/mame/sony/zn.cpp b/src/mame/sony/zn.cpp index 66d335c9749..2e4efe7fcd4 100644 --- a/src/mame/sony/zn.cpp +++ b/src/mame/sony/zn.cpp @@ -108,7 +108,7 @@ void zn_state::zn_base(machine_config &config) m_spu->add_route(0, m_speaker, 0.35, 0); m_spu->add_route(1, m_speaker, 0.35, 1); - SPEAKER(config, m_speaker).front(); + SPEAKER(config, m_speaker, 2).front(); AT28C16(config, m_at28c16, 0); diff --git a/src/osd/modules/sound/direct_sound.cpp b/src/osd/modules/sound/direct_sound.cpp index a00328e436a..dd931988f30 100644 --- a/src/osd/modules/sound/direct_sound.cpp +++ b/src/osd/modules/sound/direct_sound.cpp @@ -289,7 +289,7 @@ void sound_direct_sound::exit() //============================================================ -// stream_update +// stream_sink_update //============================================================ void sound_direct_sound::stream_sink_update( diff --git a/src/osd/modules/sound/js_sound.cpp b/src/osd/modules/sound/js_sound.cpp index dbf60460bd3..1473ef9de2a 100644 --- a/src/osd/modules/sound/js_sound.cpp +++ b/src/osd/modules/sound/js_sound.cpp @@ -29,7 +29,7 @@ public: // sound_module - virtual void stream_update(uint32_t, const int16_t *buffer, int samples_this_frame) + virtual void stream_sink_update(uint32_t, const int16_t *buffer, int samples_this_frame) { EM_ASM_ARGS( { diff --git a/src/osd/modules/sound/js_sound.js b/src/osd/modules/sound/js_sound.js index 81ad07dcef1..25f19231ae9 100644 --- a/src/osd/modules/sound/js_sound.js +++ b/src/osd/modules/sound/js_sound.js @@ -98,7 +98,7 @@ function disconnect_old_event() { eventNode = null; }; -function stream_update ( +function stream_sink_update ( pBuffer, // pointer into emscripten heap. int16 samples samples_this_frame // int. number of samples at pBuffer address. ) { @@ -184,12 +184,12 @@ function sample_count() { } return { - stream_update: stream_update, + stream_sink_update: stream_sink_update, get_context: get_context, sample_count: sample_count }; })(); -window.jsmame_stream_update = jsmame_web_audio.stream_update; +window.jsmame_stream_sink_update = jsmame_web_audio.stream_sink_update; window.jsmame_sample_count = jsmame_web_audio.sample_count; diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp index 34973c4e0cb..a865f2527fe 100644 --- a/src/osd/modules/sound/xaudio2_sound.cpp +++ b/src/osd/modules/sound/xaudio2_sound.cpp @@ -214,7 +214,7 @@ public: void exit() override; // sound_module - void stream_update(uint32_t, int16_t const *buffer, int samples_this_frame) override; + void stream_sink_update(uint32_t, int16_t const *buffer, int samples_this_frame) override; private: // Xaudio callbacks @@ -375,10 +375,10 @@ void sound_xaudio2::exit() } //============================================================ -// stream_update +// stream_sink_update //============================================================ -void sound_xaudio2::stream_update( +void sound_xaudio2::stream_sink_update( uint32_t, int16_t const *buffer, int samples_this_frame) |