diff options
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/audio_effects/eq.cpp | 3 | ||||
-rw-r--r-- | src/emu/audio_effects/filter.cpp | 3 | ||||
-rw-r--r-- | src/emu/debug/debugvw.cpp | 18 | ||||
-rw-r--r-- | src/emu/inpttype.ipp | 10 | ||||
-rw-r--r-- | src/emu/resampler.cpp | 11 |
5 files changed, 33 insertions, 12 deletions
diff --git a/src/emu/audio_effects/eq.cpp b/src/emu/audio_effects/eq.cpp index 799b2f8c9b5..c2db2680e5b 100644 --- a/src/emu/audio_effects/eq.cpp +++ b/src/emu/audio_effects/eq.cpp @@ -120,6 +120,9 @@ void audio_effect_eq::config_load(util::xml::data_node const *ef_node) } else reset_db(band); } + + for(u32 i = 0; i != BANDS; i++) + build_filter(i); } void audio_effect_eq::config_save(util::xml::data_node *ef_node) const diff --git a/src/emu/audio_effects/filter.cpp b/src/emu/audio_effects/filter.cpp index 70cf7ddc967..947f4b7af58 100644 --- a/src/emu/audio_effects/filter.cpp +++ b/src/emu/audio_effects/filter.cpp @@ -113,6 +113,9 @@ void audio_effect_filter::config_load(util::xml::data_node const *ef_node) m_isset_qh = true; } else reset_qh(); + + build_highpass(); + build_lowpass(); } void audio_effect_filter::config_save(util::xml::data_node *ef_node) const diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp index 7412ddd2f60..fe997596137 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -509,9 +509,21 @@ bool debug_view_expression::recompute() { m_parsed.parse(m_string); } - catch (expression_error &) + catch (expression_error const &) { - m_parsed.parse(oldstring); + try + { + // If we got here because the user typed in a new expression, + // then going back to the previous expression should work + m_parsed.parse(oldstring); + } + catch (expression_error const &) + { + // If that didn't work, perhaps the user switched sources + // and the previous expression doesn't evaluate with the + // new symbol table. Try "0" as last resort + m_parsed.parse("0"); + } } } @@ -528,7 +540,7 @@ bool debug_view_expression::recompute() changed = true; } } - catch (expression_error &) + catch (expression_error const &) { } } diff --git a/src/emu/inpttype.ipp b/src/emu/inpttype.ipp index c51afa8ce31..dbf1250347f 100644 --- a/src/emu/inpttype.ipp +++ b/src/emu/inpttype.ipp @@ -105,13 +105,13 @@ namespace { INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_SERVICE, N_p("input-name", "Service"), input_seq(KEYCODE_9) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_BOOK, N_p("input-name", "Book-Keeping"), input_seq(KEYCODE_0) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_DOOR, N_p("input-name", "Door"), input_seq(KEYCODE_O) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_PAYOUT, N_p("input-name", "Payout"), input_seq(KEYCODE_I) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_PAYOUT, N_p("input-name", "Payout"), input_seq(KEYCODE_4) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_BET, N_p("input-name", "Bet"), input_seq(KEYCODE_M) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_DEAL, N_p("input-name", "Deal"), input_seq(KEYCODE_2) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_STAND, N_p("input-name", "Stand"), input_seq(KEYCODE_L) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_TAKE, N_p("input-name", "Take Score"), input_seq(KEYCODE_4) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_D_UP, N_p("input-name", "Double Up"), input_seq(KEYCODE_3) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_HALF, N_p("input-name", "Half Gamble"), input_seq(KEYCODE_D) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_TAKE, N_p("input-name", "Take Score"), input_seq(KEYCODE_G) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_D_UP, N_p("input-name", "Double Up"), input_seq(KEYCODE_D) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_HALF, N_p("input-name", "Half Gamble"), input_seq(KEYCODE_F) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_HIGH, N_p("input-name", "High"), input_seq(KEYCODE_A) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_LOW, N_p("input-name", "Low"), input_seq(KEYCODE_S) ) \ CORE_INPUT_TYPES_END() @@ -187,7 +187,7 @@ namespace { INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_M, N_p("input-name", "%p Mahjong M"), input_seq(KEYCODE_M_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_N, N_p("input-name", "%p Mahjong N"), input_seq(KEYCODE_N_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_O, N_p("input-name", "%p Mahjong O"), input_seq(KEYCODE_O_INDEXED(1)) ) \ - INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_P, N_p("input-name", "%p Mahjong P"), input_seq(KEYCODE_COLON_INDEXED(1)) ) \ + INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_P, N_p("input-name", "%p Mahjong P"), input_seq(KEYCODE_P_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_Q, N_p("input-name", "%p Mahjong Q"), input_seq(KEYCODE_Q_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_KAN, N_p("input-name", "%p Mahjong Kan"), input_seq(KEYCODE_LCONTROL_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_PON, N_p("input-name", "%p Mahjong Pon"), input_seq(KEYCODE_LALT_INDEXED(1)) ) \ diff --git a/src/emu/resampler.cpp b/src/emu/resampler.cpp index 18a5d9f4a21..5c5a38eba13 100644 --- a/src/emu/resampler.cpp +++ b/src/emu/resampler.cpp @@ -376,7 +376,7 @@ audio_resampler_lofi::audio_resampler_lofi(u32 fs, u32 ft) m_ft = ft; m_source_divide = fs <= ft ? 1 : 1+fs/ft; - m_step = u64(fs) * 0x1000 / ft / m_source_divide; + m_step = u64(fs) * 0x1000000 / ft / m_source_divide; } @@ -410,6 +410,8 @@ void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> else reader = [s, count = m_source_divide]() mutable -> sample_t { sample_t sm = 0; for(u32 i=0; i != count; i++) { sm += *s++; } return sm / count; }; + phase <<= 12; + sample_t s0 = reader(); sample_t s1 = reader(); sample_t s2 = reader(); @@ -417,11 +419,12 @@ void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> sample_t *d = dest.data(); for(u32 sample = 0; sample != samples; sample++) { - *d++ += gain * (- s0 * interpolation_table[0][0x1000-phase] + s1 * interpolation_table[1][0x1000-phase] + s2 * interpolation_table[1][phase] - s3 * interpolation_table[0][phase]); + u32 cphase = phase >> 12; + *d++ += gain * (- s0 * interpolation_table[0][0x1000-cphase] + s1 * interpolation_table[1][0x1000-cphase] + s2 * interpolation_table[1][cphase] - s3 * interpolation_table[0][cphase]); phase += m_step; - if(phase & 0x1000) { - phase &= 0xfff; + if(phase & 0x1000000) { + phase &= 0xffffff; s0 = s1; s1 = s2; s2 = s3; |