yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

service/audio: Replace includes with forward declarations where applicable

A few headers were including other headers when a forward declaration
can be used instead, allowing the include to be moved to the cpp file.
This commit is contained in:
Lioncash 2018-09-11 21:45:20 -04:00
parent 1470b85af9
commit c243bc09d4
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/codecctl.h"
#include "core/hle/service/audio/hwopus.h"
#include "core/hle/service/service.h"
namespace Service::Audio {

View File

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

View File

@ -3,15 +3,20 @@
// Refer to the license.txt file included.
#include <array>
#include <cstring>
#include <vector>
#include "audio_core/audio_out.h"
#include "audio_core/codec.h"
#include "common/common_funcs.h"
#include "common/logging/log.h"
#include "common/swap.h"
#include "core/core.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/event.h"
#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/service/audio/audout_u.h"
#include "core/memory.h"
namespace Service::Audio {
@ -25,6 +30,18 @@ enum {
constexpr std::array<char, 10> DefaultDevice{{"DeviceOut"}};
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> {
public:
IAudioOut(AudoutParams audio_params, AudioCore::AudioOut& audio_core)

View File

@ -4,27 +4,18 @@
#pragma once
#include "audio_core/audio_out.h"
#include "core/hle/service/service.h"
namespace AudioCore {
class AudioOut;
}
namespace Kernel {
class HLERequestContext;
}
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 AudOutU final : public ServiceFramework<AudOutU> {

View File

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

View File

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

View File

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