ADDED Now recognizes GBA sound hardware mode

ADDED gbSoundConfigEffects function to apply new effects configuration [blargg]
This commit is contained in:
spacy51 2008-08-25 22:51:46 +00:00
parent 79cc82a59f
commit bb710be856
2 changed files with 14 additions and 5 deletions

View File

@ -120,6 +120,11 @@ static void apply_effects()
}
}
void gbSoundConfigEffects( gb_effects_config_t const& c )
{
gb_effects_config = c;
}
void gbSoundTick()
{
if ( systemSoundOn && gb_apu && stereo_buffer )
@ -140,8 +145,12 @@ void gbSoundTick()
static void reset_apu()
{
// Use DMG or CGB sound differences based on type of game
gb_apu->reset( gbHardware & 1 ? gb_apu->mode_dmg : gb_apu->mode_cgb );
Gb_Apu::mode_t mode = Gb_Apu::mode_dmg;
if ( gbHardware & 1 )
mode = Gb_Apu::mode_cgb;
if ( gbHardware & 4 )
mode = Gb_Apu::mode_agb;
gb_apu->reset( mode );
if ( stereo_buffer )
stereo_buffer->clear();

View File

@ -69,6 +69,6 @@ struct gb_effects_config_t
bool surround; // true = put some channels in back
};
// Can be changed at any time, probably from another thread too.
// Sound will notice changes during next 1/100 second.
extern gb_effects_config_t gb_effects_config;
// Changes effects configuration
void gbSoundConfigEffects( gb_effects_config_t const& );
extern gb_effects_config_t gb_effects_config; // current configuration