Skip to content

Commit f84a027

Browse files
authored
sound/cem3394.cpp: Fixed "FREQENCY" typo and updated comments. (#14561)
1 parent 7fece3b commit f84a027

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

src/devices/sound/cem3394.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static constexpr double EXTERNAL_VOLUME = PULSE_VOLUME;
5454

5555

5656
// pulse shaping parameters
57-
// can be enabled with set_limit_pw(true)
57+
// can be enabled with configure_limit_pw(true)
5858
// examples:
5959
// hat trick - skidding ice sounds too loud if minimum width is too big
6060
// snake pit - melody during first level too soft if minimum width is too small
@@ -100,7 +100,7 @@ static constexpr double EXTERNAL_VOLUME = PULSE_VOLUME;
100100
0.0 == no resonance
101101
+2.5 == oscillation
102102
103-
FILTER_FREQENCY
103+
FILTER_FREQUENCY
104104
-3.0 ... +4.0
105105
-0.375 V/octave
106106
0.0 == 1300Hz
@@ -610,7 +610,7 @@ void cem3394_device::set_voltage_internal(int input, double voltage)
610610
break;
611611

612612
// filter frequency varies from -3.0 to +4.0, at 0.375V/octave
613-
case FILTER_FREQENCY:
613+
case FILTER_FREQUENCY:
614614
m_filter_frequency = m_filter_zero_freq * pow(2.0, -voltage * (1.0 / 0.375));
615615
LOGMASKED(LOG_CONTROL_CHANGES, "FLT_FREQ=%6.3fV -> freq=%f\n", voltage, m_filter_frequency);
616616
break;
@@ -712,7 +712,7 @@ double cem3394_device::get_parameter(int input)
712712
else
713713
return voltage * (1.0 / 2.5);
714714

715-
case FILTER_FREQENCY:
715+
case FILTER_FREQUENCY:
716716
return m_filter_zero_freq * pow(2.0, -voltage * (1.0 / 0.375));
717717
}
718718
return 0.0;

src/devices/sound/cem3394.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class cem3394_device : public device_t, public device_sound_interface
1010
{
1111
public:
1212
// inputs
13+
// Each of these CV inputs can either be specified with `set_voltage()`, or
14+
// provided via a sound stream.
1315
enum
1416
{
1517
AUDIO_INPUT = 0, // not valid for set_voltage()
@@ -19,7 +21,7 @@ class cem3394_device : public device_t, public device_sound_interface
1921
PULSE_WIDTH,
2022
MIXER_BALANCE,
2123
FILTER_RESONANCE,
22-
FILTER_FREQENCY,
24+
FILTER_FREQUENCY,
2325
FINAL_GAIN,
2426
INPUT_COUNT
2527
};
@@ -57,7 +59,7 @@ class cem3394_device : public device_t, public device_sound_interface
5759
// PULSE_WIDTH: width fraction, from 0.0 to 1.0
5860
// MIXER_BALANCE: balance, from -1.0 to 1.0
5961
// FILTER_RESONANCE: resonance, from 0.0 to 1.0
60-
// FILTER_FREQENCY: frequency, in Hz
62+
// FILTER_FREQUENCY: frequency, in Hz
6163
// FINAL_GAIN: gain, in dB
6264
// Requesting a parameter associated with a streaming input will force a
6365
// stream update.

src/mame/midway/sente6vb.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void sente6vb_device::update_counter_0_timer()
295295

296296
// if the filter resonance is high, then they're calibrating the filter frequency
297297
if (m_cem_device[i]->get_parameter(cem3394_device::FILTER_RESONANCE) > 0.9)
298-
tempfreq = m_cem_device[i]->get_parameter(cem3394_device::FILTER_FREQENCY);
298+
tempfreq = m_cem_device[i]->get_parameter(cem3394_device::FILTER_FREQUENCY);
299299

300300
// otherwise, they're calibrating the VCO frequency
301301
else
@@ -392,7 +392,7 @@ void sente6vb_device::chip_select_w(uint8_t data)
392392
cem3394_device::VCO_FREQUENCY,
393393
cem3394_device::FINAL_GAIN,
394394
cem3394_device::FILTER_RESONANCE,
395-
cem3394_device::FILTER_FREQENCY,
395+
cem3394_device::FILTER_FREQUENCY,
396396
cem3394_device::MIXER_BALANCE,
397397
cem3394_device::MODULATION_AMOUNT,
398398
cem3394_device::PULSE_WIDTH,
@@ -424,7 +424,7 @@ void sente6vb_device::chip_select_w(uint8_t data)
424424
"VCO_FREQUENCY",
425425
"FINAL_GAIN",
426426
"FILTER_RESONANCE",
427-
"FILTER_FREQENCY",
427+
"FILTER_FREQUENCY",
428428
"MIXER_BALANCE",
429429
"MODULATION_AMOUNT",
430430
"PULSE_WIDTH",

src/mame/sequential/sixtrak.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ void sixtrak_state::update_cvs()
384384
cem3394_device::VCO_FREQUENCY,
385385
cem3394_device::FINAL_GAIN,
386386
cem3394_device::FILTER_RESONANCE,
387-
cem3394_device::FILTER_FREQENCY,
387+
cem3394_device::FILTER_FREQUENCY,
388388
cem3394_device::MIXER_BALANCE,
389389
cem3394_device::MODULATION_AMOUNT,
390390
cem3394_device::PULSE_WIDTH,
@@ -609,7 +609,7 @@ void sixtrak_state::update_tuning_timer()
609609
bool tuning_filter = false;
610610
if (voice->get_parameter(cem3394_device::FILTER_RESONANCE) > 0.9)
611611
{
612-
freq = voice->get_parameter(cem3394_device::FILTER_FREQENCY);
612+
freq = voice->get_parameter(cem3394_device::FILTER_FREQUENCY);
613613
tuning_filter = true;
614614
}
615615
else
@@ -901,7 +901,7 @@ void sixtrak_state::sixtrak_common(machine_config &config, device_sound_interfac
901901
m_gain_rc[i]->add_route(0, m_voices[i], 1.0, cem3394_device::FINAL_GAIN);
902902

903903
VA_RC_EG(config, m_freq_rc[i]).set_r(RES_M(1));
904-
m_freq_rc[i]->add_route(0, m_voices[i], 1.0, cem3394_device::FILTER_FREQENCY);
904+
m_freq_rc[i]->add_route(0, m_voices[i], 1.0, cem3394_device::FILTER_FREQUENCY);
905905

906906
CEM3394(config, m_voices[i]);
907907
const double c_vco = C_VCO + C_VCO * C_VCO_JITTER[i] * 0.025; // +/- 2.5%.

0 commit comments

Comments
 (0)