aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/converter.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-07-28 18:56:04 -0700
committerChris Robinson <[email protected]>2019-07-28 18:56:04 -0700
commitcb3e96e75640730b9391f0d2d922eecd9ee2ce79 (patch)
tree23520551bddb2a80354e44da47f54201fdc084f0 /Alc/converter.h
parent93e60919c8f387c36c267ca9faa1ac653254aea6 (diff)
Rename Alc to alc
Diffstat (limited to 'Alc/converter.h')
-rw-r--r--Alc/converter.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/Alc/converter.h b/Alc/converter.h
deleted file mode 100644
index 033e4d3f..00000000
--- a/Alc/converter.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef CONVERTER_H
-#define CONVERTER_H
-
-#include <memory>
-
-#include "alcmain.h"
-#include "alu.h"
-#include "almalloc.h"
-
-struct SampleConverter {
- DevFmtType mSrcType{};
- DevFmtType mDstType{};
- ALsizei mSrcTypeSize{};
- ALsizei mDstTypeSize{};
-
- ALint mSrcPrepCount{};
-
- ALsizei mFracOffset{};
- ALsizei mIncrement{};
- InterpState mState{};
- ResamplerFunc mResample{};
-
- alignas(16) ALfloat mSrcSamples[BUFFERSIZE]{};
- alignas(16) ALfloat mDstSamples[BUFFERSIZE]{};
-
- struct ChanSamples {
- alignas(16) ALfloat PrevSamples[MAX_RESAMPLE_PADDING*2];
- };
- al::FlexArray<ChanSamples> mChan;
-
- SampleConverter(size_t numchans) : mChan{numchans} { }
- SampleConverter(const SampleConverter&) = delete;
- SampleConverter& operator=(const SampleConverter&) = delete;
-
- ALsizei convert(const ALvoid **src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes);
- ALsizei availableOut(ALsizei srcframes) const;
-
- static constexpr size_t Sizeof(size_t length) noexcept
- {
- return maxz(sizeof(SampleConverter),
- al::FlexArray<ChanSamples>::Sizeof(length, offsetof(SampleConverter, mChan)));
- }
-
- DEF_PLACE_NEWDEL()
-};
-using SampleConverterPtr = std::unique_ptr<SampleConverter>;
-
-SampleConverterPtr CreateSampleConverter(DevFmtType srcType, DevFmtType dstType, ALsizei numchans,
- ALsizei srcRate, ALsizei dstRate, Resampler resampler);
-
-
-struct ChannelConverter {
- DevFmtType mSrcType;
- DevFmtChannels mSrcChans;
- DevFmtChannels mDstChans;
-
- ChannelConverter(DevFmtType srctype, DevFmtChannels srcchans, DevFmtChannels dstchans)
- : mSrcType(srctype), mSrcChans(srcchans), mDstChans(dstchans)
- { }
-
- void convert(const ALvoid *src, ALfloat *dst, ALsizei frames) const;
-
- DEF_NEWDEL(ChannelConverter)
-};
-using ChannelConverterPtr = std::unique_ptr<ChannelConverter>;
-
-ChannelConverterPtr CreateChannelConverter(DevFmtType srcType, DevFmtChannels srcChans,
- DevFmtChannels dstChans);
-
-#endif /* CONVERTER_H */