audio_core: Dump audio frames and samples
This is tested to work with all three current methods - HLE, LLE and multithread LLE.
This commit is contained in:
parent
f2880b08d1
commit
fff570012f
1 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,8 @@
|
||||||
#include "audio_core/sink.h"
|
#include "audio_core/sink.h"
|
||||||
#include "audio_core/sink_details.h"
|
#include "audio_core/sink_details.h"
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
|
#include "core/core.h"
|
||||||
|
#include "core/dumping/backend.h"
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
|
|
||||||
namespace AudioCore {
|
namespace AudioCore {
|
||||||
|
@ -41,6 +43,10 @@ void DspInterface::OutputFrame(StereoFrame16& frame) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fifo.Push(frame.data(), frame.size());
|
fifo.Push(frame.data(), frame.size());
|
||||||
|
|
||||||
|
if (Core::System::GetInstance().VideoDumper().IsDumping()) {
|
||||||
|
Core::System::GetInstance().VideoDumper().AddAudioFrame(frame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DspInterface::OutputSample(std::array<s16, 2> sample) {
|
void DspInterface::OutputSample(std::array<s16, 2> sample) {
|
||||||
|
@ -48,6 +54,10 @@ void DspInterface::OutputSample(std::array<s16, 2> sample) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fifo.Push(&sample, 1);
|
fifo.Push(&sample, 1);
|
||||||
|
|
||||||
|
if (Core::System::GetInstance().VideoDumper().IsDumping()) {
|
||||||
|
Core::System::GetInstance().VideoDumper().AddAudioSample(sample);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DspInterface::OutputCallback(s16* buffer, std::size_t num_frames) {
|
void DspInterface::OutputCallback(s16* buffer, std::size_t num_frames) {
|
||||||
|
|
Loading…
Reference in a new issue