diff options
author | Chris Robinson <[email protected]> | 2018-12-29 12:26:45 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-29 12:26:45 -0800 |
commit | 8a84e7b662959015ee1e7d066351e5b7cc4fe283 (patch) | |
tree | 61d58fc4dc8d638ee45dff138754d1ccef84bd53 /Alc/converter.h | |
parent | 9b0b722d7209d3cb8a31ba0823ef252906e2eb5d (diff) |
Use member functions for the sample and channel converters
Diffstat (limited to 'Alc/converter.h')
-rw-r--r-- | Alc/converter.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/converter.h b/Alc/converter.h index 6c76be07..504d60a7 100644 --- a/Alc/converter.h +++ b/Alc/converter.h @@ -28,6 +28,9 @@ struct SampleConverter { alignas(16) ALfloat mPrevSamples[MAX_RESAMPLE_PADDING*2]; } Chan[]; + ALsizei convert(const ALvoid **src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes); + ALsizei availableOut(ALsizei srcframes) const; + DEF_PLACE_NEWDEL() }; using SampleConverterPtr = std::unique_ptr<SampleConverter>; @@ -35,9 +38,6 @@ using SampleConverterPtr = std::unique_ptr<SampleConverter>; SampleConverterPtr CreateSampleConverter(DevFmtType srcType, DevFmtType dstType, ALsizei numchans, ALsizei srcRate, ALsizei dstRate, Resampler resampler); -ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid **src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes); -ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframes); - struct ChannelConverter { DevFmtType mSrcType; @@ -47,6 +47,9 @@ struct ChannelConverter { 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>; @@ -54,7 +57,4 @@ using ChannelConverterPtr = std::unique_ptr<ChannelConverter>; ChannelConverterPtr CreateChannelConverter(DevFmtType srcType, DevFmtChannels srcChans, DevFmtChannels dstChans); -void ChannelConverterInput(ChannelConverter *converter, const ALvoid *src, ALfloat *dst, - ALsizei frames); - #endif /* CONVERTER_H */ |