diff options
author | MerryMage <MerryMage@users.noreply.github.com> | 2016-02-21 14:13:52 +0100 |
---|---|---|
committer | MerryMage <MerryMage@users.noreply.github.com> | 2016-02-21 14:13:52 +0100 |
commit | 8b00954ec79fad71691ad2d4c82d5c1c60e21b0c (patch) | |
tree | 443d275fd39c58928e68ef22ce3fe0fa56c73642 /src/audio_core/hle/dsp.cpp | |
parent | Merge pull request #1406 from MerryMage/bitfield2 (diff) | |
download | yuzu-8b00954ec79fad71691ad2d4c82d5c1c60e21b0c.tar yuzu-8b00954ec79fad71691ad2d4c82d5c1c60e21b0c.tar.gz yuzu-8b00954ec79fad71691ad2d4c82d5c1c60e21b0c.tar.bz2 yuzu-8b00954ec79fad71691ad2d4c82d5c1c60e21b0c.tar.lz yuzu-8b00954ec79fad71691ad2d4c82d5c1c60e21b0c.tar.xz yuzu-8b00954ec79fad71691ad2d4c82d5c1c60e21b0c.tar.zst yuzu-8b00954ec79fad71691ad2d4c82d5c1c60e21b0c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/hle/dsp.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/audio_core/hle/dsp.cpp b/src/audio_core/hle/dsp.cpp new file mode 100644 index 000000000..c89356edc --- /dev/null +++ b/src/audio_core/hle/dsp.cpp @@ -0,0 +1,42 @@ +// Copyright 2016 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "audio_core/hle/dsp.h" +#include "audio_core/hle/pipe.h" + +namespace DSP { +namespace HLE { + +SharedMemory g_region0; +SharedMemory g_region1; + +void Init() { + DSP::HLE::ResetPipes(); +} + +void Shutdown() { +} + +bool Tick() { + return true; +} + +SharedMemory& CurrentRegion() { + // The region with the higher frame counter is chosen unless there is wraparound. + + if (g_region0.frame_counter == 0xFFFFu && g_region1.frame_counter != 0xFFFEu) { + // Wraparound has occured. + return g_region1; + } + + if (g_region1.frame_counter == 0xFFFFu && g_region0.frame_counter != 0xFFFEu) { + // Wraparound has occured. + return g_region0; + } + + return (g_region0.frame_counter > g_region1.frame_counter) ? g_region0 : g_region1; +} + +} // namespace HLE +} // namespace DSP |