summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2024-11-08 22:53:56 +0000
committerGitHub <noreply@github.com>2024-11-08 22:53:56 +0000
commit97ea64164b68a18aeb9af2d03e4b1da73536db0a (patch)
treee242232539e17ffb970e090e58d69f5924e8f135 /Source
parent7e1074b140809b0da7aa7d02b6303a68cc351be2 (diff)
parentedb947df4f2ff940beb353f77ffe87577a1d8037 (diff)
Merge pull request #13182 from jordan-woyak/wiimote-speaker-remove-dumping-code
WiimoteEmu: Remove disabled and no-longer-compiling wav dumping code.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/WiimoteEmu/Speaker.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/Source/Core/Core/HW/WiimoteEmu/Speaker.cpp b/Source/Core/Core/HW/WiimoteEmu/Speaker.cpp
index 58295c796d..23cba6bfd7 100644
--- a/Source/Core/Core/HW/WiimoteEmu/Speaker.cpp
+++ b/Source/Core/Core/HW/WiimoteEmu/Speaker.cpp
@@ -8,21 +8,12 @@
#include "AudioCommon/AudioCommon.h"
#include "Common/CommonTypes.h"
#include "Common/Logging/Log.h"
-#include "Common/MathUtil.h"
#include "Core/ConfigManager.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
#include "Core/System.h"
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
-//#define WIIMOTE_SPEAKER_DUMP
-#ifdef WIIMOTE_SPEAKER_DUMP
-#include <cstdlib>
-#include <fstream>
-#include "AudioCommon/WaveFile.h"
-#include "Common/FileUtil.h"
-#endif
-
namespace WiimoteEmu
{
// Yamaha ADPCM decoder code based on The ffmpeg Project (Copyright (s) 2001-2003)
@@ -60,17 +51,6 @@ static s16 adpcm_yamaha_expand_nibble(ADPCMState& s, u8 nibble)
return s.predictor;
}
-#ifdef WIIMOTE_SPEAKER_DUMP
-std::ofstream ofile;
-WaveFileWriter wav;
-
-void stopdamnwav()
-{
- wav.Stop();
- ofile.close();
-}
-#endif
-
void SpeakerLogic::SpeakerData(const u8* data, int length, float speaker_pan)
{
// TODO: should we still process samples for the decoder state?
@@ -151,28 +131,6 @@ void SpeakerLogic::SpeakerData(const u8* data, int length, float speaker_pan)
const unsigned int sample_rate = sample_rate_dividend / reg_data.sample_rate;
sound_stream->GetMixer()->PushWiimoteSpeakerSamples(
samples.get(), sample_length, Mixer::FIXED_SAMPLE_RATE_DIVIDEND / (sample_rate * 2));
-
-#ifdef WIIMOTE_SPEAKER_DUMP
- static int num = 0;
-
- if (num == 0)
- {
- File::Delete("rmtdump.wav");
- File::Delete("rmtdump.bin");
- atexit(stopdamnwav);
- File::OpenFStream(ofile, "rmtdump.bin", ofile.binary | ofile.out);
- wav.Start("rmtdump.wav", 6000);
- }
- wav.AddMonoSamples(samples.get(), length * 2);
- if (ofile.good())
- {
- for (int i = 0; i < length; i++)
- {
- ofile << data[i];
- }
- }
- num++;
-#endif
}
void SpeakerLogic::Reset()