[FIXED]Sound issues
1) Disabling/muting seperate channels does not work for GB and GBA
soundEnableFlag seems to be accurately filled with the binary switches for every channel (1111 means all 4 GB channels on), but the audio core probably just ignores it's value or something like that.
Â
Â
2) Enabling echo from the menu has no effect
I discovered a strange part of code:
Â
void gbSoundTick()
{Code: Select all
if ( systemSoundOn && gb_apu && stereo_buffer ) { // Run sound hardware to present end_frame( SOUND_CLOCK_TICKS * ticks_to_time );
Â
Code: Select all
flush_samples();
Â
gb_effects_config.enabled = soundEcho;
Code: Select all
// Update effects config if it was changed if ( memcmp( &gb_effects_config_current, &gb_effects_config, sizeof gb_effects_config ) ) apply_effects(); }
}
Â
When echo is enabled, the effects get enabled, but since they are at their default values, you can hear no difference. Should I just remove that line, since i'll add the effects config anyway?
Â
UPDATE: I just noticed that everything in gb_effects_config is disabled until soundEcho is enabled. The correct behaviour would be to let gb_effects_config.enabled decide.
IMO soundEcho should be removed because it's already in gb_effects_config.echo
Â
Â
Â
Â
3) When including gbSound.h additionally to Sound.h (I have to do that for config in MainWnd), I get macro redefinition warnings about these:
Code: Select all
#define NR10 0xff10
#define NR11 0xff11
#define NR12 0xff12
#define NR13 0xff13
#define NR14 0xff14
#define NR21 0xff16
#define NR22 0xff17
#define NR23 0xff18
#define NR24 0xff19
#define NR30 0xff1a
#define NR31 0xff1b
#define NR32 0xff1c
#define NR33 0xff1d
#define NR34 0xff1e
#define NR41 0xff20
#define NR42 0xff21
#define NR43 0xff22
#define NR44 0xff23
#define NR50 0xff24
#define NR51 0xff25
#define NR52 0xff26
Â
Â
4) Are the initial values of gb_effects_config correct?
Code: Select all
void gbSoundReset()
{
gb_effects_config.echo = 0.20f;
gb_effects_config.stereo = 0.15f;
gb_effects_config.surround = false;
[...]
Â
Is there a specific reason echo is not 0.0f and stereo is not 1.0f by default?
I'll add these to the save/load ini functions later, so the new default values will be assigned by "void loadSettings()".
Â
Â
5) I'm not sure what the surround option so good for. When I enable the Dolby Pro Logic IIx decoder of my ASUS Xonar DX sound card, there is no change, meaning sound still comes only from Front Left/Right. What is the intended difference to an stereo-to-surround upmixing matrix like the ones I use in the XAudio2 output or like ffdshow uses it?
Â
Â
Â
Â
Here's a link to the latest build of SVN634 including zlib 1.2.3 + libpng 1.2.31. It has all the problems described above.
http://vba-m.com/vbam/vbacompiles/msvc2008/VisualBoyAdvance634.7z