From bcdd1cee10f6f2ebe51191b104b0e45c261801e6 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 11 Apr 2017 07:25:55 -0700 Subject: Add a mono<->stereo converter This converter always outputs floats, and uses energy-preserving scaling. --- Alc/converter.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Alc/converter.h') diff --git a/Alc/converter.h b/Alc/converter.h index 5bbbf691..db3f1daa 100644 --- a/Alc/converter.h +++ b/Alc/converter.h @@ -35,6 +35,18 @@ void DestroySampleConverter(SampleConverter **converter); ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid **src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes); ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframes); + +typedef struct ChannelConverter { + enum DevFmtType mSrcType; + enum DevFmtChannels mSrcChans; + enum DevFmtChannels mDstChans; +} ChannelConverter; + +ChannelConverter *CreateChannelConverter(enum DevFmtType srcType, enum DevFmtChannels srcChans, enum DevFmtChannels dstChans); +void DestroyChannelConverter(ChannelConverter **converter); + +void ChannelConverterInput(ChannelConverter *converter, const ALvoid *src, ALfloat *dst, ALsizei frames); + #ifdef __cpluspluc } #endif -- cgit v1.2.3