mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-23 03:51:21 -08:00
audio: format
This commit is contained in:
parent
5f90bd88da
commit
2e4a6b7f92
@ -121,6 +121,7 @@ else()
|
|||||||
-Wno-attributes
|
-Wno-attributes
|
||||||
-Wno-invalid-offsetof
|
-Wno-invalid-offsetof
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
|
-Wno-missing-field-initializers
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES Clang) # Clang or AppleClang
|
if (CMAKE_CXX_COMPILER_ID MATCHES Clang) # Clang or AppleClang
|
||||||
|
@ -20,7 +20,7 @@ struct OpusParametersEx {
|
|||||||
/* 0x00 */ u32 sample_rate;
|
/* 0x00 */ u32 sample_rate;
|
||||||
/* 0x04 */ u32 channel_count;
|
/* 0x04 */ u32 channel_count;
|
||||||
/* 0x08 */ bool use_large_frame_size;
|
/* 0x08 */ bool use_large_frame_size;
|
||||||
/* 0x09 */ INSERT_PADDING_BYTES(7);
|
/* 0x09 */ INSERT_PADDING_BYTES_NOINIT(7);
|
||||||
}; // size = 0x10
|
}; // size = 0x10
|
||||||
static_assert(sizeof(OpusParametersEx) == 0x10, "OpusParametersEx has the wrong size!");
|
static_assert(sizeof(OpusParametersEx) == 0x10, "OpusParametersEx has the wrong size!");
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ struct OpusMultiStreamParametersEx {
|
|||||||
/* 0x08 */ u32 total_stream_count;
|
/* 0x08 */ u32 total_stream_count;
|
||||||
/* 0x0C */ u32 stereo_stream_count;
|
/* 0x0C */ u32 stereo_stream_count;
|
||||||
/* 0x10 */ bool use_large_frame_size;
|
/* 0x10 */ bool use_large_frame_size;
|
||||||
/* 0x11 */ INSERT_PADDING_BYTES(7);
|
/* 0x11 */ INSERT_PADDING_BYTES_NOINIT(7);
|
||||||
/* 0x18 */ std::array<u8, OpusStreamCountMax + 1> mappings;
|
/* 0x18 */ std::array<u8, OpusStreamCountMax + 1> mappings;
|
||||||
}; // size = 0x118
|
}; // size = 0x118
|
||||||
static_assert(sizeof(OpusMultiStreamParametersEx) == 0x118,
|
static_assert(sizeof(OpusMultiStreamParametersEx) == 0x118,
|
||||||
|
@ -19,9 +19,10 @@ namespace AudioCore::Renderer {
|
|||||||
|
|
||||||
InfoUpdater::InfoUpdater(std::span<const u8> input_, std::span<u8> output_,
|
InfoUpdater::InfoUpdater(std::span<const u8> input_, std::span<u8> output_,
|
||||||
Kernel::KProcess* process_handle_, BehaviorInfo& behaviour_)
|
Kernel::KProcess* process_handle_, BehaviorInfo& behaviour_)
|
||||||
: input{input_.data() + sizeof(UpdateDataHeader)}, input_origin{input_},
|
: input{input_.data() + sizeof(UpdateDataHeader)},
|
||||||
output{output_.data() + sizeof(UpdateDataHeader)}, output_origin{output_},
|
input_origin{input_}, output{output_.data() + sizeof(UpdateDataHeader)},
|
||||||
in_header{reinterpret_cast<const UpdateDataHeader*>(input_origin.data())},
|
output_origin{output_}, in_header{reinterpret_cast<const UpdateDataHeader*>(
|
||||||
|
input_origin.data())},
|
||||||
out_header{reinterpret_cast<UpdateDataHeader*>(output_origin.data())},
|
out_header{reinterpret_cast<UpdateDataHeader*>(output_origin.data())},
|
||||||
expected_input_size{input_.size()}, expected_output_size{output_.size()},
|
expected_input_size{input_.size()}, expected_output_size{output_.size()},
|
||||||
process_handle{process_handle_}, behaviour{behaviour_} {
|
process_handle{process_handle_}, behaviour{behaviour_} {
|
||||||
|
@ -13,8 +13,8 @@ PoolMapper::PoolMapper(Kernel::KProcess* process_handle_, bool force_map_)
|
|||||||
|
|
||||||
PoolMapper::PoolMapper(Kernel::KProcess* process_handle_, std::span<MemoryPoolInfo> pool_infos_,
|
PoolMapper::PoolMapper(Kernel::KProcess* process_handle_, std::span<MemoryPoolInfo> pool_infos_,
|
||||||
u32 pool_count_, bool force_map_)
|
u32 pool_count_, bool force_map_)
|
||||||
: process_handle{process_handle_}, pool_infos{pool_infos_.data()}, pool_count{pool_count_},
|
: process_handle{process_handle_}, pool_infos{pool_infos_.data()},
|
||||||
force_map{force_map_} {}
|
pool_count{pool_count_}, force_map{force_map_} {}
|
||||||
|
|
||||||
void PoolMapper::ClearUseState(std::span<MemoryPoolInfo> pools, const u32 count) {
|
void PoolMapper::ClearUseState(std::span<MemoryPoolInfo> pools, const u32 count) {
|
||||||
for (u32 i = 0; i < count; i++) {
|
for (u32 i = 0; i < count; i++) {
|
||||||
|
@ -12,8 +12,9 @@ IAudioIn::IAudioIn(Core::System& system_, Manager& manager, size_t session_id,
|
|||||||
const std::string& device_name, const AudioInParameter& in_params,
|
const std::string& device_name, const AudioInParameter& in_params,
|
||||||
Kernel::KProcess* handle, u64 applet_resource_user_id)
|
Kernel::KProcess* handle, u64 applet_resource_user_id)
|
||||||
: ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"},
|
: ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"},
|
||||||
event{service_context.CreateEvent("AudioInEvent")},
|
event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared<In>(system_,
|
||||||
impl{std::make_shared<In>(system_, manager, event, session_id)} {
|
manager, event,
|
||||||
|
session_id)} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"},
|
{0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"},
|
||||||
|
@ -10,8 +10,8 @@ namespace Service::Audio {
|
|||||||
using namespace AudioCore::AudioIn;
|
using namespace AudioCore::AudioIn;
|
||||||
|
|
||||||
IAudioInManager::IAudioInManager(Core::System& system_)
|
IAudioInManager::IAudioInManager(Core::System& system_)
|
||||||
: ServiceFramework{system_, "audin:u"},
|
: ServiceFramework{system_, "audin:u"}, impl{std::make_unique<AudioCore::AudioIn::Manager>(
|
||||||
impl{std::make_unique<AudioCore::AudioIn::Manager>(system_)} {
|
system_)} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"},
|
{0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"},
|
||||||
|
@ -14,8 +14,8 @@ IAudioRenderer::IAudioRenderer(Core::System& system_, Manager& manager_,
|
|||||||
s32 session_id)
|
s32 session_id)
|
||||||
: ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"},
|
: ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"},
|
||||||
rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_},
|
rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_},
|
||||||
impl{std::make_unique<Renderer>(system_, manager, rendered_event)},
|
impl{std::make_unique<Renderer>(system_, manager, rendered_event)}, process_handle{
|
||||||
process_handle{process_handle_} {
|
process_handle_} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"},
|
{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"},
|
||||||
|
Loading…
Reference in New Issue
Block a user