summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2016-05-15 13:51:04 +0200
committerMerryMage <MerryMage@users.noreply.github.com>2016-05-19 08:25:26 +0200
commitf4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7 (patch)
tree810f147e01c133ebe652943fea29a42ae089ea4c /src
parentDSP/HLE: Implement mixer processing (diff)
downloadyuzu-f4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7.tar
yuzu-f4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7.tar.gz
yuzu-f4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7.tar.bz2
yuzu-f4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7.tar.lz
yuzu-f4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7.tar.xz
yuzu-f4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7.tar.zst
yuzu-f4d364a60e77c1423b4bb9ea9d0b0a58cbac29e7.zip
Diffstat (limited to 'src')
-rw-r--r--src/audio_core/hle/dsp.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/audio_core/hle/dsp.cpp b/src/audio_core/hle/dsp.cpp
index 1c00ed472..0640e1eff 100644
--- a/src/audio_core/hle/dsp.cpp
+++ b/src/audio_core/hle/dsp.cpp
@@ -88,6 +88,11 @@ static StereoFrame16 GenerateCurrentFrame() {
static std::unique_ptr<AudioCore::Sink> sink;
static AudioCore::TimeStretcher time_stretcher;
+static void OutputCurrentFrame(const StereoFrame16& frame) {
+ time_stretcher.AddSamples(&frame[0][0], frame.size());
+ sink->EnqueueSamples(time_stretcher.Process(sink->SamplesInQueue()));
+}
+
// Public Interface
void Init() {
@@ -121,6 +126,8 @@ bool Tick() {
// TODO: Check dsp::DSP semaphore (which indicates emulated application has finished writing to shared memory region)
current_frame = GenerateCurrentFrame();
+ OutputCurrentFrame(current_frame);
+
return true;
}