Mercurial > audlegacy
comparison src/libSAD/dither.h @ 4232:704607c1f858
1st attempt to integrate dithering and RG engine
author | Eugene Zagidullin <e.asphyx@gmail.com> |
---|---|
date | Wed, 30 Jan 2008 01:22:37 +0300 |
parents | |
children | 74c6f3d3cf1d |
comparison
equal
deleted
inserted
replaced
4225:f6625617716b | 4232:704607c1f858 |
---|---|
1 #ifndef DITHER_H | |
2 #define DITHER_H | |
3 | |
4 #include "common.h" | |
5 | |
6 #define SAD_ERROR_INCORRECT_INPUT_SAMPLEFORMAT -2 | |
7 #define SAD_ERROR_INCORRECT_OUTPUT_SAMPLEFORMAT -3 | |
8 #define SAD_ERROR_CORRUPTED_PRIVATE_DATA -4 | |
9 | |
10 typedef sad_sint32 (*SAD_get_sample_proc) (void *buf, int nch, int ch, int i); | |
11 typedef void (*SAD_put_sample_proc) (void *buf, sad_sint32 sample, int nch, int ch, int i); | |
12 | |
13 typedef struct { | |
14 SAD_get_sample_proc get_sample; | |
15 SAD_put_sample_proc put_sample; | |
16 } SAD_buffer_ops; | |
17 | |
18 /* private data */ | |
19 typedef struct {} SAD_dither_t; | |
20 | |
21 SAD_dither_t* SAD_dither_init(SAD_buffer_format *inbuf_format, SAD_buffer_format *outbuf_format, int *error); | |
22 int SAD_dither_free(SAD_dither_t* state); | |
23 int SAD_dither_process_buffer (SAD_dither_t *state, void *inbuf, void *outbuf, int frames); | |
24 int SAD_dither_apply_replaygain (SAD_dither_t *state, SAD_replaygain_info *rg_info, SAD_replaygain_mode *mode); | |
25 int SAD_dither_set_scale (SAD_dither_t *state, float scale); | |
26 int SAD_dither_set_dither (SAD_dither_t *state, int dither); | |
27 | |
28 #endif |