diff options
| author | 2016-04-30 03:49:11 -0400 | |
|---|---|---|
| committer | 2016-04-30 03:49:11 -0400 | |
| commit | c1f0044a4b10bdff45464e5957f7950a6059d0c9 (patch) | |
| tree | d9b4673f92da936ce763148f70b82bc7401dd968 /src/audio_core/hle/dsp.cpp | |
| parent | Merge pull request #1650 from JamePeng/update-the-ndm-code (diff) | |
| parent | Audio: Add sink selection to configuration files (diff) | |
| download | yuzu-c1f0044a4b10bdff45464e5957f7950a6059d0c9.tar.gz yuzu-c1f0044a4b10bdff45464e5957f7950a6059d0c9.tar.xz yuzu-c1f0044a4b10bdff45464e5957f7950a6059d0c9.zip | |
Merge pull request #1729 from MerryMage/null-sink
Audio Config: Implement null sink and implement sink configuration
Diffstat (limited to 'src/audio_core/hle/dsp.cpp')
| -rw-r--r-- | src/audio_core/hle/dsp.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/audio_core/hle/dsp.cpp b/src/audio_core/hle/dsp.cpp index 5759a5b9e..4d44bd2d9 100644 --- a/src/audio_core/hle/dsp.cpp +++ b/src/audio_core/hle/dsp.cpp | |||
| @@ -2,8 +2,11 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <memory> | ||
| 6 | |||
| 5 | #include "audio_core/hle/dsp.h" | 7 | #include "audio_core/hle/dsp.h" |
| 6 | #include "audio_core/hle/pipe.h" | 8 | #include "audio_core/hle/pipe.h" |
| 9 | #include "audio_core/sink.h" | ||
| 7 | 10 | ||
| 8 | namespace DSP { | 11 | namespace DSP { |
| 9 | namespace HLE { | 12 | namespace HLE { |
| @@ -35,6 +38,8 @@ static SharedMemory& WriteRegion() { | |||
| 35 | return g_regions[1 - CurrentRegionIndex()]; | 38 | return g_regions[1 - CurrentRegionIndex()]; |
| 36 | } | 39 | } |
| 37 | 40 | ||
| 41 | static std::unique_ptr<AudioCore::Sink> sink; | ||
| 42 | |||
| 38 | void Init() { | 43 | void Init() { |
| 39 | DSP::HLE::ResetPipes(); | 44 | DSP::HLE::ResetPipes(); |
| 40 | } | 45 | } |
| @@ -46,5 +51,9 @@ bool Tick() { | |||
| 46 | return true; | 51 | return true; |
| 47 | } | 52 | } |
| 48 | 53 | ||
| 54 | void SetSink(std::unique_ptr<AudioCore::Sink> sink_) { | ||
| 55 | sink = std::move(sink_); | ||
| 56 | } | ||
| 57 | |||
| 49 | } // namespace HLE | 58 | } // namespace HLE |
| 50 | } // namespace DSP | 59 | } // namespace DSP |