2 * Command line frontend program
4 * Copyright (c) 1999 Mark Taylor
5 * 2000 Takehiro TOMIANGA
6 * 2010-2011 Robert Hegemann
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.
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.
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.
24 #ifndef MAIN_H_INCLUDED
25 #define MAIN_H_INCLUDED
31 #include "get_audio.h"
33 #if defined(__cplusplus)
42 /* GLOBAL VARIABLES used by parse.c and main.c.
43 instantiated in parce.c. ugly, ugly */
45 typedef struct ReaderConfig
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 */
53 typedef struct WriterConfig
58 typedef struct UiConfig
60 int silent; /* Verbosity */
62 int print_clipping_info; /* print info whether waveform clips */
63 float update_interval; /* to use Frank's time status display */
66 typedef struct DecoderConfig
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;
74 typedef enum ByteOrder { ByteOrderLittleEndian, ByteOrderBigEndian } ByteOrder;
76 typedef struct RawPCMConfig
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;
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);
96 extern wchar_t* utf8ToUnicode(char const* str);
99 extern void dosToLongFileName(char* filename);
100 extern void setProcessPriority(int priority);
102 extern int lame_main(lame_t gf, int argc, char** argv);
103 extern char* lame_getenv(char const* var);
105 #if defined(__cplusplus)