Amend merge
This commit is contained in:
parent
acdc8a2e14
commit
82d5ad298f
@ -12,11 +12,6 @@ class effect_exception final : public al::base_exception {
|
||||
ALenum mErrorCode;
|
||||
|
||||
public:
|
||||
#ifdef __USE_MINGW_ANSI_STDIO
|
||||
[[gnu::format(gnu_printf, 3, 4)]]
|
||||
#else
|
||||
[[gnu::format(printf, 3, 4)]]
|
||||
#endif
|
||||
effect_exception(ALenum code, const char *msg, ...);
|
||||
|
||||
ALenum errorCode() const noexcept { return mErrorCode; }
|
||||
|
@ -104,7 +104,7 @@ class backend_exception final : public base_exception {
|
||||
backend_error mErrorCode;
|
||||
|
||||
public:
|
||||
backend_exception(ALCenum code, const char *msg, ...) : base_exception{code}
|
||||
backend_exception(backend_error code, const char* msg, ...) : mErrorCode{ code }
|
||||
{
|
||||
std::va_list args;
|
||||
va_start(args, msg);
|
||||
|
@ -121,11 +121,6 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase {
|
||||
/** Resumes update processing after being deferred. */
|
||||
void processUpdates();
|
||||
|
||||
#ifdef __USE_MINGW_ANSI_STDIO
|
||||
[[gnu::format(gnu_printf, 3, 4)]]
|
||||
#else
|
||||
[[gnu::format(printf, 3, 4)]]
|
||||
#endif
|
||||
void setError(ALenum errorCode, const char *msg, ...);
|
||||
|
||||
/* Process-wide current context */
|
||||
|
@ -19,21 +19,21 @@ struct RealMixParams;
|
||||
|
||||
|
||||
/** Target gain for the reverb decay feedback reaching the decay time. */
|
||||
constexpr float ReverbDecayGain{0.001f}; /* -60 dB */
|
||||
constexpr float ReverbDecayGain{ 0.001f }; /* -60 dB */
|
||||
|
||||
constexpr float ReverbMaxReflectionsDelay{0.3f};
|
||||
constexpr float ReverbMaxLateReverbDelay{0.1f};
|
||||
constexpr float ReverbMaxReflectionsDelay{ 0.3f };
|
||||
constexpr float ReverbMaxLateReverbDelay{ 0.1f };
|
||||
|
||||
enum class ChorusWaveform {
|
||||
Sinusoid,
|
||||
Triangle
|
||||
};
|
||||
|
||||
constexpr float ChorusMaxDelay{0.016f};
|
||||
constexpr float FlangerMaxDelay{0.004f};
|
||||
constexpr float ChorusMaxDelay{ 0.016f };
|
||||
constexpr float FlangerMaxDelay{ 0.004f };
|
||||
|
||||
constexpr float EchoMaxDelay{0.207f};
|
||||
constexpr float EchoMaxLRDelay{0.404f};
|
||||
constexpr float EchoMaxDelay{ 0.207f };
|
||||
constexpr float EchoMaxLRDelay{ 0.404f };
|
||||
|
||||
enum class FShifterDirection {
|
||||
Down,
|
||||
@ -171,40 +171,15 @@ union EffectProps {
|
||||
} Dedicated;
|
||||
};
|
||||
|
||||
class effect_exception final : public al::base_exception {
|
||||
public:
|
||||
effect_exception(ALenum code, const char *msg, ...);
|
||||
};
|
||||
|
||||
|
||||
struct EffectVtable {
|
||||
void (*const setParami)(EffectProps *props, ALenum param, int val);
|
||||
void (*const setParamiv)(EffectProps *props, ALenum param, const int *vals);
|
||||
void (*const setParamf)(EffectProps *props, ALenum param, float val);
|
||||
void (*const setParamfv)(EffectProps *props, ALenum param, const float *vals);
|
||||
|
||||
void (*const getParami)(const EffectProps *props, ALenum param, int *val);
|
||||
void (*const getParamiv)(const EffectProps *props, ALenum param, int *vals);
|
||||
void (*const getParamf)(const EffectProps *props, ALenum param, float *val);
|
||||
void (*const getParamfv)(const EffectProps *props, ALenum param, float *vals);
|
||||
};
|
||||
|
||||
#define DEFINE_ALEFFECT_VTABLE(T) \
|
||||
const EffectVtable T##_vtable = { \
|
||||
T##_setParami, T##_setParamiv, \
|
||||
T##_setParamf, T##_setParamfv, \
|
||||
T##_getParami, T##_getParamiv, \
|
||||
T##_getParamf, T##_getParamfv, \
|
||||
}
|
||||
|
||||
struct EffectTarget {
|
||||
MixParams *Main;
|
||||
RealMixParams *RealOut;
|
||||
MixParams* Main;
|
||||
RealMixParams* RealOut;
|
||||
};
|
||||
|
||||
struct EffectState : public al::intrusive_ref<EffectState> {
|
||||
struct Buffer {
|
||||
const BufferStorage *storage;
|
||||
const BufferStorage* storage;
|
||||
al::span<const al::byte> samples;
|
||||
};
|
||||
|
||||
@ -213,9 +188,9 @@ struct EffectState : public al::intrusive_ref<EffectState> {
|
||||
|
||||
virtual ~EffectState() = default;
|
||||
|
||||
virtual void deviceUpdate(const DeviceBase *device, const Buffer &buffer) = 0;
|
||||
virtual void update(const ContextBase *context, const EffectSlot *slot,
|
||||
const EffectProps *props, const EffectTarget target) = 0;
|
||||
virtual void deviceUpdate(const DeviceBase* device, const Buffer& buffer) = 0;
|
||||
virtual void update(const ContextBase* context, const EffectSlot* slot,
|
||||
const EffectProps* props, const EffectTarget target) = 0;
|
||||
virtual void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
|
||||
const al::span<FloatBufferLine> samplesOut) = 0;
|
||||
};
|
||||
@ -227,23 +202,24 @@ struct EffectStateFactory {
|
||||
virtual al::intrusive_ptr<EffectState> create() = 0;
|
||||
};
|
||||
|
||||
EffectStateFactory *NullStateFactory_getFactory(void);
|
||||
EffectStateFactory *ReverbStateFactory_getFactory(void);
|
||||
EffectStateFactory *StdReverbStateFactory_getFactory(void);
|
||||
EffectStateFactory *AutowahStateFactory_getFactory(void);
|
||||
EffectStateFactory *ChorusStateFactory_getFactory(void);
|
||||
EffectStateFactory *CompressorStateFactory_getFactory(void);
|
||||
EffectStateFactory *DistortionStateFactory_getFactory(void);
|
||||
EffectStateFactory *EchoStateFactory_getFactory(void);
|
||||
EffectStateFactory *EqualizerStateFactory_getFactory(void);
|
||||
EffectStateFactory *FlangerStateFactory_getFactory(void);
|
||||
EffectStateFactory *FshifterStateFactory_getFactory(void);
|
||||
EffectStateFactory *ModulatorStateFactory_getFactory(void);
|
||||
EffectStateFactory *PshifterStateFactory_getFactory(void);
|
||||
|
||||
EffectStateFactory* NullStateFactory_getFactory(void);
|
||||
EffectStateFactory* ReverbStateFactory_getFactory(void);
|
||||
EffectStateFactory* StdReverbStateFactory_getFactory(void);
|
||||
EffectStateFactory* AutowahStateFactory_getFactory(void);
|
||||
EffectStateFactory* ChorusStateFactory_getFactory(void);
|
||||
EffectStateFactory* CompressorStateFactory_getFactory(void);
|
||||
EffectStateFactory* DistortionStateFactory_getFactory(void);
|
||||
EffectStateFactory* EchoStateFactory_getFactory(void);
|
||||
EffectStateFactory* EqualizerStateFactory_getFactory(void);
|
||||
EffectStateFactory* FlangerStateFactory_getFactory(void);
|
||||
EffectStateFactory* FshifterStateFactory_getFactory(void);
|
||||
EffectStateFactory* ModulatorStateFactory_getFactory(void);
|
||||
EffectStateFactory* PshifterStateFactory_getFactory(void);
|
||||
EffectStateFactory* VmorpherStateFactory_getFactory(void);
|
||||
|
||||
EffectStateFactory *DedicatedStateFactory_getFactory(void);
|
||||
EffectStateFactory* DedicatedStateFactory_getFactory(void);
|
||||
|
||||
EffectStateFactory *ConvolutionStateFactory_getFactory(void);
|
||||
EffectStateFactory* ConvolutionStateFactory_getFactory(void);
|
||||
|
||||
#endif /* EFFECTS_BASE_H */
|
||||
#endif /* EFFECTS_BASE_H */
|
@ -261,11 +261,6 @@ struct DeviceBase {
|
||||
void renderSamples(void *outBuffer, const uint numSamples, const size_t frameStep);
|
||||
|
||||
/* Caller must lock the device state, and the mixer must not be running. */
|
||||
#ifdef __USE_MINGW_ANSI_STDIO
|
||||
[[gnu::format(gnu_printf,2,3)]]
|
||||
#else
|
||||
[[gnu::format(printf,2,3)]]
|
||||
#endif
|
||||
void handleDisconnect(const char *msg, ...);
|
||||
|
||||
DISABLE_ALLOC()
|
||||
|
Loading…
Reference in New Issue
Block a user