-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.h
68 lines (58 loc) · 2.85 KB
/
main.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef MAIN_H
#define MAIN_H
/* Some version numbers */
#define WAVEGAIN_VERSION "1.3.2"
#define BUFFER_LEN 16384
#define LOG_NAME "WGLog.txt"
#define NO_GAIN -10000.f
#ifdef _WIN32
#include <windows.h>
#endif
/** Information about a file to process */
typedef struct file_list
{
struct file_list* next_file;
const char* filename;
double track_gain;
double track_peak;
double dc_offset[2];
double offset[2];
} FILE_LIST;
/** Settings and misc other global data */
typedef struct settings
{
FILE_LIST* file_list; /**< Files to process (possibly as an album) */
#ifdef ENABLE_RECURSIVE
char* pattern; /**< Pattern to match file names against */
int recursive;
#endif
int first_file; /**< About to process first file in directory */
double man_gain; /**< Apply Manual Gain entered by user */
double album_peak; /**< Will end up storing the highest value of the tracks analyzed */
int audiophile; /**< Calculate Album gain */
int scale; /**< write Scale values to stdout */
int apply_gain; /**< Apply the calculated gain - album or track */
int write_chunk; /**< Write a 'gain' chunk containing the scalefactor applied to the wave data */
int force; /**< Force a file to be re-replaygained when 'gain' chunk present */
int undo; /**< Read the value in the 'gain' chunk and re-scale the data */
int set_album_gain; /**< Don't apply the calculated album gain if set */
int fast; /**< Use the fast routines for RG analysis */
int std_out; /**< Write output file to stdout */
int radio; /**< Calculate Title gain */
int adc; /**< Apply Album based DC Offset correction (default is Track based) */
int no_offset; /**< Do NOT apply any DC Offset */
int write_log; /**< Write a log of gain calculations, etc */
char *log_data; /**< Pointer to data to be written to log file */
int clip_prev; /**< Whether, or not, to apply clipping prevention */
int dithering; /**< Apply dithering to output */
int shapingtype; /**< Noise shaping to use in dithering */
int limiter; /**< Apply Hard limiter */
unsigned int outbitwidth; /**< bitwidth of desired output */
unsigned int format; /**< format of desired output */
int need_to_process; /**< need to process even if peak unchanged */
char* cmd;
} SETTINGS;
extern int add_to_list(FILE_LIST** list, const char* file);
extern void free_list(FILE_LIST* list);
extern int process_files(FILE_LIST* file_list, SETTINGS* settings, const char* dir);
#endif /* MAIN_H */