Blame frontend/main.h

Packit 47f805
/*
Packit 47f805
 *      Command line frontend program
Packit 47f805
 *
Packit 47f805
 *      Copyright (c) 1999 Mark Taylor
Packit 47f805
 *                    2000 Takehiro TOMIANGA
Packit 47f805
 *                    2010-2011 Robert Hegemann
Packit 47f805
 *
Packit 47f805
 * This library is free software; you can redistribute it and/or
Packit 47f805
 * modify it under the terms of the GNU Library General Public
Packit 47f805
 * License as published by the Free Software Foundation; either
Packit 47f805
 * version 2 of the License, or (at your option) any later version.
Packit 47f805
 *
Packit 47f805
 * This library is distributed in the hope that it will be useful,
Packit 47f805
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 47f805
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Packit 47f805
 * Library General Public License for more details.
Packit 47f805
 *
Packit 47f805
 * You should have received a copy of the GNU Library General Public
Packit 47f805
 * License along with this library; if not, write to the
Packit 47f805
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 47f805
 * Boston, MA 02111-1307, USA.
Packit 47f805
 */
Packit 47f805
Packit 47f805
#ifndef MAIN_H_INCLUDED
Packit 47f805
#define MAIN_H_INCLUDED
Packit 47f805
Packit 47f805
#ifdef HAVE_LIMITS_H
Packit 47f805
# include <limits.h>
Packit 47f805
#endif
Packit 47f805
Packit 47f805
#include "get_audio.h"
Packit 47f805
Packit 47f805
#if defined(__cplusplus)
Packit 47f805
extern "C" {
Packit 47f805
#endif
Packit 47f805
Packit 47f805
#ifndef PATH_MAX
Packit 47f805
#define PATH_MAX 1024
Packit 47f805
#endif
Packit 47f805
Packit 47f805
Packit 47f805
/* GLOBAL VARIABLES used by parse.c and main.c.  
Packit 47f805
   instantiated in parce.c.  ugly, ugly */
Packit 47f805
Packit 47f805
typedef struct ReaderConfig
Packit 47f805
{
Packit 47f805
    sound_file_format input_format;
Packit 47f805
    int   swapbytes;                /* force byte swapping   default=0 */
Packit 47f805
    int   swap_channel;             /* 0: no-op, 1: swaps input channels */
Packit 47f805
    int   input_samplerate;
Packit 47f805
    int   ignorewavlength;
Packit 47f805
} ReaderConfig;
Packit 47f805
Packit 47f805
typedef struct WriterConfig
Packit 47f805
{
Packit 47f805
    int   flush_write;
Packit 47f805
} WriterConfig;
Packit 47f805
Packit 47f805
typedef struct UiConfig
Packit 47f805
{
Packit 47f805
    int   silent;                   /* Verbosity */
Packit 47f805
    int   brhist;
Packit 47f805
    int   print_clipping_info;      /* print info whether waveform clips */
Packit 47f805
    float update_interval;          /* to use Frank's time status display */
Packit 47f805
} UiConfig;
Packit 47f805
Packit 47f805
typedef struct DecoderConfig
Packit 47f805
{
Packit 47f805
    int   mp3_delay;                /* to adjust the number of samples truncated during decode */
Packit 47f805
    int   mp3_delay_set;            /* user specified the value of the mp3 encoder delay to assume for decoding */
Packit 47f805
    int   disable_wav_header;
Packit 47f805
    mp3data_struct mp3input_data;
Packit 47f805
} DecoderConfig;
Packit 47f805
Packit 47f805
typedef enum ByteOrder { ByteOrderLittleEndian, ByteOrderBigEndian } ByteOrder;
Packit 47f805
Packit 47f805
typedef struct RawPCMConfig
Packit 47f805
{
Packit 47f805
    int     in_bitwidth;
Packit 47f805
    int     in_signed;
Packit 47f805
    ByteOrder in_endian;
Packit 47f805
} RawPCMConfig;
Packit 47f805
Packit 47f805
extern ReaderConfig global_reader;
Packit 47f805
extern WriterConfig global_writer;
Packit 47f805
extern UiConfig global_ui_config;
Packit 47f805
extern DecoderConfig global_decoder;
Packit 47f805
extern RawPCMConfig global_raw_pcm;
Packit 47f805
Packit 47f805
Packit 47f805
extern FILE* lame_fopen(char const* file, char const* mode);
Packit 47f805
extern char* utf8ToConsole8Bit(const char* str);
Packit 47f805
extern char* utf8ToLocal8Bit(const char* str);
Packit 47f805
extern unsigned short* utf8ToUtf16(char const* str);
Packit 47f805
extern char* utf8ToLatin1(char const* str);
Packit 47f805
#ifdef _WIN32
Packit 47f805
extern wchar_t* utf8ToUnicode(char const* str);
Packit 47f805
#endif
Packit 47f805
Packit 47f805
extern void dosToLongFileName(char* filename);
Packit 47f805
extern void setProcessPriority(int priority);
Packit 47f805
Packit 47f805
extern int lame_main(lame_t gf, int argc, char** argv);
Packit 47f805
extern char* lame_getenv(char const* var);
Packit 47f805
Packit 47f805
#if defined(__cplusplus)
Packit 47f805
}
Packit 47f805
#endif
Packit 47f805
Packit 47f805
#endif