Commit Description:
Optimize PreserveCounts and only recalculate when needed....
Commit Description:
Optimize PreserveCounts and only recalculate when needed. Previously would recalculate preservecounts every Update call (~1 per frame), which isn't necessary when there's no tick. Might be some room to tweak, like doing these updates only when preserves change. Some measurements: This takes about 30ms versus the .25 ms with no preserve (then like .0002ms). When the map is filled up with preserve, about 35ms and 9ms. With a handful of cells, it's more like 0.8ms (before JIT optimizes most of it away).
File last commit:
Show/Diff file:
Action:
FNA/lib/FAudio/cpp/XAPO.h
48 lines | 1.9 KiB | text/x-c | CLexer
#ifndef FACT_CPP_XAPO_H
#define FACT_CPP_XAPO_H
#include "com_utils.h"
#include <FAPO.h>
typedef FAPORegistrationProperties XAPO_REGISTRATION_PROPERTIES;
typedef FAPOLockForProcessBufferParameters XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS;
typedef FAPOProcessBufferParameters XAPO_PROCESS_BUFFER_PARAMETERS;
typedef FAudioWaveFormatEx WAVEFORMATEX;
class IXAPO : public IUnknown
{
public:
COM_METHOD(HRESULT) GetRegistrationProperties (XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) = 0;
COM_METHOD(HRESULT) IsInputFormatSupported(
const WAVEFORMATEX* pOutputFormat,
const WAVEFORMATEX* pRequestedInputFormat,
WAVEFORMATEX** ppSupportedInputFormat) = 0;
COM_METHOD(HRESULT) IsOutputFormatSupported(
const WAVEFORMATEX* pInputFormat,
const WAVEFORMATEX* pRequestedOutputFormat,
WAVEFORMATEX** ppSupportedOutputFormat) = 0;
COM_METHOD(HRESULT) Initialize(const void* pData, UINT32 DataByteSize) = 0;
COM_METHOD(void) Reset() = 0;
COM_METHOD(HRESULT) LockForProcess(
UINT32 InputLockedParameterCount,
const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters,
UINT32 OutputLockedParameterCount,
const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) = 0;
COM_METHOD(void) UnlockForProcess() = 0;
COM_METHOD(void) Process(
UINT32 InputProcessParameterCount,
const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters,
UINT32 OutputProcessParameterCount,
XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters,
BOOL IsEnabled) = 0;
COM_METHOD(UINT32) CalcInputFrames(UINT32 OutputFrameCount) = 0;
COM_METHOD(UINT32) CalcOutputFrames(UINT32 InputFrameCount) = 0;
};
class IXAPOParameters : public IUnknown
{
public:
COM_METHOD(void) SetParameters(const void* pParameters, UINT32 ParameterByteSize) = 0;
COM_METHOD(void) GetParameters(void* pParameters, UINT32 ParameterByteSize) = 0;
};
#endif // FACT_CPP_XAPO_H