Browse Source
Merge pull request #1300 from lioncash/audio
service/audio: Replace includes with forward declarations where applicable
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
34 additions and
17 deletions
-
src/core/hle/service/audio/audio.cpp
-
src/core/hle/service/audio/audio.h
-
src/core/hle/service/audio/audout_u.cpp
-
src/core/hle/service/audio/audout_u.h
-
src/core/hle/service/audio/audren_u.cpp
-
src/core/hle/service/audio/audren_u.h
-
src/core/hle/service/audio/hwopus.cpp
|
|
|
@ -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 { |
|
|
|
|
|
|
|
|
|
|
|
@ -4,7 +4,9 @@ |
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
#include "core/hle/service/service.h" |
|
|
|
namespace Service::SM { |
|
|
|
class ServiceManager; |
|
|
|
} |
|
|
|
|
|
|
|
namespace Service::Audio { |
|
|
|
|
|
|
|
|
|
|
|
@ -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) |
|
|
|
|
|
|
|
@ -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> { |
|
|
|
|
|
|
|
@ -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"
|
|
|
|
|
|
|
|
@ -4,7 +4,6 @@ |
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
#include "audio_core/audio_renderer.h" |
|
|
|
#include "core/hle/service/service.h" |
|
|
|
|
|
|
|
namespace Kernel { |
|
|
|
|
|
|
|
@ -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"
|
|
|
|
|