diff options
author | Chris Robinson <[email protected]> | 2020-11-27 21:40:02 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-11-27 21:40:02 -0800 |
commit | 7e798df7b87dc4ca4821e3b16e337d7106c7e1cf (patch) | |
tree | f0394fd2b75615004740a91dbc2a12bdd31fa410 /alc/converter.h | |
parent | b0919240ab73f2e340f26a913baf7524b35a4c85 (diff) |
Avoid AL types in the converter
Diffstat (limited to 'alc/converter.h')
-rw-r--r-- | alc/converter.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/alc/converter.h b/alc/converter.h index a97d1ea5..392c95e5 100644 --- a/alc/converter.h +++ b/alc/converter.h @@ -13,17 +13,19 @@ #include "core/devformat.h" #include "voice.h" +using uint = unsigned int; + struct SampleConverter { DevFmtType mSrcType{}; DevFmtType mDstType{}; - ALuint mSrcTypeSize{}; - ALuint mDstTypeSize{}; + uint mSrcTypeSize{}; + uint mDstTypeSize{}; int mSrcPrepCount{}; - ALuint mFracOffset{}; - ALuint mIncrement{}; + uint mFracOffset{}; + uint mIncrement{}; InterpState mState{}; ResamplerFunc mResample{}; @@ -37,26 +39,26 @@ struct SampleConverter { SampleConverter(size_t numchans) : mChan{numchans} { } - ALuint convert(const void **src, ALuint *srcframes, void *dst, ALuint dstframes); - ALuint availableOut(ALuint srcframes) const; + uint convert(const void **src, uint *srcframes, void *dst, uint dstframes); + uint availableOut(uint srcframes) const; DEF_FAM_NEWDEL(SampleConverter, mChan) }; using SampleConverterPtr = std::unique_ptr<SampleConverter>; SampleConverterPtr CreateSampleConverter(DevFmtType srcType, DevFmtType dstType, size_t numchans, - ALuint srcRate, ALuint dstRate, Resampler resampler); + uint srcRate, uint dstRate, Resampler resampler); struct ChannelConverter { DevFmtType mSrcType{}; - ALuint mSrcStep{}; - ALuint mChanMask{}; + uint mSrcStep{}; + uint mChanMask{}; DevFmtChannels mDstChans{}; bool is_active() const noexcept { return mChanMask != 0; } - void convert(const void *src, float *dst, ALuint frames) const; + void convert(const void *src, float *dst, uint frames) const; }; #endif /* CONVERTER_H */ |