2018-01-15 03:29:11 +01:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
2018-01-22 04:03:36 +01:00
|
|
|
namespace Kernel {
|
|
|
|
class HLERequestContext;
|
|
|
|
}
|
|
|
|
|
2018-04-20 03:41:44 +02:00
|
|
|
namespace Service::Audio {
|
2018-01-15 03:29:11 +01:00
|
|
|
|
2018-07-27 04:35:23 +02:00
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
audout:u OpenAudioOut and IAudioOut (#138)
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation
* using an enum for audio_out_state as well as changing its initialize to member initializer list
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* added missing Audio loggin subclass, minor fixes, clang comment breakline
* Solving backend logging conflict
* minor fix
* Fixed duplicated Service NVDRV in backend.cpp, my bad
2018-01-25 04:17:54 +01:00
|
|
|
class IAudioOut;
|
|
|
|
|
2018-01-15 03:29:11 +01:00
|
|
|
class AudOutU final : public ServiceFramework<AudOutU> {
|
|
|
|
public:
|
|
|
|
AudOutU();
|
|
|
|
~AudOutU() = default;
|
|
|
|
|
|
|
|
private:
|
audout:u OpenAudioOut and IAudioOut (#138)
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation
* using an enum for audio_out_state as well as changing its initialize to member initializer list
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* added missing Audio loggin subclass, minor fixes, clang comment breakline
* Solving backend logging conflict
* minor fix
* Fixed duplicated Service NVDRV in backend.cpp, my bad
2018-01-25 04:17:54 +01:00
|
|
|
std::shared_ptr<IAudioOut> audio_out_interface;
|
|
|
|
|
2018-07-12 08:57:31 +02:00
|
|
|
void ListAudioOutsImpl(Kernel::HLERequestContext& ctx);
|
|
|
|
void OpenAudioOutImpl(Kernel::HLERequestContext& ctx);
|
audout:u OpenAudioOut and IAudioOut (#138)
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation
* using an enum for audio_out_state as well as changing its initialize to member initializer list
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* added missing Audio loggin subclass, minor fixes, clang comment breakline
* Solving backend logging conflict
* minor fix
* Fixed duplicated Service NVDRV in backend.cpp, my bad
2018-01-25 04:17:54 +01:00
|
|
|
|
|
|
|
enum class PcmFormat : u32 {
|
|
|
|
Invalid = 0,
|
|
|
|
Int8 = 1,
|
|
|
|
Int16 = 2,
|
|
|
|
Int24 = 3,
|
|
|
|
Int32 = 4,
|
|
|
|
PcmFloat = 5,
|
|
|
|
Adpcm = 6,
|
|
|
|
};
|
2018-01-15 03:29:11 +01:00
|
|
|
};
|
|
|
|
|
2018-04-20 03:41:44 +02:00
|
|
|
} // namespace Service::Audio
|