-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathfixed_resampler.h
More file actions
25 lines (18 loc) · 759 Bytes
/
fixed_resampler.h
File metadata and controls
25 lines (18 loc) · 759 Bytes
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
#ifndef FIXED_RESAMPLER_H_
#define FIXED_RESAMPLER_H_
#include <stdint.h>
#include <stdlib.h>
#include "mamedef.h"
struct fixed_resampler {
stream_sample_t *table;
int table_step;
int numerator, denominator;
int num_zero_crossings;
int counter;
stream_sample_t *history;
};
int fixed_resampler_init(struct fixed_resampler *resampler, stream_sample_t *table, int table_step, int num_zero_crossings, int numerator, int denominator);
int fixed_resampler_deinit(struct fixed_resampler *resampler);
int fixed_resampler_estimate(struct fixed_resampler *resampler, int output_samples);
int fixed_resampler_resample(struct fixed_resampler *resampler, stream_sample_t *in, int *in_len, stream_sample_t *out, int *out_len);
#endif /* FIXED_RESAMPLER_H_ */