mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
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.
This commit is contained in:
parent
75b417489a
commit
3293877456
1 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
#include "core/hle/service/audio/hwopus.h"
|
#include "core/hle/service/audio/hwopus.h"
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
|
namespace {
|
||||||
struct OpusDeleter {
|
struct OpusDeleter {
|
||||||
void operator()(void* ptr) const {
|
void operator()(void* ptr) const {
|
||||||
operator delete(ptr);
|
operator delete(ptr);
|
||||||
|
@ -178,10 +178,11 @@ private:
|
||||||
u32 channel_count;
|
u32 channel_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::size_t WorkerBufferSize(u32 channel_count) {
|
std::size_t WorkerBufferSize(u32 channel_count) {
|
||||||
ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count");
|
ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count");
|
||||||
return opus_decoder_get_size(static_cast<int>(channel_count));
|
return opus_decoder_get_size(static_cast<int>(channel_count));
|
||||||
}
|
}
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
Loading…
Reference in a new issue