aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/converter.h
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2017-04-11 07:25:55 -0700
committerChris Robinson <chris.kcat@gmail.com>2017-04-11 07:25:55 -0700
commitbcdd1cee10f6f2ebe51191b104b0e45c261801e6 (patch)
tree3b8bfaea2e31bab0c164430f022bce2c5b3c17aa /Alc/converter.h
parentcaae349fdc16a761cda511f74c4cc5c611f5591a (diff)
Add a mono<->stereo converter
This converter always outputs floats, and uses energy-preserving scaling.
Diffstat (limited to 'Alc/converter.h')
-rw-r--r--Alc/converter.h12
1 files changed, 12 insertions, 0 deletions
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