aboutsummaryrefslogtreecommitdiffstats
path: root/alc/voice.h
diff options
context:
space:
mode:
Diffstat (limited to 'alc/voice.h')
-rw-r--r--alc/voice.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/alc/voice.h b/alc/voice.h
index 96975efa..8f3476f1 100644
--- a/alc/voice.h
+++ b/alc/voice.h
@@ -15,6 +15,7 @@
#include "core/filters/splitter.h"
#include "core/mixer/defs.h"
#include "core/mixer/hrtfdefs.h"
+#include "core/uhjfilter.h"
#include "vector.h"
struct ALCcontext;
@@ -37,6 +38,12 @@ enum class DirectMode : unsigned char {
};
+/* Maximum number of extra source samples that may need to be loaded, for
+ * resampling or conversion purposes.
+ */
+constexpr uint MaxPostVoiceLoad{MaxResamplerEdge + UhjDecoder::sFilterDelay};
+
+
enum {
AF_None = 0,
AF_LowPass = 1,
@@ -191,11 +198,13 @@ struct Voice {
FmtChannels mFmtChannels;
FmtType mFmtType;
uint mFrequency;
- uint mSampleSize;
+ uint mFrameSize;
AmbiLayout mAmbiLayout;
AmbiScaling mAmbiScaling;
uint mAmbiOrder;
+ std::unique_ptr<UhjDecoder> mDecoder;
+
/** Current target parameters used for mixing. */
uint mStep{0};
@@ -218,7 +227,9 @@ struct Voice {
* now current (which may be overwritten if the buffer data is still
* available).
*/
- using BufferLine = std::array<float,BufferLineSize+MaxResamplerPadding>;
+ static constexpr size_t LineSize{BufferLineSize + MaxResamplerPadding +
+ UhjDecoder::sFilterDelay};
+ using BufferLine = std::array<float,LineSize>;
al::vector<BufferLine,16> mVoiceSamples{2};
struct ChannelData {