diff options
| author | 2019-03-07 05:32:40 -0500 | |
|---|---|---|
| committer | 2019-03-07 05:32:42 -0500 | |
| commit | 329387745615a0d6cdb06c9c540667693fc625bf (patch) | |
| tree | 3db888e41f1938e633c28e66fcc935c50a162a67 | |
| parent | Merge pull request #2199 from lioncash/arbiter (diff) | |
| download | yuzu-329387745615a0d6cdb06c9c540667693fc625bf.tar.gz yuzu-329387745615a0d6cdb06c9c540667693fc625bf.tar.xz yuzu-329387745615a0d6cdb06c9c540667693fc625bf.zip | |
service/audio/hwopus: Enclose internals in an anonymous namespace
Makes it impossible to violate the ODR, as well as providing a place for
future changes.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 11eba4a12..00a4b9d53 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include "core/hle/service/audio/hwopus.h" | 16 | #include "core/hle/service/audio/hwopus.h" |
| 17 | 17 | ||
| 18 | namespace Service::Audio { | 18 | namespace Service::Audio { |
| 19 | 19 | namespace { | |
| 20 | struct OpusDeleter { | 20 | struct OpusDeleter { |
| 21 | void operator()(void* ptr) const { | 21 | void operator()(void* ptr) const { |
| 22 | operator delete(ptr); | 22 | operator delete(ptr); |
| @@ -178,10 +178,11 @@ private: | |||
| 178 | u32 channel_count; | 178 | u32 channel_count; |
| 179 | }; | 179 | }; |
| 180 | 180 | ||
| 181 | static std::size_t WorkerBufferSize(u32 channel_count) { | 181 | std::size_t WorkerBufferSize(u32 channel_count) { |
| 182 | ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count"); | 182 | ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count"); |
| 183 | return opus_decoder_get_size(static_cast<int>(channel_count)); | 183 | return opus_decoder_get_size(static_cast<int>(channel_count)); |
| 184 | } | 184 | } |
| 185 | } // Anonymous namespace | ||
| 185 | 186 | ||
| 186 | void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { | 187 | void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { |
| 187 | IPC::RequestParser rp{ctx}; | 188 | IPC::RequestParser rp{ctx}; |