GSF: Boosted GB noise channel volume and programmed a basic equalizer preset for the GB channels

CQTexperiment
Chris Moeller 2013-11-28 01:47:48 -08:00
parent 4c0a172075
commit b3d19ba78c
3 changed files with 8 additions and 5 deletions

View File

@ -27,7 +27,8 @@ int const power_mask = 0x80;
void Gb_Apu::treble_eq( blip_eq_t const& eq ) void Gb_Apu::treble_eq( blip_eq_t const& eq )
{ {
good_synth.treble_eq( eq ); good_synth.treble_eq( eq );
med_synth .treble_eq( eq ); med_synth[0].treble_eq( eq );
med_synth[1].treble_eq( eq );
} }
inline int Gb_Apu::calc_output( int osc ) const inline int Gb_Apu::calc_output( int osc ) const
@ -64,7 +65,8 @@ void Gb_Apu::synth_volume( int iv )
{ {
double v = volume_ * 0.60 / osc_count / 15 /*steps*/ / 8 /*master vol range*/ * iv; double v = volume_ * 0.60 / osc_count / 15 /*steps*/ / 8 /*master vol range*/ * iv;
good_synth.volume( v ); good_synth.volume( v );
med_synth .volume( v ); med_synth[0].volume( v );
med_synth[1].volume( v * 1.4 );
} }
void Gb_Apu::apply_volume() void Gb_Apu::apply_volume()
@ -185,7 +187,7 @@ Gb_Apu::Gb_Apu()
o.outputs [2] = 0; o.outputs [2] = 0;
o.outputs [3] = 0; o.outputs [3] = 0;
o.good_synth = &good_synth; o.good_synth = &good_synth;
o.med_synth = &med_synth; o.med_synth = (i == 3) ? &med_synth[1] : &med_synth[0];
} }
reduce_clicks_ = false; reduce_clicks_ = false;
@ -267,7 +269,7 @@ void Gb_Apu::silence_osc( Gb_Osc& o )
if ( o.output ) if ( o.output )
{ {
o.output->set_modified(); o.output->set_modified();
med_synth.offset( last_time, delta, o.output ); med_synth[0].offset( last_time, delta, o.output );
} }
} }
} }

View File

@ -115,7 +115,7 @@ private:
// large objects after everything else // large objects after everything else
Gb_Osc::Good_Synth good_synth; Gb_Osc::Good_Synth good_synth;
Gb_Osc::Med_Synth med_synth; Gb_Osc::Med_Synth med_synth[2];
void reset_lengths(); void reset_lengths();
void reset_regs(); void reset_regs();

View File

@ -418,6 +418,7 @@ static void remake_stereo_buffer(GBASystem *gba)
{ {
gba->gb_apu = new GBA::Gb_Apu; // TODO: handle out of memory gba->gb_apu = new GBA::Gb_Apu; // TODO: handle out of memory
reset_apu(gba); reset_apu(gba);
gba->gb_apu->treble_eq( GBA::blip_eq_t( 0, 0, gba->soundSampleRate, gba->soundSampleRate / 2 ) );
} }
apply_muting(gba); apply_muting(gba);