]> 4ch.mooo.com Git - 16.git/blob - src/lib/doslib/ext/lame/main.h
wwww
[16.git] / src / lib / doslib / ext / lame / main.h
1 /*
2  *      Command line frontend program
3  *
4  *      Copyright (c) 1999 Mark Taylor
5  *                    2000 Takehiro TOMIANGA
6  *                    2010-2011 Robert Hegemann
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef MAIN_H_INCLUDED
25 #define MAIN_H_INCLUDED
26
27 #ifdef HAVE_LIMITS_H
28 # include <limits.h>
29 #endif
30
31 #include "get_audio.h"
32
33 #if defined(__cplusplus)
34 extern "C" {
35 #endif
36
37 #ifndef PATH_MAX
38 #define PATH_MAX 1024
39 #endif
40
41
42 /* GLOBAL VARIABLES used by parse.c and main.c.  
43    instantiated in parce.c.  ugly, ugly */
44
45 typedef struct ReaderConfig
46 {
47     sound_file_format input_format;
48     int   swapbytes;                /* force byte swapping   default=0 */
49     int   swap_channel;             /* 0: no-op, 1: swaps input channels */
50     int   input_samplerate;
51 } ReaderConfig;
52
53 typedef struct WriterConfig
54 {
55     int   flush_write;
56 } WriterConfig;
57
58 typedef struct UiConfig
59 {
60     int   silent;                   /* Verbosity */
61     int   brhist;
62     int   print_clipping_info;      /* print info whether waveform clips */
63     float update_interval;          /* to use Frank's time status display */
64 } UiConfig;
65
66 typedef struct DecoderConfig
67 {
68     int   mp3_delay;                /* to adjust the number of samples truncated during decode */
69     int   mp3_delay_set;            /* user specified the value of the mp3 encoder delay to assume for decoding */
70     int   disable_wav_header;
71     mp3data_struct mp3input_data;
72 } DecoderConfig;
73
74 typedef enum ByteOrder { ByteOrderLittleEndian, ByteOrderBigEndian } ByteOrder;
75
76 typedef struct RawPCMConfig
77 {
78     int     in_bitwidth;
79     int     in_signed;
80     ByteOrder in_endian;
81 } RawPCMConfig;
82
83 extern ReaderConfig global_reader;
84 extern WriterConfig global_writer;
85 extern UiConfig global_ui_config;
86 extern DecoderConfig global_decoder;
87 extern RawPCMConfig global_raw_pcm;
88
89
90 extern FILE* lame_fopen(char const* file, char const* mode);
91 extern char* utf8ToConsole8Bit(const char* str);
92 extern char* utf8ToLocal8Bit(const char* str);
93 extern unsigned short* utf8ToUtf16(char const* str);
94 extern char* utf8ToLatin1(char const* str);
95 #ifdef _WIN32
96 extern wchar_t* utf8ToUnicode(char const* str);
97 #endif
98
99 extern void dosToLongFileName(char* filename);
100 extern void setProcessPriority(int priority);
101
102 extern int lame_main(lame_t gf, int argc, char** argv);
103 extern char* lame_getenv(char const* var);
104
105 #if defined(__cplusplus)
106 }
107 #endif
108
109 #endif