yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #1300 from lioncash/audio

service/audio: Replace includes with forward declarations where applicable
This commit is contained in:
bunnei 2018-09-11 23:13:29 -04:00 committed by GitHub
commit c245150439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 17 deletions

View File

@ -15,6 +15,7 @@
#include "core/hle/service/audio/audren_u.h" #include "core/hle/service/audio/audren_u.h"
#include "core/hle/service/audio/codecctl.h" #include "core/hle/service/audio/codecctl.h"
#include "core/hle/service/audio/hwopus.h" #include "core/hle/service/audio/hwopus.h"
#include "core/hle/service/service.h"
namespace Service::Audio { namespace Service::Audio {

View File

@ -4,7 +4,9 @@
#pragma once #pragma once
#include "core/hle/service/service.h" namespace Service::SM {
class ServiceManager;
}
namespace Service::Audio { namespace Service::Audio {

View File

@ -3,15 +3,20 @@
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <array> #include <array>
#include <cstring>
#include <vector> #include <vector>
#include "audio_core/audio_out.h"
#include "audio_core/codec.h" #include "audio_core/codec.h"
#include "common/common_funcs.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/swap.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/event.h" #include "core/hle/kernel/event.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/service/audio/audout_u.h" #include "core/hle/service/audio/audout_u.h"
#include "core/memory.h"
namespace Service::Audio { namespace Service::Audio {
@ -25,6 +30,18 @@ enum {
constexpr std::array<char, 10> DefaultDevice{{"DeviceOut"}}; constexpr std::array<char, 10> DefaultDevice{{"DeviceOut"}};
constexpr int DefaultSampleRate{48000}; constexpr int DefaultSampleRate{48000};
struct AudoutParams {
s32_le sample_rate;
u16_le channel_count;
INSERT_PADDING_BYTES(2);
};
static_assert(sizeof(AudoutParams) == 0x8, "AudoutParams is an invalid size");
enum class AudioState : u32 {
Started,
Stopped,
};
class IAudioOut final : public ServiceFramework<IAudioOut> { class IAudioOut final : public ServiceFramework<IAudioOut> {
public: public:
IAudioOut(AudoutParams audio_params, AudioCore::AudioOut& audio_core) IAudioOut(AudoutParams audio_params, AudioCore::AudioOut& audio_core)

View File

@ -4,27 +4,18 @@
#pragma once #pragma once
#include "audio_core/audio_out.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
namespace AudioCore {
class AudioOut;
}
namespace Kernel { namespace Kernel {
class HLERequestContext; class HLERequestContext;
} }
namespace Service::Audio { namespace Service::Audio {
struct AudoutParams {
s32_le sample_rate;
u16_le channel_count;
INSERT_PADDING_BYTES(2);
};
static_assert(sizeof(AudoutParams) == 0x8, "AudoutParams is an invalid size");
enum class AudioState : u32 {
Started,
Stopped,
};
class IAudioOut; class IAudioOut;
class AudOutU final : public ServiceFramework<AudOutU> { class AudOutU final : public ServiceFramework<AudOutU> {

View File

@ -2,12 +2,14 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <algorithm>
#include <array> #include <array>
#include <memory>
#include "audio_core/audio_renderer.h"
#include "common/alignment.h" #include "common/alignment.h"
#include "common/common_funcs.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core_timing.h"
#include "core/core_timing_util.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/event.h" #include "core/hle/kernel/event.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"

View File

@ -4,7 +4,6 @@
#pragma once #pragma once
#include "audio_core/audio_renderer.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
namespace Kernel { namespace Kernel {

View File

@ -3,7 +3,12 @@
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <cstring> #include <cstring>
#include <memory>
#include <vector>
#include <opus.h> #include <opus.h>
#include "common/common_funcs.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"