/*---------------------------------------------------------------------------* Project: Horizon File: snd_DspFxDelay.h Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 46347 $ *---------------------------------------------------------------------------*/ #ifndef NN_SND_CTR_MPCORE_SND_DSP_FX_DELAY_H_ #define NN_SND_CTR_MPCORE_SND_DSP_FX_DELAY_H_ #include #include #include #ifdef __cplusplus /* Please see man pages for details */ namespace nn { namespace snd { namespace CTR { /* Please see man pages for details */ class DspFxDelay : private nn::util::NonCopyable { public: /* Please see man pages for details */ struct Param { // u32 m_DelayTime; // f32 m_FeedbackGain; // f32 m_Damping; // bool m_IsEnableSurround; NN_PADDING3; /* Please see man pages for details */ Param() : m_DelayTime(250), m_FeedbackGain(0.4f), m_Damping(0.5f), m_IsEnableSurround(false) {} }; public: //---------------------------------------------------------------- // //---------------------------------------------------------------- // /* Please see man pages for details */ DspFxDelay(); /* Please see man pages for details */ ~DspFxDelay(); // /* Please see man pages for details */ static size_t GetRequiredMemorySize(const DspFxDelay::Param& param); /* Please see man pages for details */ bool Initialize(uptr buffer, size_t size); /* Please see man pages for details */ void Finalize(); /* Please see man pages for details */ bool Attach(AuxBusId id); /* Please see man pages for details */ void Detach(); /* Please see man pages for details */ bool SetParam(const DspFxDelay::Param& param); /* Please see man pages for details */ bool Enable(bool enable = true); /* Please see man pages for details */ bool Disable() { return Enable(false); } /* Please see man pages for details */ bool IsEnabled() { return m_IsEnabled; } /* Please see man pages for details */ bool IsBufferInUse(); private: bool AssignWorkBuffer(uptr buffer, size_t size); void ReleaseWorkBuffer(); uptr m_Buffer; uptr m_BufferPhysical; size_t m_BufferSize; bool m_IsInitialized; util::SizedEnum1 m_AuxBusId; bool m_IsEnabled; s8 m_ProcessCount; // Used to determine if memory can be deallocated }; }}} // namespace nn::snd::CTR #endif // __cplusplus #endif // NN_SND_CTR_MPCORE_SND_DSP_FX_DELAY_H_