DSF2FLAC
|
Defines | |
#define | FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ |
Enumerations | |
enum | cmdline_parser_arg_type { ARG_NO, ARG_FLAG, ARG_STRING, ARG_INT, ARG_FLOAT } |
Functions | |
static void | clear_given (struct gengetopt_args_info *args_info) |
static void | clear_args (struct gengetopt_args_info *args_info) |
static int | cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error) |
static int | cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error) |
static char * | gengetopt_strdup (const char *s) |
replacement of strdup, which is not standard | |
static void | init_args_info (struct gengetopt_args_info *args_info) |
void | cmdline_parser_print_version (void) |
static void | print_help_common (void) |
void | cmdline_parser_print_help (void) |
void | cmdline_parser_init (struct gengetopt_args_info *args_info) |
void | cmdline_parser_params_init (struct cmdline_parser_params *params) |
struct cmdline_parser_params * | cmdline_parser_params_create (void) |
static void | free_string_field (char **s) |
static void | cmdline_parser_release (struct gengetopt_args_info *args_info) |
static int | check_possible_values (const char *val, const char *values[]) |
static void | write_into_file (FILE *outfile, const char *opt, const char *arg, const char *values[]) |
int | cmdline_parser_dump (FILE *outfile, struct gengetopt_args_info *args_info) |
int | cmdline_parser_file_save (const char *filename, struct gengetopt_args_info *args_info) |
void | cmdline_parser_free (struct gengetopt_args_info *args_info) |
int | cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) |
int | cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) |
int | cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) |
int | cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) |
static int | update_arg (void *field, char **orig_field, unsigned int *field_given, unsigned int *prev_given, char *value, const char *possible_values[], const char *default_value, cmdline_parser_arg_type arg_type, int check_ambiguity, int override, int no_free, int multiple_option, const char *long_opt, char short_opt, const char *additional_error) |
updates an option | |
Variables | |
const char * | gengetopt_args_info_purpose = "Convert DSD audio files from DFF or DSF format into PCM flac audio." |
the purpose string of the program | |
const char * | gengetopt_args_info_usage = "Usage: dsf2flac [OPTIONS]..." |
the usage string of the program | |
const char * | gengetopt_args_info_description = "" |
const char * | gengetopt_args_info_help [] |
all the lines making the help output | |
const char * | cmdline_parser_samplerate_values [] |
Possible values for samplerate. | |
const char * | cmdline_parser_bits_values [] = { "16", "20", "24", 0 } |
Possible values for bits. | |
static char * | package_name = 0 |
#define FIX_UNUSED | ( | X | ) | (void) (X) /* avoid warnings for unused params */ |
static int check_possible_values | ( | const char * | val, |
const char * | values[] | ||
) | [static] |
val | the value to check |
values | the possible values |
static void clear_args | ( | struct gengetopt_args_info * | args_info | ) | [static] |
static void clear_given | ( | struct gengetopt_args_info * | args_info | ) | [static] |
int cmdline_parser | ( | int | argc, |
char ** | argv, | ||
struct gengetopt_args_info * | args_info | ||
) |
The command line parser
argc | the number of command line options |
argv | the command line options |
args_info | the structure where option information will be stored |
int cmdline_parser2 | ( | int | argc, |
char ** | argv, | ||
struct gengetopt_args_info * | args_info, | ||
int | override, | ||
int | initialize, | ||
int | check_required | ||
) |
The command line parser (version with additional parameters - deprecated)
argc | the number of command line options |
argv | the command line options |
args_info | the structure where option information will be stored |
override | whether to override possibly already present options |
initialize | whether to initialize the option structure my_args_info |
check_required | whether to check that all required options were provided |
int cmdline_parser_dump | ( | FILE * | outfile, |
struct gengetopt_args_info * | args_info | ||
) |
Save the contents of the option struct into an already open FILE stream.
outfile | the stream where to dump options |
args_info | the option struct to dump |
int cmdline_parser_ext | ( | int | argc, |
char ** | argv, | ||
struct gengetopt_args_info * | args_info, | ||
struct cmdline_parser_params * | params | ||
) |
The command line parser (version with additional parameters)
argc | the number of command line options |
argv | the command line options |
args_info | the structure where option information will be stored |
params | additional parameters for the parser |
int cmdline_parser_file_save | ( | const char * | filename, |
struct gengetopt_args_info * | args_info | ||
) |
Save the contents of the option struct into a (text) file. This file can be read by the config file parser (if generated by gengetopt)
filename | the file where to save |
args_info | the option struct to save |
void cmdline_parser_free | ( | struct gengetopt_args_info * | args_info | ) |
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the structure itself)
args_info | the structure to deallocate |
void cmdline_parser_init | ( | struct gengetopt_args_info * | args_info | ) |
Initializes the passed gengetopt_args_info structure's fields (also set default values for options that have a default)
args_info | the structure to initialize |
int cmdline_parser_internal | ( | int | argc, |
char ** | argv, | ||
struct gengetopt_args_info * | args_info, | ||
struct cmdline_parser_params * | params, | ||
const char * | additional_error | ||
) | [static] |
struct cmdline_parser_params* cmdline_parser_params_create | ( | void | ) | [read] |
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their default values
void cmdline_parser_params_init | ( | struct cmdline_parser_params * | params | ) |
Initializes all the fields a cmdline_parser_params structure to their default values
params | the structure to initialize |
void cmdline_parser_print_help | ( | void | ) |
Print the help
void cmdline_parser_print_version | ( | void | ) |
Print the version
static void cmdline_parser_release | ( | struct gengetopt_args_info * | args_info | ) | [static] |
int cmdline_parser_required | ( | struct gengetopt_args_info * | args_info, |
const char * | prog_name | ||
) |
Checks that all the required options were specified
args_info | the structure to check |
prog_name | the name of the program that will be used to print possible errors |
int cmdline_parser_required2 | ( | struct gengetopt_args_info * | args_info, |
const char * | prog_name, | ||
const char * | additional_error | ||
) | [static] |
static void free_string_field | ( | char ** | s | ) | [static] |
char * gengetopt_strdup | ( | const char * | s | ) | [static] |
replacement of strdup, which is not standard
static void init_args_info | ( | struct gengetopt_args_info * | args_info | ) | [static] |
static void print_help_common | ( | void | ) | [static] |
static int update_arg | ( | void * | field, |
char ** | orig_field, | ||
unsigned int * | field_given, | ||
unsigned int * | prev_given, | ||
char * | value, | ||
const char * | possible_values[], | ||
const char * | default_value, | ||
cmdline_parser_arg_type | arg_type, | ||
int | check_ambiguity, | ||
int | override, | ||
int | no_free, | ||
int | multiple_option, | ||
const char * | long_opt, | ||
char | short_opt, | ||
const char * | additional_error | ||
) | [static] |
updates an option
field | the generic pointer to the field to update |
orig_field | the pointer to the orig field |
field_given | the pointer to the number of occurrence of this option |
prev_given | the pointer to the number of occurrence already seen |
value | the argument for this option (if null no arg was specified) |
possible_values | the possible values for this option (if specified) |
default_value | the default value (in case the option only accepts fixed values) |
arg_type | the type of this option |
check_ambiguity |
override |
no_free | whether to free a possible previous value |
multiple_option | whether this is a multiple option |
long_opt | the corresponding long option |
short_opt | the corresponding short option (or '-' if none) |
additional_error | possible further error specification |
static void write_into_file | ( | FILE * | outfile, |
const char * | opt, | ||
const char * | arg, | ||
const char * | values[] | ||
) | [static] |
const char* cmdline_parser_bits_values[] = { "16", "20", "24", 0 } |
Possible values for bits.
const char* cmdline_parser_samplerate_values[] |
{ "88200", "176400", "352800", 0 }
Possible values for samplerate.
const char* gengetopt_args_info_description = "" |
const char* gengetopt_args_info_help[] |
{ " -h, --help Print help and exit", " -V, --version Print version and exit", " -r, --samplerate=Hz Output sample rate (possible values=\"88200\", \n \"176400\", \"352800\" default=`88200')", " -b, --bits=bits Output bitdepth (possible values=\"16\", \"20\", \n \"24\" default=`24')", " -n, --nodither Don't add dither before quantization (default=off)", " -s, --scale=dB Scale adjustment. Raw DSD has a modulation depth of \n approximately 0.5 so with no scaling the PCM peak \n level is approximately -6dB below 0dBFs \n (default=`4')", " -i, --infile=filepath Input DSF or DFF file", " -o, --outfile=filepath Output FLAC file, if not specified the output file be \n the same as the input file with the extension \n changed", " -d, --dop Encode DSD data directly into FLAC file without \n conversion to PCM using DoP format (DSD over PCM) \n (default=off)", 0 }
all the lines making the help output
const char* gengetopt_args_info_purpose = "Convert DSD audio files from DFF or DSF format into PCM flac audio." |
the purpose string of the program
const char* gengetopt_args_info_usage = "Usage: dsf2flac [OPTIONS]..." |
the usage string of the program
char* package_name = 0 [static] |