From 380658c21d39cf05ac765a9284da246388cca2a4 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 12 Jul 2020 21:59:14 +1000 Subject: audio_core: Apollo Part 1, AudioRenderer refactor --- src/audio_core/behavior_info.h | 52 +++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'src/audio_core/behavior_info.h') diff --git a/src/audio_core/behavior_info.h b/src/audio_core/behavior_info.h index c5e91ab39..50948e8df 100644 --- a/src/audio_core/behavior_info.h +++ b/src/audio_core/behavior_info.h @@ -14,15 +14,37 @@ namespace AudioCore { class BehaviorInfo { public: + struct ErrorInfo { + u32_le result{}; + INSERT_PADDING_WORDS(1); + u64_le result_info{}; + }; + static_assert(sizeof(ErrorInfo) == 0x10, "ErrorInfo is an invalid size"); + + struct InParams { + u32_le revision{}; + u32_le padding{}; + u64_le flags{}; + }; + static_assert(sizeof(InParams) == 0x10, "InParams is an invalid size"); + + struct OutParams { + std::array errors{}; + u32_le error_count{}; + INSERT_PADDING_BYTES(12); + }; + static_assert(sizeof(OutParams) == 0xb0, "OutParams is an invalid size"); + explicit BehaviorInfo(); ~BehaviorInfo(); - bool UpdateInput(const std::vector& buffer, std::size_t offset); bool UpdateOutput(std::vector& buffer, std::size_t offset); void ClearError(); void UpdateFlags(u64_le dest_flags); void SetUserRevision(u32_le revision); + u32_le GetUserRevision() const; + u32_le GetProcessRevision() const; bool IsAdpcmLoopContextBugFixed() const; bool IsSplitterSupported() const; @@ -32,35 +54,19 @@ public: bool IsAudioRenererProcessingTimeLimit70PercentSupported() const; bool IsElapsedFrameCountSupported() const; bool IsMemoryPoolForceMappingEnabled() const; + bool IsFlushVoiceWaveBuffersSupported() const; + bool IsVoicePlayedSampleCountResetAtLoopPointSupported() const; + bool IsVoicePitchAndSrcSkippedSupported() const; + bool IsMixInParameterDirtyOnlyUpdateSupported() const; + bool IsSplitterBugFixed() const; + void CopyErrorInfo(OutParams& dst); private: u32_le process_revision{}; u32_le user_revision{}; u64_le flags{}; - - struct ErrorInfo { - u32_le result{}; - INSERT_PADDING_WORDS(1); - u64_le result_info{}; - }; - static_assert(sizeof(ErrorInfo) == 0x10, "ErrorInfo is an invalid size"); - std::array errors{}; std::size_t error_count{}; - - struct InParams { - u32_le revision{}; - u32_le padding{}; - u64_le flags{}; - }; - static_assert(sizeof(InParams) == 0x10, "InParams is an invalid size"); - - struct OutParams { - std::array errors{}; - u32_le error_count{}; - INSERT_PADDING_BYTES(12); - }; - static_assert(sizeof(OutParams) == 0xb0, "OutParams is an invalid size"); }; } // namespace AudioCore -- cgit v1.2.3