summaryrefslogtreecommitdiff
path: root/plugins/gme/game-music-emu-0.6pre/gme/Downsampler.h
blob: 8ce85e27561f905cb9559ec87f4116d0291e9715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Linear downsampler with pre-low-pass

// Game_Music_Emu 0.6-pre
#ifndef DOWNSAMPLER_H
#define DOWNSAMPLER_H

#include "Resampler.h"

class Downsampler : public Resampler {
public:
	Downsampler();

protected:
	virtual blargg_err_t set_rate_( double );
	virtual void clear_();
	virtual sample_t const* resample_( sample_t**, sample_t const*, sample_t const [], int );

private:
	enum { stereo = 2 };
	enum { write_offset = 8 * stereo };
	int pos;
	int step;
};

#endif