3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / media / media-add-ons / mixer / Resampler.h
blobf19a5798d0dc7dfb344f5a98e9facd99275af9ed
1 /*
2 * Copyright 2003 Marcus Overhagen
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _RESAMPLER_H
6 #define _RESAMPLER_H
9 #include <SupportDefs.h>
12 class Resampler {
13 public:
14 Resampler(uint32 sourceFormat,
15 uint32 destFormat);
17 status_t InitCheck() const;
19 void Resample(const void* src, int32 srcSampleOffset,
20 int32 srcSampleCount, void* dest,
21 int32 destSampleOffset,
22 int32 destSampleCount, float gain);
24 protected:
25 Resampler();
26 void (*fFunc)(Resampler* object, const void* src,
27 int32 srcSampleOffset, int32 srcSampleCount,
28 void* dest, int32 destSampleOffset,
29 int32 destSampleCount, float gain);
33 inline void
34 Resampler::Resample(const void *src, int32 srcSampleOffset,
35 int32 srcSampleCount, void *dest, int32 destSampleOffset,
36 int32 destSampleCount, float gain)
38 (*fFunc)(this, src, srcSampleOffset, srcSampleCount, dest, destSampleOffset,
39 destSampleCount, gain);
42 #endif // _RESAMPLER_H