I don't have Spider-Man 2, but I do have Alien Hominid (GAHEGG). The regular audio dump (dspdump.wav
) works fine, but the DTK audio dump (for music streamed from the disc drive, dtkdump.wav
) does have this issue. JMC says the same applies to Spider-Man 2.
I also did a quick test on top of your PR:
diff --git a/Source/Core/AudioCommon/Mixer.h b/Source/Core/AudioCommon/Mixer.h
index f58c25f98a..47fe55b8fe 100644
--- a/Source/Core/AudioCommon/Mixer.h
+++ b/Source/Core/AudioCommon/Mixer.h
@@ -51,7 +51,6 @@ public:
float GetCurrentSpeed() const { return m_speed.load(); }
void UpdateSpeed(float val) { m_speed.store(val); }
-private:
static constexpr u32 MAX_SAMPLES = 1024 * 4; // 128 ms
static constexpr u32 INDEX_MASK = MAX_SAMPLES * 2 - 1;
static constexpr int MAX_FREQ_SHIFT = 200; // Per 32000 Hz
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index dbad9711f1..10d74245fa 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -87,6 +87,8 @@
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
+#include "AudioCommon/AudioCommon.h"
+
std::unique_ptr<Renderer> g_renderer;
static float AspectToWidescreen(float aspect)
@@ -576,6 +578,22 @@ void Renderer::DrawDebugText()
ImGui::End();
}
+ if (ImGui::Begin("Mixer state"))
+ {
+ Mixer* mixer = g_sound_stream->GetMixer();
+ auto draw_volume = [](auto text, auto vol_pair) {
+ ImGui::Text("%s Volume: %d %d", text, vol_pair.first, vol_pair.second);
+ };
+ draw_volume("DMA", mixer->m_dma_mixer.GetVolume());
+ draw_volume("Stream", mixer->m_streaming_mixer.GetVolume());
+ draw_volume("Wiimote", mixer->m_wiimote_speaker_mixer.GetVolume());
+ draw_volume("GBA 1", mixer->m_gba_mixers[0].GetVolume());
+ draw_volume("GBA 2", mixer->m_gba_mixers[1].GetVolume());
+ draw_volume("GBA 3", mixer->m_gba_mixers[2].GetVolume());
+ draw_volume("GBA 4", mixer->m_gba_mixers[3].GetVolume());
+ }
+ ImGui::End();
+
const bool show_movie_window =
Config::Get(Config::MAIN_SHOW_FRAME_COUNT) || Config::Get(Config::MAIN_SHOW_LAG) ||
Config::Get(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY) ||
which seems to show that m_dma_mixer
never has its volume changed from 256 (which matches what I can see in the code), but the DTK one is changed when changing the sound settings (and doesn't default to the maximum volume either). Presumably the DSP program itself manages the output volume instead.