mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
HLE DSP: Remove debug artifacts
This commit is contained in:
parent
2fc9c0a573
commit
fb8130a868
1 changed files with 6 additions and 20 deletions
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
#include "services/dsp.hpp"
|
#include "services/dsp.hpp"
|
||||||
|
|
||||||
std::vector<Audio::HLE_DSP::Sample<s16, 2>> samplezorz = {};
|
|
||||||
|
|
||||||
namespace Audio {
|
namespace Audio {
|
||||||
namespace DSPPipeType {
|
namespace DSPPipeType {
|
||||||
enum : u32 {
|
enum : u32 {
|
||||||
|
@ -102,6 +100,7 @@ namespace Audio {
|
||||||
dspService.triggerPipeEvent(DSPPipeType::Audio);
|
dspService.triggerPipeEvent(DSPPipeType::Audio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Should this be called if dspState != DSPState::On?
|
||||||
outputFrame();
|
outputFrame();
|
||||||
scheduler.addEvent(Scheduler::EventType::RunDSP, scheduler.currentTimestamp + Audio::cyclesPerFrame);
|
scheduler.addEvent(Scheduler::EventType::RunDSP, scheduler.currentTimestamp + Audio::cyclesPerFrame);
|
||||||
}
|
}
|
||||||
|
@ -212,15 +211,6 @@ namespace Audio {
|
||||||
// Generate audio
|
// Generate audio
|
||||||
if (source.enabled) {
|
if (source.enabled) {
|
||||||
generateFrame(source);
|
generateFrame(source);
|
||||||
|
|
||||||
if (samplezorz.size() > 160 * 60 * 60 * 3) {
|
|
||||||
using namespace std;
|
|
||||||
ofstream fout("audio_data.bin", ios::out | ios::binary);
|
|
||||||
fout.write((char*)&samplezorz[0], samplezorz.size() * sizeof(Sample<s16, 2>));
|
|
||||||
fout.close();
|
|
||||||
|
|
||||||
Helpers::panic("Bwaa");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update write region of shared memory
|
// Update write region of shared memory
|
||||||
|
@ -394,7 +384,7 @@ namespace Audio {
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint sampleCount = std::min<s32>(maxSampleCount - outputCount, source.currentSamples.size());
|
const uint sampleCount = std::min<s32>(maxSampleCount - outputCount, source.currentSamples.size());
|
||||||
samplezorz.insert(samplezorz.end(), source.currentSamples.begin(), source.currentSamples.begin() + sampleCount);
|
// samples.insert(samples.end(), source.currentSamples.begin(), source.currentSamples.begin() + sampleCount);
|
||||||
source.currentSamples.erase(source.currentSamples.begin(), source.currentSamples.begin() + sampleCount);
|
source.currentSamples.erase(source.currentSamples.begin(), source.currentSamples.begin() + sampleCount);
|
||||||
|
|
||||||
outputCount += sampleCount;
|
outputCount += sampleCount;
|
||||||
|
@ -408,19 +398,15 @@ namespace Audio {
|
||||||
|
|
||||||
if (source.sourceType == SourceType::Stereo) {
|
if (source.sourceType == SourceType::Stereo) {
|
||||||
for (usize i = 0; i < sampleCount; i++) {
|
for (usize i = 0; i < sampleCount; i++) {
|
||||||
s16 left = *data16++;
|
const s16 left = *data16++;
|
||||||
s16 right = *data16++;
|
const s16 right = *data16++;
|
||||||
|
|
||||||
if (left != 0 || right != 0) {
|
|
||||||
Helpers::panic("panda...");
|
|
||||||
}
|
|
||||||
|
|
||||||
decodedSamples[i] = {left, right};
|
decodedSamples[i] = {left, right};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Mono
|
// Mono
|
||||||
for (usize i = 0; i < sampleCount; i++) {
|
for (usize i = 0; i < sampleCount; i++) {
|
||||||
decodedSamples[i].fill(*data16++);
|
const s16 sample = *data16++;
|
||||||
|
decodedSamples[i] = {sample, sample};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue