11 typedef struct SampleConverter
{
12 enum DevFmtType mSrcType
;
13 enum DevFmtType mDstType
;
23 ResamplerFunc mResample
;
25 alignas(16) ALfloat mSrcSamples
[BUFFERSIZE
];
26 alignas(16) ALfloat mDstSamples
[BUFFERSIZE
];
29 alignas(16) ALfloat mPrevSamples
[MAX_PRE_SAMPLES
+MAX_POST_SAMPLES
];
33 SampleConverter
*CreateSampleConverter(enum DevFmtType srcType
, enum DevFmtType dstType
, ALsizei numchans
, ALsizei srcRate
, ALsizei dstRate
);
34 void DestroySampleConverter(SampleConverter
**converter
);
36 ALsizei
SampleConverterInput(SampleConverter
*converter
, const ALvoid
**src
, ALsizei
*srcframes
, ALvoid
*dst
, ALsizei dstframes
);
37 ALsizei
SampleConverterAvailableOut(SampleConverter
*converter
, ALsizei srcframes
);
40 typedef struct ChannelConverter
{
41 enum DevFmtType mSrcType
;
42 enum DevFmtChannels mSrcChans
;
43 enum DevFmtChannels mDstChans
;
46 ChannelConverter
*CreateChannelConverter(enum DevFmtType srcType
, enum DevFmtChannels srcChans
, enum DevFmtChannels dstChans
);
47 void DestroyChannelConverter(ChannelConverter
**converter
);
49 void ChannelConverterInput(ChannelConverter
*converter
, const ALvoid
*src
, ALfloat
*dst
, ALsizei frames
);
55 #endif /* CONVERTER_H */