twolame-0.4.0/0000755000015600001630000000000013550126555010167 500000000000000twolame-0.4.0/frontend/0000755000015600001630000000000013550126555012006 500000000000000twolame-0.4.0/frontend/Makefile.am0000644000015600001630000000041513550126461013756 00000000000000 AM_CFLAGS = -I$(top_srcdir)/build/ -I$(top_srcdir)/libtwolame/ $(SNDFILE_CFLAGS) $(WARNING_CFLAGS) bin_PROGRAMS = @TWOLAME_BIN@ EXTRA_PROGRAMS = twolame twolame_SOURCES = frontend.c frontend.h twolame_LDADD = $(top_builddir)/libtwolame/libtwolame.la $(SNDFILE_LIBS) twolame-0.4.0/frontend/frontend.c0000644000015600001630000006772613550126461013727 00000000000000/* * TwoLAME: an optimized MPEG Audio Layer Two encoder * * Copyright (C) 2004-2018 The TwoLAME Project * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #include #include #include #include #include "frontend.h" /* Global Variables */ int single_frame_mode = FALSE; // only encode a single frame of MPEG audio ? int channelswap = FALSE; // swap left and right channels ? SF_INFO sfinfo; // contains information about input file format int stdin_input = FALSE; /* we're going to read from stdin */ char inputfilename[MAX_NAME_SIZE] = "\0"; char outputfilename[MAX_NAME_SIZE] = "\0"; /* new_extension() Puts a new extension name on a file name . Removes the last extension name, if any. */ static void new_extension(char *filename, char *extname, char *newname) { int found, dotpos; // First, strip the old extension dotpos = strlen(filename); found = 0; do { switch (filename[dotpos]) { case '.': found = 1; break; case '\\': case '/': case ':': found = -1; break; default: dotpos--; if (dotpos < 0) found = -1; break; } } while (found == 0); if (found == -1) { strncpy(newname, filename, MAX_NAME_SIZE-1); } if (found == 1) { strncpy(newname, filename, dotpos); newname[dotpos] = '\0'; } // Make sure there is room in the string for the // new filename and the extension if (strlen(newname) + strlen(extname) < MAX_NAME_SIZE-1) { strcat(newname, extname); } } static char *format_filesize_string(char *string, int string_size, int filesize) { #define CONST_KB (1024) #define CONST_MB (CONST_KB*CONST_KB) #define CONST_GB (CONST_KB*CONST_KB*CONST_KB) if (filesize < CONST_KB) { snprintf(string, string_size, "%d bytes", filesize); } else if (filesize < CONST_MB) { snprintf(string, string_size, "%2.2f KB", (float) filesize / CONST_KB); } else if (filesize < CONST_GB) { snprintf(string, string_size, "%2.2f MB", (float) filesize / CONST_MB); } else { snprintf(string, string_size, "%2.2f GB", (float) filesize / CONST_GB); } return string; } /* print_filenames() Display the input and output filenames */ static void print_filenames(int verbosity) { char *ifn, *ofn; if (strcmp(inputfilename, "-") == 0) ifn = "STDIN"; else ifn = inputfilename; if (strcmp(outputfilename, "-") == 0) ofn = "STDOUT"; else ofn = outputfilename; if (verbosity == 1) { fprintf(stderr, "Encoding %s to %s\n", ifn, ofn); } else if (verbosity > 1) { fprintf(stderr, "---------------------------------------------------------\n"); fprintf(stderr, "Input Filename: %s\n", ifn); fprintf(stderr, "Output Filename: %s\n", ofn); } } /* usage_long() Display the extended usage information */ static void usage_long() { fprintf(stderr, "TwoLAME version %s (%s)\n", get_twolame_version(), get_twolame_url()); fprintf(stderr, "MPEG Audio Layer II (MP2) encoder\n"); fprintf(stderr, "Usage: \n"); fprintf(stderr, "\ttwolame [options] [outfile]\n"); fprintf(stderr, "\n"); fprintf(stderr, "Both input and output filenames can be set to - to use stdin/stdout.\n"); fprintf(stderr, " input sound file (any format supported by libsndfile)\n"); fprintf(stderr, " output bit stream of encoded audio\n"); fprintf(stderr, "\nInput Options\n"); fprintf(stderr, "\t-r, --raw-input input is raw signed PCM audio\n"); fprintf(stderr, "\t-x, --byte-swap force byte-swapping of input\n"); fprintf(stderr, "\t-s, --samplerate srate sampling frequency of raw input (Hz)\n"); fprintf(stderr, "\t --samplesize bits size of raw input samples in bits (default 16-bit)\n"); fprintf(stderr, "\t-N, --channels nch number of channels in raw input\n"); fprintf(stderr, "\t-g, --swap-channels swap channels of input file\n"); fprintf(stderr, "\t --scale value scale input (multiply PCM data)\n"); fprintf(stderr, "\t --scale-l value scale channel 0 (left) input\n"); fprintf(stderr, "\t --scale-r value scale channel 1 (right) input\n"); fprintf(stderr, "\nOutput Options\n"); fprintf(stderr, "\t-m, --mode mode (s)tereo, (j)oint, (d)ual, (m)ono or (a)uto\n"); fprintf(stderr, "\t-a, --downmix downmix from stereo to mono file for mono encoding\n"); fprintf(stderr, "\t-b, --bitrate br total bitrate in kbps (default 192 for 44.1kHz)\n"); fprintf(stderr, "\t-P, --psyc-mode psyc psychoacoustic model -1 to 4 (default 3)\n"); fprintf(stderr, "\t-v, --vbr enable VBR mode\n"); fprintf(stderr, "\t-V, --vbr-level lev enable VBR and set VBR level -50 to 50 (default 5)\n"); fprintf(stderr, "\t-B, --max-bitrate rate set the upper bitrate when in VBR mode\n"); fprintf(stderr, "\t-l, --ath lev ATH level (default 0.0)\n"); fprintf(stderr, "\t-q, --quick num only calculate psy model every num frames\n"); fprintf(stderr, "\t-S, --single-frame only encode a single frame of MPEG Audio\n"); fprintf(stderr, "\t --freeformat create a free format bitstream\n"); fprintf(stderr, "\nMiscellaneous Options\n"); fprintf(stderr, "\t-c, --copyright mark as copyright\n"); fprintf(stderr, "\t --non-copyright mark as non-copyright (default)\n"); fprintf(stderr, "\t-o, --non-original mark as non-original\n"); fprintf(stderr, "\t --original mark as original (default)\n"); fprintf(stderr, "\t --private-ext set the private extension bit\n"); fprintf(stderr, "\t-p, --protect enable CRC error protection\n"); fprintf(stderr, "\t-d, --padding enable frame padding\n"); fprintf(stderr, "\t-R, --reserve-bits num set number of reserved bits in each frame\n"); fprintf(stderr, "\t-e, --deemphasis emp de-emphasis n/5/c (default: (n)one)\n"); fprintf(stderr, "\t-E, --energy turn on energy level extensions\n"); fprintf(stderr, "\nVerbosity Options\n"); fprintf(stderr, "\t-t, --talkativity num talkativity 0-10 (default is 2)\n"); fprintf(stderr, "\t --quiet same as --talkativity=0\n"); fprintf(stderr, "\t --brief same as --talkativity=1\n"); fprintf(stderr, "\t --verbose same as --talkativity=4\n"); fprintf(stderr, "\n"); fprintf(stderr, "\nAllowable bitrates for 32, 44.1 and 48kHz sample input (MPEG-1)\n"); fprintf(stderr, " 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384\n"); fprintf(stderr, "\nAllowable bitrates for 16, 22.05 and 24kHz sample input (MPEG-2)\n"); fprintf(stderr, " 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160\n"); fprintf(stderr, "\n"); exit(ERR_NO_ENCODE); } /* usage_short() Display the short usage information */ static void usage_short() { /* print a bit of info about the program */ fprintf(stderr, "TwoLAME version %s (%s)\n", get_twolame_version(), get_twolame_url()); fprintf(stderr, "MPEG Audio Layer II (MP2) encoder\n\n"); fprintf(stderr, "Usage: twolame [options] [outfile]\n\n"); fprintf(stderr, "Try \"twolame --help\" for more information.\n"); exit(ERR_NO_ENCODE); } /* build_shortopt_string() Creates a short args string from the options structure for use with getopt_long */ static char *build_shortopt_string(char *shortstr, struct option *opts) { int c = 0, n = 0; // And loop through the options again for (n = 0; opts[n].val != 0; n++) { if (opts[n].val > 0 && opts[n].val < 127) { shortstr[c++] = opts[n].val; if (opts[n].has_arg == optional_argument) { fprintf(stderr, "gah: can't do optional arguments\n"); } else if (opts[n].has_arg == required_argument) { shortstr[c++] = ':'; } } } // Finally - terminate the string shortstr[c] = '\0'; return shortstr; } /* parse_args() Parse the command line arguments */ static void parse_args(int argc, char **argv, twolame_options * encopts) { int ch = 0; int use_raw = FALSE; // use raw input? int sample_size = DEFAULT_SAMPLESIZE; // number of bits per sample for raw input int byteswap = FALSE; // swap endian on input audio ? char *shortopts; // process args struct option longopts[] = { // Input {"raw-input", no_argument, NULL, 'r'}, {"byte-swap", no_argument, NULL, 'x'}, {"samplerate", required_argument, NULL, 's'}, {"samplesize", required_argument, NULL, 1000}, {"channels", required_argument, NULL, 'N'}, {"swap-channels", no_argument, NULL, 'g'}, {"scale", required_argument, NULL, 1001}, {"scale-l", required_argument, NULL, 1002}, {"scale-r", required_argument, NULL, 1003}, // Output {"mode", required_argument, NULL, 'm'}, {"downmix", no_argument, NULL, 'a'}, {"bitrate", required_argument, NULL, 'b'}, {"psyc-mode", required_argument, NULL, 'P'}, {"vbr", no_argument, NULL, 'v'}, {"vbr-level", required_argument, NULL, 'V'}, {"max-bitrate", required_argument, NULL, 'B'}, {"ath", required_argument, NULL, 'l'}, {"quick", required_argument, NULL, 'q'}, {"single-frame", no_argument, NULL, 'S'}, {"freeformat", no_argument, NULL, 1009}, // Misc {"copyright", no_argument, NULL, 'c'}, {"non-copyright", no_argument, NULL, 1004}, {"non-original", no_argument, NULL, 'o'}, {"original", no_argument, NULL, 1005}, {"private-ext", no_argument, NULL, 1011}, {"protect", no_argument, NULL, 'p'}, {"padding", no_argument, NULL, 'd'}, {"reserve-bits", required_argument, NULL, 'R'}, {"deemphasis", required_argument, NULL, 'e'}, {"energy", no_argument, NULL, 'E'}, // Verbosity {"talkativity", required_argument, NULL, 't'}, {"quiet", no_argument, NULL, 1006}, {"brief", no_argument, NULL, 1007}, {"verbose", no_argument, NULL, 1008}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0} }; // Start by counting the number of options while (longopts[ch].val != 0) { ch++; } // Create a short options structure from the long one shortopts = (char *) malloc((ch * 2) + 1); if (shortopts == NULL) { fprintf(stderr,"Error: parse_args failed memory allocation\n"); exit(ERR_MEM_ALLOC); } build_shortopt_string(shortopts, longopts); // fprintf(stderr,"shortopts: %s\n", shortopts); // Input format defaults memset(&sfinfo, 0, sizeof(sfinfo)); sfinfo.format = 0; sfinfo.samplerate = DEFAULT_SAMPLERATE; sfinfo.channels = DEFAULT_CHANNELS; sfinfo.frames = 0; while ((ch = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) { switch (ch) { // Input case 'r': use_raw = 1; break; case 'x': byteswap = TRUE; break; case 's': twolame_set_out_samplerate(encopts, atoi(optarg)); sfinfo.samplerate = atoi(optarg); break; case 1000: // --samplesize sample_size = atoi(optarg); break; case 'N': sfinfo.channels = atoi(optarg); break; case 'g': channelswap = TRUE; break; case 1001: // --scale twolame_set_scale(encopts, atof(optarg)); break; case 1002: // --scale-l twolame_set_scale_left(encopts, atof(optarg)); break; case 1003: // --scale-r twolame_set_scale_right(encopts, atof(optarg)); break; // Output case 'm': if (*optarg == 's') { twolame_set_mode(encopts, TWOLAME_STEREO); } else if (*optarg == 'd') { twolame_set_mode(encopts, TWOLAME_DUAL_CHANNEL); } else if (*optarg == 'j') { twolame_set_mode(encopts, TWOLAME_JOINT_STEREO); } else if (*optarg == 'm') { twolame_set_mode(encopts, TWOLAME_MONO); } else if (*optarg == 'a') { twolame_set_mode(encopts, TWOLAME_AUTO_MODE); } else { fprintf(stderr, "Error: mode must be a/s/d/j/m not '%s'\n\n", optarg); usage_long(); } break; case 'a': // downmix twolame_set_mode(encopts, TWOLAME_MONO); break; case 'b': twolame_set_bitrate(encopts, atoi(optarg)); break; case 'P': twolame_set_psymodel(encopts, atoi(optarg)); break; case 'v': twolame_set_VBR(encopts, TRUE); break; case 'V': twolame_set_VBR(encopts, TRUE); twolame_set_VBR_level(encopts, atof(optarg)); break; case 'B': twolame_set_VBR_max_bitrate_kbps(encopts, atoi(optarg)); break; case 'l': twolame_set_ATH_level(encopts, atof(optarg)); break; case 'q': twolame_set_quick_mode(encopts, TRUE); twolame_set_quick_count(encopts, atoi(optarg)); break; case 'S': single_frame_mode = TRUE; break; case 1009: twolame_set_freeformat(encopts, TRUE); break; // Miscellaneous case 'c': twolame_set_copyright(encopts, TRUE); break; case 1004: // --non-copyright twolame_set_copyright(encopts, FALSE); break; case 'o': // --non-original twolame_set_original(encopts, FALSE); break; case 1005: // --original twolame_set_original(encopts, TRUE); break; case 1011: // --private-ext twolame_set_extension(encopts, TRUE); break; case 'p': twolame_set_error_protection(encopts, TRUE); break; case 'd': twolame_set_padding(encopts, TWOLAME_PAD_ALL); break; case 'R': twolame_set_num_ancillary_bits(encopts, atoi(optarg)); break; case 'e': if (*optarg == 'n') twolame_set_emphasis(encopts, TWOLAME_EMPHASIS_N); else if (*optarg == '5') twolame_set_emphasis(encopts, TWOLAME_EMPHASIS_5); else if (*optarg == 'c') twolame_set_emphasis(encopts, TWOLAME_EMPHASIS_C); else { fprintf(stderr, "Error: emphasis must be n/5/c not '%s'\n\n", optarg); usage_long(); } break; case 'E': twolame_set_energy_levels(encopts, TRUE); break; // Verbosity case 't': twolame_set_verbosity(encopts, atoi(optarg)); break; case 1006: // --quiet twolame_set_verbosity(encopts, 0); break; case 1007: // --brief twolame_set_verbosity(encopts, 1); break; case 1008: // --verbose twolame_set_verbosity(encopts, 4); break; case 'h': usage_long(); break; default: usage_short(); break; } } free(shortopts); // Look for the input and output file names argc -= optind; argv += optind; while (argc) { if (inputfilename[0] == '\0') strncpy(inputfilename, *argv, MAX_NAME_SIZE-1); else if (outputfilename[0] == '\0') strncpy(outputfilename, *argv, MAX_NAME_SIZE-1); else { fprintf(stderr, "excess argument: %s\n", *argv); usage_short(); } argv++; argc--; } /* fill sfinfo struct in case of raw input file */ if (use_raw) { sfinfo.format = SF_FORMAT_RAW; switch (sample_size) { case 8: sfinfo.format |= SF_FORMAT_PCM_S8; break; case 16: sfinfo.format |= SF_FORMAT_PCM_16; break; case 24: sfinfo.format |= SF_FORMAT_PCM_24; break; case 32: sfinfo.format |= SF_FORMAT_PCM_32; break; default: fprintf(stderr, "Unsupported sample size: %d\n", sample_size); usage_short(); } if (byteswap) { union { unsigned char b[2]; unsigned short s; } detect_endian; detect_endian.b[0] = 0x34; detect_endian.b[1] = 0x12; if (detect_endian.s == 0x1234) { /* we are on a little endian system */ sfinfo.format |= SF_ENDIAN_BIG; } else { /* we are on a big endian system */ sfinfo.format |= SF_ENDIAN_LITTLE; } } } // Check that we now have input and output file names ok if (inputfilename[0] == '\0') { fprintf(stderr, "Missing input filename.\n"); usage_short(); } if (outputfilename[0] == '\0' && strcmp(inputfilename, "-") != 0) { // Create output filename from the inputfilename // and change the suffix new_extension(inputfilename, OUTPUT_SUFFIX, outputfilename); } if (outputfilename[0] == '\0') { fprintf(stderr, "Missing output filename.\n"); usage_short(); } // Check -r is supplied when reading from STDIN if (strcmp(inputfilename, "-") == 0 && !use_raw) { fprintf(stderr, "Error: please use RAW audio '-r' switch when reading from STDIN.\n"); usage_short(); } if (strcmp(inputfilename, "-") == 0) stdin_input = TRUE; } static FILE *open_output_file(char *filename) { FILE *file = NULL; // Do they want STDOUT ? if (strncmp(filename, "-", 1) == 0) { file = stdout; } else { file = fopen(filename, "wb"); } // Check for errors if (file == NULL) { perror("Failed to open output file"); exit(ERR_OPENING_OUTPUT); } return file; } static SNDFILE *open_input_sndfile(const char *filename, SF_INFO * sfinfo) { // Open the input file by filename SNDFILE *file = sf_open(filename, SFM_READ, sfinfo); // Check for errors if (file == NULL) { fprintf(stderr, "Failed to open input file (%s):\n", filename); fprintf(stderr, " %s\n", sf_strerror(NULL)); exit(ERR_OPENING_INPUT); } /* enable scaling for floating point input files */ sf_command(file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE); return file; } /* format_duration_string() Create human readable duration string from libsndfile info */ static char *format_duration_string(SF_INFO * sfinfo, char *string, int string_size) { float seconds = 0.0f; int minutes = 0; if (sfinfo->frames == 0 || sfinfo->samplerate == 0) { snprintf(string, string_size, "Unknown"); } else { // Calculate the number of minutes and seconds seconds = sfinfo->frames / sfinfo->samplerate; minutes = (seconds / 60); seconds -= (minutes * 60); // Create a string out of it snprintf(string, string_size, "%imin %1.1fsec", minutes, seconds); } return string; } /* print_info_sndfile() Display information about input file */ static void print_info_sndfile(SNDFILE *file, SF_INFO *sfinfo, unsigned int total_frames) { SF_FORMAT_INFO format_info; SF_FORMAT_INFO subformat_info; char sndlibver[128]; char duration[40]; // Get the format format_info.format = sfinfo->format & SF_FORMAT_TYPEMASK; sf_command(file, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info)); // Get the sub-format info subformat_info.format = sfinfo->format & SF_FORMAT_SUBMASK; sf_command(file, SFC_GET_FORMAT_INFO, &subformat_info, sizeof(subformat_info)); // Get the version of libsndfile sf_command(file, SFC_GET_LIB_VERSION, sndlibver, sizeof(sndlibver)); fprintf(stderr, "Input Format: %s, %s\n", format_info.name, subformat_info.name); if (total_frames) { // Get human readable duration of the input file format_duration_string(sfinfo, duration, sizeof(duration)); fprintf(stderr, "Input Duration: %s\n", duration); } fprintf(stderr, "Input Library: %s\n", sndlibver); } int main(int argc, char **argv) { twolame_options *encopts = NULL; SNDFILE *inputfile = NULL; FILE *outputfile = NULL; short int *pcmaudio = NULL; unsigned int frame_count = 0; unsigned int total_samples = 0; unsigned int total_frames = 0; unsigned int total_bytes = 0; unsigned char *mp2buffer = NULL; int samples_read = 0; int mp2fill_size = 0; int audioReadSize = 0; char filesize[20]; // Initialise Encoder Options Structure encopts = twolame_init(); if (encopts == NULL) { fprintf(stderr, "Error: initializing libtwolame encoder failed.\n"); exit(ERR_MEM_ALLOC); } // Get options and parameters from the command line parse_args(argc, argv, encopts); // Display the filenames print_filenames(twolame_get_verbosity(encopts)); // Open the input file inputfile = open_input_sndfile(inputfilename, &sfinfo); // Calculate the size and number of frames we are going to encode if (sfinfo.frames && !stdin_input) total_frames = (sfinfo.frames -1) / TWOLAME_SAMPLES_PER_FRAME +1; else total_frames = 0; // Display input information if (twolame_get_verbosity(encopts) > 1) { print_info_sndfile(inputfile, &sfinfo, total_frames); } // Use information from input file to configure libtwolame twolame_set_num_channels(encopts, sfinfo.channels); twolame_set_in_samplerate(encopts, sfinfo.samplerate); // initialise twolame with this set of options if (twolame_init_params(encopts) != 0) { fprintf(stderr, "Error: configuring libtwolame encoder failed.\n"); exit(ERR_INVALID_PARAM); } // display encoder settings twolame_print_config(encopts); // Allocate memory for the PCM audio data if ((pcmaudio = (short int *) calloc(AUDIO_BUF_SIZE, sizeof(short int))) == NULL) { fprintf(stderr, "Error: pcmaudio memory allocation failed\n"); exit(ERR_MEM_ALLOC); } // Allocate memory for the encoded MP2 audio data if ((mp2buffer = (unsigned char *) calloc(MP2_BUF_SIZE, sizeof(unsigned char))) == NULL) { fprintf(stderr, "Error: mp2buffer memory allocation failed\n"); exit(ERR_MEM_ALLOC); } // Open the output file outputfile = open_output_file(outputfilename); // Only encode a single frame of mpeg audio ? if (single_frame_mode) audioReadSize = TWOLAME_SAMPLES_PER_FRAME; else audioReadSize = AUDIO_BUF_SIZE; // Now do the reading/encoding/writing while ((samples_read = sf_read_short(inputfile, pcmaudio, audioReadSize)) > 0) { int bytes_out = 0; // Calculate the number of samples we have (per channel) samples_read /= sfinfo.channels; total_samples += (unsigned int)samples_read; // Do swapping of left and right channels if requested if (channelswap && sfinfo.channels == 2) { int i; for (i = 0; i < samples_read; i++) { short tmp = pcmaudio[(2 * i)]; pcmaudio[(2 * i)] = pcmaudio[(2 * i) + 1]; pcmaudio[(2 * i) + 1] = tmp; } } // Encode the audio to MP2 mp2fill_size = twolame_encode_buffer_interleaved(encopts, pcmaudio, samples_read, mp2buffer, MP2_BUF_SIZE); // Stop if we don't have any bytes (probably don't have enough audio for a full frame of // mpeg audio) if (mp2fill_size == 0) break; if (mp2fill_size < 0) { fprintf(stderr, "error while encoding audio: %d\n", mp2fill_size); exit(ERR_ENCODING); } // Check that a whole number of frame was written // if (mp2fill_size % frame_len != 0) { // fprintf(stderr,"error while encoding audio: non-whole number of frames written\n"); // exit(ERR_ENCODING); // } // Write the encoded audio out bytes_out = fwrite(mp2buffer, sizeof(unsigned char), mp2fill_size, outputfile); if (bytes_out != mp2fill_size) { perror("error while writing to output file"); exit(ERR_WRITING_OUTPUT); } total_bytes += bytes_out; // Only single frame ? if (single_frame_mode) break; // Display Progress frame_count = total_samples / TWOLAME_SAMPLES_PER_FRAME; if (twolame_get_verbosity(encopts) > 0) { fprintf(stderr, "\rEncoding frame: %i", frame_count); if (total_frames) { fprintf(stderr, "/%i (%i%%)", total_frames, (frame_count * 100) / total_frames); } fflush(stderr); } } // Was there an error reading the audio? if (sf_error(inputfile) != SF_ERR_NO_ERROR) { fprintf(stderr, "Error reading from input file: %s\n", sf_strerror(inputfile)); } // // Flush any remaining audio. (don't send any new audio data) There // should only ever be a max of 1 frame on a flush. There may be zero // frames if the audio data was an exact multiple of 1152 // mp2fill_size = twolame_encode_flush(encopts, mp2buffer, MP2_BUF_SIZE); if (mp2fill_size > 0) { int bytes_out = fwrite(mp2buffer, sizeof(unsigned char), mp2fill_size, outputfile); frame_count++; if (bytes_out <= 0) { perror("error while writing to output file"); exit(ERR_WRITING_OUTPUT); } else { if (twolame_get_verbosity(encopts) > 0) { fprintf(stderr, "\rEncoding frame: %i", frame_count); if (total_frames) { fprintf(stderr, "/%i (%i%%)", total_frames, (frame_count * 100) / total_frames); } fflush(stderr); } } total_bytes += bytes_out; } if (twolame_get_verbosity(encopts) > 1) { format_filesize_string(filesize, sizeof(filesize), total_bytes); fprintf(stderr, "\nEncoding Finished.\n"); fprintf(stderr, "Total bytes written: %s.\n", filesize); } // Close input and output streams sf_close(inputfile); fclose(outputfile); // Close the libtwolame encoder twolame_close(&encopts); // Free up memory free(pcmaudio); free(mp2buffer); return (ERR_NO_ERROR); } /* vim:ts=4:sw=4:nowrap: */ twolame-0.4.0/frontend/Makefile.in0000644000015600001630000004766113550126512014002 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = twolame$(EXEEXT) subdir = frontend ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build-scripts/libtool.m4 \ $(top_srcdir)/build-scripts/ltoptions.m4 \ $(top_srcdir)/build-scripts/ltsugar.m4 \ $(top_srcdir)/build-scripts/ltversion.m4 \ $(top_srcdir)/build-scripts/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtwolame/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_twolame_OBJECTS = frontend.$(OBJEXT) twolame_OBJECTS = $(am_twolame_OBJECTS) am__DEPENDENCIES_1 = twolame_DEPENDENCIES = $(top_builddir)/libtwolame/libtwolame.la \ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtwolame depcomp = $(SHELL) $(top_srcdir)/build-scripts/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/frontend.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(twolame_SOURCES) DIST_SOURCES = $(twolame_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-scripts/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_ASCIIDOC = @PATH_ASCIIDOC@ PATH_DOXYGEN = @PATH_DOXYGEN@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_XMLTO = @PATH_XMLTO@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ TWOLAME_BIN = @TWOLAME_BIN@ TWOLAME_SO_VERSION = @TWOLAME_SO_VERSION@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = -I$(top_srcdir)/build/ -I$(top_srcdir)/libtwolame/ $(SNDFILE_CFLAGS) $(WARNING_CFLAGS) bin_PROGRAMS = @TWOLAME_BIN@ twolame_SOURCES = frontend.c frontend.h twolame_LDADD = $(top_builddir)/libtwolame/libtwolame.la $(SNDFILE_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu frontend/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu frontend/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list twolame$(EXEEXT): $(twolame_OBJECTS) $(twolame_DEPENDENCIES) $(EXTRA_twolame_DEPENDENCIES) @rm -f twolame$(EXEEXT) $(AM_V_CCLD)$(LINK) $(twolame_OBJECTS) $(twolame_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frontend.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/frontend.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/frontend.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: twolame-0.4.0/frontend/frontend.h0000644000015600001630000000332613550126461013716 00000000000000/* * TwoLAME: an optimized MPEG Audio Layer Two encoder * * Copyright (C) 2004-2018 The TwoLAME Project * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* Constants */ #define MP2_BUF_SIZE (16384) #define AUDIO_BUF_SIZE (9210) #define MAX_NAME_SIZE (1024) #define OUTPUT_SUFFIX ".mp2" #define DEFAULT_CHANNELS (2) #define DEFAULT_SAMPLERATE (44100) #define DEFAULT_SAMPLESIZE (16) /* Result codes */ #define ERR_NO_ERROR (0) // No Error (encoded ok) #define ERR_NO_ENCODE (1) // No Error (no encoding performed) #define ERR_OPENING_INPUT (2) // Error opening input file #define ERR_OPENING_OUTPUT (4) // Error opening output file #define ERR_MEM_ALLOC (6) // Error allocating memory #define ERR_INVALID_PARAM (8) // Error in chosen encoding parameters #define ERR_READING_INPUT (10) // Error reading input #define ERR_ENCODING (12) // Error occurred during encoding #define ERR_WRITING_OUTPUT (14) // Error occurred writing to output file twolame-0.4.0/NEWS0000644000015600001630000001605413550126526010612 00000000000000What is new in TwoLAME ====================== Version 0.4.0 (2019-10-11) -------------------------- - Added free format encoding (now up to 450 kbps) - Added DAB utility methods for ScF-CRC handling - Added `twolame_get_original()` and `twolame_set_original()` - Added `twolame_get_extension()` and `twolame_set_extension()` - Bundled .spec file in tarball for building RPM for twolame - Make libsndfile dependency (and therefore the frontend) optional - Fixed VBR encoding - Fixed setting for error protection flag - New check for invalid bitrate/channel encoder settings - New checks against failed memory allocations - Fixed padding policy (now adding an empty slot) - Fixed build when maintainer mode is disabled - Fixed scaling of floating point input source through libsndfile - Removed `slotinfo` global variables to fix thread safety bug - Switched to handling reading from STDIN using libsndfile - Fix for potential buffer overrun relating to `MAX_NAME_SIZE` in CLI tool - Install AUTHORS, COPYING, README, NEWS in `$prefix/share/doc/twolame/` - Zero the whole of the data structure when calling `twolame_init()` - Prefixed all global symbols with `twolame_` to prevent symbol conflicts - Fix for `twolame_get_framelength()` returning the correct frame size when padding is enabled - Fix progress counter in twolame CLI - Fix compilation on mingw or mxe cross compiler - Fix symbols visibility on Windows - Add `-no-undefined` for compilation on Windows - Added `win32-dll` option to `LT_INIT` - Compiler and Valgrind warning fixes - Various other minor fixes Version 0.3.13 (2011-01-21) --------------------------- - Fixed documentation location (--docdir in configure) * thanks to Chris Mayo for patch - Moved source code control to Github - Improvements to build system - Updated to autoconf 2.60, libtool 2.2, automake 1.10 and Doxygen 1.7.3 - Fix problem with 'extern inline' by changing them to 'static inline' - Wrote perl script to test output of the frontend - Changed all debugging messages, writing to stdout to write to stderr - Removed calls to exit() from libtwolame. - Added --non-copyright option (which is enabled by default) - Fix for bad copy/paste of variable assignment. - Manpage correction - Changed fopen() options to wb to fix Windows Version 0.3.12 (2008-01-09) --------------------------- - Fixed 'inline' for the forthcoming gcc-4.3 * thanks to Martin Michlmayr for patch Version 0.3.11 (2007-07-02) --------------------------- - Fixed energy levels bug for mono audio * thanks to Staale Helleberg for patch - Fixed STDIN support in twolame frontend Version 0.3.10 (2007-03-20) --------------------------- - Added win32/winutil.h to tarball - fixes bug #1629945 - Fixed presentation of --enable-debug in configure script - Added twolame_encode_buffer_float32_interleaved() - Fixed bug that was loosing stereo in twolame_encode_buffer_float32() - Fixed twolame_set_mode() to accept TWOLAME_AUTO_MODE - Added source file Ids to the top of every file - Added -pedantic to CFLAGS for debug build Version 0.3.9 (2006-12-31) -------------------------- - Fix for Windows in simple frontend: open files in binary mode * thanks to Kurien Mathew - (libtwolame) Fixed energy level support * thanks to Staale Helleberg - Nows displays the version number of libsndfile in frontend * as suggested by Elio Blanca - Changed documentation build system, so you have to run it manually - Buffer overrun fix in new_extension() - (libtwolame) Added warning that DAB support is still broken - (libtwolame) Added twolame_get_framelength() to return number of bytes per frame - Added TWOLAME_SAMPLES_PER_FRAME macro, clarifying that there are always 1152 samples per frame in Layer 2 - Frontend now displays extra information * Duration of input file (if known) * Total number of frames to be encoded and percentage complete * The filesize of the output file - Cleaned up source files so that it is consistent and all uses tabs (tab width 4) Version 0.3.8 (2006-06-19) -------------------------- - (libtwolame) Fixed CRC protection - More code tidying - pkg-config is no-longer required (but is recommended) - frontend now has the exectuable suffix appended to filename - added -std=c99 to the compiler options Version 0.3.7 (2006-05-07) -------------------------- - (libtwolame) Added twolame_encode_buffer_float32() function - (libtwolame) Fix NAN bug for AMD64 processors - Checks type sizes of short and float Version 0.3.6 (2006-12-25) -------------------------- - Removed comma which was causing problems with -pedantic * Thanks to Akos Maroy - (libtwolame) Added libtool library versioning Version 0.3.5 (2005-11-29) -------------------------- - (libtwolame) Added back twolame_get_VBR_q/twolame_set_VBR_q - More documentation is installed Version 0.3.4 (2005-11-19) -------------------------- - (libtwolame) Checks parameters a bit better - (libtwolame) Removed lots of exit() calls - (libtwolame) added twolame_print_config() API call - (libtwolame) Fixed twolame.h so that it works with C++ code - Rewrote frontend and now (only) uses libsndfile - Changed behavior in frontend and backend for verbosity setting - Rewrote manpage for frontend - (libtwolame) Fixed bug with setting MPEG version - (libtwolame) Removed default samplerate - must choose one - (libtwolame) 'Original' flag is now turned on by default - (libtwolame) Default bitrate is automatically chosen based on the samplerate/channels - (libtwolame) Default mode is automatically chosen based on the number of channels - Documentation improvements and corrections - (libtwolame) made some of VBR debugging send to stderr instead of stdout Version 0.3.3 (2005-04-19) -------------------------- - Added Debian package description - Now installs documentation - Removed old unused tables.c and tables.h sources Version 0.3.2 (2005-04-10) -------------------------- - Added scaling of input samples - Added downmixing/upmixing of samples - Applied patch from Christophe Massiot to make TwoLAME thread-safe Version 0.3.1 (2004-09-17) -------------------------- - Frontend displays information about the input file format - Fixed bug with audio_get_samples reading more than buffer size - Added asciidoc documentation - Added doxygen documentation Version 0.3.0 (2004-09-14) -------------------------- - Based on tooLAME 0.2m beta 8 - changed build system to use automake/libtool - now builds shared library - restructured lots of code * Removed some dead code and unused files - should now be close to being thread safe - removed memory leaks / static variables - changed library API so that it is almost the same as LAMEs * hopefully not too many people have been using the old API * not too many big differences * will hopefully add resampling support to next release * API is ready for resampling support to be added * ready for downmixing to be added to libtoolame - Added libsndfile support to toolame frontend (if you have it) - moved set/get functions into get_set.c - I have broken energy levels support (sorry !) - will try and fix - Added LGPL header to the top of all the files - Added toolame_encode_buffer_interleaved twolame-0.4.0/README0000644000015600001630000000611713550126526010772 00000000000000TwoLAME ======= Based on tooLAME by Michael Cheng All changes to the ISO source are licensed under the LGPL (see COPYING for details) TwoLAME is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. TwoLAME is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with TwoLAME; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA INTRODUCTION ------------ TwoLAME is an optimized MPEG Audio Layer 2 (MP2) encoder. It is based heavily on: * tooLAME by Michael Cheng * the ISO dist10 code * improvement to algorithms as part of the LAME project (lame.sf.net) * other contributors (see AUTHORS) TwoLAME should be able to be used as a drop-in replacement for LAME (a MPEG Layer 3 encoder). The frontend takes very similar command line options to LAME, and the backend library has a very similar API to LAME. For the latest version of TwoLAME, visit the project homepage: http://www.twolame.org/ MPEG Audio Layer 2 (MP2) ------------------------ (taken from Wikipedia article on MP2) MP2 (sometimes incorrectly named Musicam) is a short form of MPEG Audio Layer II, and it is also used as a file extension for files containing audio data of this type. While it has largely been superseded by MP3 for PC and Internet applications, it remains a dominant standard for audio broadcasting as part of the DAB digital radio and DVB digital television standards. It is also used internally within the radio industry, for example in NPR's PRSS Content Depot programming distribution system. INSTALLATION ------------ Standard automake process: ./configure make make install REFERENCE PAPERS ---------------- (Specifically Layer II Papers) Kumar, M & Zubair, M., A high performance software implementation of mpeg audio encoder, 1996, ICASSP Conf Proceedings (I think) Fischer, K.A., Calculation of the psychoacoustic simultaneous masked threshold based on MPEG/Audio Encoder Model One, ICSI Technical Report, 1997 ftp://ftp.icsi.berkeley.edu/pub/real/kyrill/PsychoMpegOne.tar.Z Hyen-O et al, New Implementation techniques of a real-time mpeg-2 audio encoding system. p2287, ICASSP 99. Imai, T., et al, MPEG-1 Audio real-time encoding system, IEEE Trans on Consumer Electronics, v44, n3 1998. p888 Teh, D., et al, Efficient bit allocation algorithm for ISO/MPEG audio encoder, Electronics Letters, v34, n8, p721 Murphy, C & Anandakumar, K, Real-time MPEG-1 audio coding and decoding on a DSP Chip, IEEE Trans on Consumer Electronics, v43, n1, 1997 p40 Hans, M & Bhaskaran, V., A compliant MPEG-1 layer II audio decoder with 16-B arithmetic operations, IEEE Signal Proc Letters v4 n5 1997 p121 twolame-0.4.0/twolame.spec0000644000015600001630000000320313550126525012426 00000000000000Name: twolame Version: 0.4.0 Release: 1%{?dist} Summary: MPEG Audio Layer 2 (MP2) encoder Group: Applications/Multimedia License: LGPLv2 URL: http://www.twolame.org/ Source: http://www.twolame.org/download/%{name}-%{version}.tar.gz BuildRequires: libsndfile-devel Requires: libsndfile Requires: twolame-libs = %{version}-%{release} %description TwoLAME is an optimized MPEG Audio Layer 2 (MP2) encoder. It is based heavily on: - tooLAME by Michael Cheng - the ISO dist10 code - improvement to algorithms as part of the LAME project This package contains the command line frontend. %package devel Summary: Libraries and header files for apps encoding MPEG Layer 2 audio Group: Development/Libraries Requires: twolame-libs = %{version}-%{release} Requires: pkgconfig %description devel Header files and a library for encoding MPEG Layer 2 audio, for developing apps which will use the library. %package libs Summary: Libraries for applications encoding MPEG Layer 2 audio Group: System Environment/Libraries %description libs Dynamic libraries for applications encoding MPEG Layer 2 audio. %prep %setup -q %build %configure %{__make} %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT %{__make} DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-, root, root, 0755) %attr(755,root,root) %{_bindir}/twolame %{_mandir}/man1/* %files libs %doc COPYING %{_libdir}/libtwolame.so.* %files devel %{_libdir}/pkgconfig/twolame.pc %{_includedir}/twolame.h %{_libdir}/*.so %{_libdir}/libtwolame*.a %{_libdir}/libtwolame*.la %{_docdir}/* %changelog twolame-0.4.0/doc/0000755000015600001630000000000013550126555010734 500000000000000twolame-0.4.0/doc/Makefile.am0000644000015600001630000000133713550126461012710 00000000000000SUBDIRS=html ## Building the manpage requires: ## asciidoc: http://www.methods.co.nz/asciidoc/ ## xmlto: http://cyberelk.net/tim/xmlto/ ## ## Man Page dist_man_MANS = twolame.1 if MAINTAINER_MODE twolame.1.xml: twolame.1.txt @PATH_ASCIIDOC@ -d manpage -b docbook -o twolame.1.xml twolame.1.txt twolame.1: twolame.1.xml @PATH_XMLTO@ --skip-validation man twolame.1.xml MAINTAINERCLEANFILES = twolame.1 twolame.1.xml endif pkgdocdir = @docdir@ pkgdoc_DATA = \ api.txt \ psycho.txt \ vbr.txt EXTRA_DIST = \ $(pkgdoc_DATA) \ dist10-text/common.txt \ dist10-text/commonh.txt \ dist10-text/encode.txt \ dist10-text/encoderh.txt \ dist10-text/musicin.txt \ dist10-text/psy.txt \ dist10-text/tonal.txt \ index.txt twolame-0.4.0/doc/twolame.10000644000015600001630000002325513550126554012414 00000000000000'\" t .\" Title: twolame .\" Author: Nicholas J Humfrey .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 10/11/2019 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "TWOLAME" "1" "10/11/2019" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" twolame \- an optimised MPEG Audio Layer 2 (MP2) encoder .SH "SYNOPSIS" .sp \fItwolame\fR [options] [outfile] .SH "DESCRIPTION" .sp TwoLAME is an optimised MPEG Audio Layer 2 (MP2) encoder based on tooLAME by Mike Cheng, which in turn is based upon the ISO dist10 code and portions of LAME\&. Encoding is performed by the libtwolame library backend\&. .SH "OPTIONS" .SS "Input File" .sp twolame uses libsndfile for reading the input sound file, so the input file can be in any format supported by libsndfile\&. To read raw PCM audio from STDIN, then use \- as the input filename\&. .SS "Output File" .sp If no output filename is specified, then suffix of the input filename is automatically changed to \&.mp2\&. To write the encoded audio to STDOUT then use \- as the output filename\&. .SS "Input Options" .PP \-r, \-\-raw\-input .RS 4 Specifies that input is raw signed PCM audio\&. If audio is stereo, than audio samples are interleaved between the two channels\&. .RE .PP \-x, \-\-byte\-swap .RS 4 Force byte\-swapping of the input\&. Endian detection is performed automatically by libsndfile, so this option shouldn\(cqt normally be needed\&. .RE .PP \-s, \-\-samplerate .RS 4 If inputting raw PCM sound, you must specify the sample rate of the audio in Hz\&. Valid sample rates: 16000, 22050, 24000, 32000, 44100, 48000Hz\&. Default sample rate is 44100Hz\&. .RE .PP \-\-samplesize .RS 4 Specifies the sample size (in bits) of the raw PCM audio\&. Valid sample sizes: 8, 16, 24, 32\&. Default sample size is 16\-bit\&. .RE .PP \-N, \-\-channels .RS 4 If inputting raw PCM sound, you must specify the number of channels in the input audio\&. Default number of channels is 2\&. .RE .PP \-g, \-\-swap\-channels .RS 4 Swap the Left and Right channels of a stereo input file\&. .RE .PP \-\-scale .RS 4 Scale the input audio prior to encoding\&. All of the input audio is multiplied by specified value\&. Value between 0 and 1 will reduce the audio gain, and a value above 1 will increase the gain of the audio\&. .RE .PP \-\-scale\-l .RS 4 Same as \-\-scale, but only affects the left channel\&. .RE .PP \-\-scale\-r .RS 4 Same as \-\-scale, but only affects the right channel\&. .RE .SS "Output Options" .PP \-m, \-\-mode .RS 4 Choose the mode of the resulting audio\&. Default is auto\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "a" auto \- choose mode automatically based on the input .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "s" stereo .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "d" dual channel .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "j" joint stereo .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "m" mono .RE .RE .PP \-a, \-\-downmix .RS 4 If the input file is stereo then, downmix the left and right input channels into a single mono channel\&. .RE .PP \-b, \-\-bitrate .RS 4 Sets the total bitrate (in kbps) for the output file\&. The default bitrate depends on the number of input channels and samplerate\&. .sp .if n \{\ .RS 4 .\} .nf \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- Sample Rate Mono Stereo \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- 48000 96 192 44100 96 192 32000 80 160 24000 48 96 22050 48 96 16000 32 64 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .fi .if n \{\ .RE .\} .RE .PP \-P, \-\-psyc\-mode .RS 4 Choose the psycho\-acoustic model to use (\-1 to 4)\&. Model number \-1 is turns off psycho\-acoustic modelling and uses fixed default values instead\&. Please see the file \fIpsycho\fR for a full description of each of the models available\&. Default model is 3\&. .RE .PP \-v, \-\-vbr .RS 4 Enable VBR mode\&. See \fIvbr\fR documentation file for details\&. Default VBR level is 5\&.0\&. .RE .PP \-V, \-\-vbr\-level .RS 4 Enable VBR mode and set quality level\&. The higher the number the better the quality\&. Maximum range is \-50 to 50 but useful range is \-10 to 10\&. See \fIvbr\fR documentation file for details\&. .RE .PP \-l, \-\-ath .RS 4 Set the ATH level\&. Default level is 0\&.0\&. .RE .PP \-q, \-\-quick .RS 4 Enable quick mode\&. Only re\-calculate psycho\-acoustic model every specified number of frames\&. .RE .PP \-S, \-\-single\-frame .RS 4 Enables single frame mode: only a single frame of MPEG audio is output and then the program terminates\&. .RE .SS "Miscellaneous Options" .PP \-c, \-\-copyright .RS 4 Turn on Copyright flag in output bitstream\&. .RE .PP \-o, \-\-non\-original .RS 4 Turn off Original flag in output bitstream\&. .RE .PP \-\-original .RS 4 Turn on Original flag in output bitstream\&. .RE .PP \-p, \-\-protect .RS 4 Enable CRC error protection in output bitstream\&. An extra 16\-bit checksum is added to frames\&. .RE .PP \-d, \-\-padding .RS 4 Turn on padding in output bitstream\&. .RE .PP \-R, \-\-reserve .RS 4 Reserve specified number of bits in the each from of the output bitstream\&. .RE .PP \-e, \-\-deemphasis .RS 4 Set the de\-emphasis type (n/c/5)\&. Default is none\&. .RE .PP \-E, \-\-energy .RS 4 Turn on energy level extensions\&. .RE .SS "Verbosity Options" .PP \-t, \-\-talkativity .RS 4 Set the amount of information to be displayed on stderr (0 to 10)\&. Default is 2\&. .RE .PP \-\-quiet .RS 4 Don\(cqt send any messages to stderr, unless there is an error\&. (Same as \-\-talkativity=0) .RE .PP \-\-brief .RS 4 Only display a minimal number of messages while encoding\&. This setting is quieter than the default talkativity setting\&. (Same as \-\-talkativity=1) .RE .PP \-\-verbose .RS 4 Display an increased number of messages on stderr\&. This setting is useful to diagnose problems\&. (Same as \-\-talkativity=4) .RE .SH "RETURN CODES" .sp If encoding completes successfully, then twolame will return 0\&. However if encoding is not successful, then it will return one of the following codes\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 1 (No encoding performed) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 2 (Error opening input file) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 4 (Error opening output file) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 6 (Error allocating memory) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 8 (Error in chosen encoding parameters) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 10 (Error reading input audio) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 12 (Error occurred while encoding) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 14 (Error writing output audio) .RE .SH "EXAMPLES" .sp This will encode sound\&.wav to sound\&.mp2 using the default constant bitrate of 192 kbps and using the default psycho\-acoustic model (model 3): .sp .if n \{\ .RS 4 .\} .nf twolame sound\&.wav .fi .if n \{\ .RE .\} .sp Constant bitrate of 160kbps and joint stereo encoding, saved to file sound_160\&.mp2: .sp .if n \{\ .RS 4 .\} .nf twolame \-b 160 \-m j sound\&.aiff sound_160\&.mp2 .fi .if n \{\ .RE .\} .sp Encode sound\&.wav to newfile\&.mp2 using psycho\-acoustic model 2 and encoding with variable bitrate: .sp .if n \{\ .RS 4 .\} .nf twolame \-P 2 \-v sound\&.wav newfile\&.mp2 .fi .if n \{\ .RE .\} .sp Same as example above, except that the negative value of the "\-V" argument means that the lower bitrates will be favoured over the higher ones: .sp .if n \{\ .RS 4 .\} .nf twolame \-P 2 \-V \-5 sound\&.wav newfile\&.mp2 .fi .if n \{\ .RE .\} .sp Resample audio file using sox and pipe straight through twolame: .sp .if n \{\ .RS 4 .\} .nf sox sound_11025\&.aiff \-t raw \-r 16000 | twolame \-r \-s 16000 \- \- > out\&.mp2 .fi .if n \{\ .RE .\} .SH "AUTHORS" .sp The twolame frontend was (re)written by Nicholas J Humfrey\&. The libtwolame library is based on toolame by Mike Cheng\&. For a full list of authors, please see the AUTHORS file\&. .SH "RESOURCES" .sp TwoLAME web site: \m[blue]\fBhttp://www\&.twolame\&.org/\fR\m[] .SH "SEE ALSO" .sp lame(1), mpg123(1), madplay(1), sox(1) .SH "COPYING" .sp Copyright \(co 2004\-2018 The TwoLAME Project\&. Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL)\&. .SH "AUTHOR" .PP \fBNicholas J Humfrey\fR <\&njh@aelius\&.com\&> .RS 4 Author. .RE twolame-0.4.0/doc/html/0000755000015600001630000000000013550126555011700 500000000000000twolame-0.4.0/doc/html/authors.html0000644000015600001630000001052713550126543014175 00000000000000 TwoLAME Authors
Nicholas J Humfrey - <njh at aelius.com>
  • Current Maintainer

  • New automake build system

  • Added libsndfile support

  • Reference documentation for API

  • Lots of cleaning and improving!

  • New frontend

Elio Blanca - <eblanca76 at users.sourceforge.net>
  • Memory allocation improvements

  • Code optimisations

  • Cleanups and bug fixes

Christophe Massiot - <cmassiot at freebox.fr>
  • Changes to make libtwolame thread-safe

Mean - <mean at users.sourceforge.net>
  • Fix for AMD64 processors

  • Fix for CRC protection

Mike Cheng <mikecheng at NOT planckenergy.com> (remove the NOT)
  • Author of tooLAME, which TwoLAME is based on.

ISO Dist10 code writers
  • original basis of toolame

LAME specific contributions
  • fht routines from Ron Mayer <mayer at acuson.com>

  • fht tweaking by Mathew Hendry <math at vissci.com>

  • window_subband & filter subband from LAME circa v3.30 (multiple LAME authors) (before Takehiro’s window/filter/mdct combination)

Oliver Lietz <lietz at nanocosmos.de>
  • Tables now included in the exe! (yay! :)

Patrick de Smet <pds at telin.rug.ac.be>
  • scale_factor calc speedup.

  • subband_quantization speedup

Bill Eldridge <bill at hk.rfa.org> and Federico Grau <grauf at rfa.org>
  • option for "no padding"

Nick Burch <gagravarr at SoftHome.net>
  • WAV file reading

  • os/2 Makefile mods.

Phillipe Jouguet <philippe.jouguet at vdldiffusion.com>
  • DAB extensions

  • spelling, LSF using psyII, WAVE reading

Henrik Herranen - <leopold at vlsi.fi>
  • WAVE reading

Andreas Neukoetter - <anti at webhome.de>
  • verbosity patch -t switch for transcode plugin

Sami Sallinen - <sami.sallinen at g-cluster.com>
  • filter subband loop unroll psychoi fix for "% 1408" calcs


twolame-0.4.0/doc/html/twolame_8h.html0000644000015600001630000043460713550126541014566 00000000000000 TwoLAME: twolame.h File Reference
TwoLAME  0.4.0
MPEG Audio Layer 2 encoder
twolame.h File Reference

Go to the source code of this file.

Macros

#define TWOLAME_SAMPLES_PER_FRAME   (1152)
 

Typedefs

typedef struct twolame_options_struct twolame_options
 

Enumerations

enum  TWOLAME_MPEG_mode {
  TWOLAME_AUTO_MODE = -1,
  TWOLAME_STEREO = 0,
  TWOLAME_JOINT_STEREO,
  TWOLAME_DUAL_CHANNEL,
  TWOLAME_MONO
}
 
enum  TWOLAME_MPEG_version { ,
  TWOLAME_MPEG2 = 0,
  TWOLAME_MPEG1 = 1
}
 
enum  TWOLAME_Padding {
  TWOLAME_PAD_NO = 0,
  TWOLAME_PAD_ALL
}
 
enum  TWOLAME_Emphasis {
  TWOLAME_EMPHASIS_N = 0,
  TWOLAME_EMPHASIS_5 = 1,
  TWOLAME_EMPHASIS_C = 3
}
 

Functions

TL_API const char * get_twolame_version (void)
 
TL_API const char * get_twolame_url (void)
 
TL_API void twolame_print_config (twolame_options *glopts)
 
TL_API twolame_optionstwolame_init (void)
 
TL_API int twolame_init_params (twolame_options *glopts)
 
TL_API int twolame_encode_buffer (twolame_options *glopts, const short int leftpcm[], const short int rightpcm[], int num_samples, unsigned char *mp2buffer, int mp2buffer_size)
 
TL_API int twolame_encode_buffer_interleaved (twolame_options *glopts, const short int pcm[], int num_samples, unsigned char *mp2buffer, int mp2buffer_size)
 
TL_API int twolame_encode_buffer_float32 (twolame_options *glopts, const float leftpcm[], const float rightpcm[], int num_samples, unsigned char *mp2buffer, int mp2buffer_size)
 
int twolame_encode_buffer_float32_interleaved (twolame_options *glopts, const float pcm[], int num_samples, unsigned char *mp2buffer, int mp2buffer_size)
 
TL_API int twolame_encode_flush (twolame_options *glopts, unsigned char *mp2buffer, int mp2buffer_size)
 
TL_API void twolame_close (twolame_options **glopts)
 
TL_API int twolame_set_verbosity (twolame_options *glopts, int verbosity)
 
TL_API int twolame_get_verbosity (twolame_options *glopts)
 
TL_API int twolame_set_mode (twolame_options *glopts, TWOLAME_MPEG_mode mode)
 
TL_API TWOLAME_MPEG_mode twolame_get_mode (twolame_options *glopts)
 
TL_API const char * twolame_get_mode_name (twolame_options *glopts)
 
TL_API int twolame_set_version (twolame_options *glopts, TWOLAME_MPEG_version version)
 
TL_API TWOLAME_MPEG_version twolame_get_version (twolame_options *glopts)
 
TL_API const char * twolame_get_version_name (twolame_options *glopts)
 
TL_API int twolame_set_freeformat (twolame_options *glopts, int freef)
 
TL_API int twolame_get_framelength (twolame_options *glopts)
 
TL_API int twolame_set_psymodel (twolame_options *glopts, int psymodel)
 
TL_API int twolame_get_psymodel (twolame_options *glopts)
 
TL_API int twolame_set_num_channels (twolame_options *glopts, int num_channels)
 
TL_API int twolame_get_num_channels (twolame_options *glopts)
 
TL_API int twolame_set_scale (twolame_options *glopts, float scale)
 
TL_API float twolame_get_scale (twolame_options *glopts)
 
TL_API int twolame_set_scale_left (twolame_options *glopts, float scale)
 
TL_API float twolame_get_scale_left (twolame_options *glopts)
 
TL_API int twolame_set_scale_right (twolame_options *glopts, float scale)
 
TL_API float twolame_get_scale_right (twolame_options *glopts)
 
TL_API int twolame_set_in_samplerate (twolame_options *glopts, int samplerate)
 
TL_API int twolame_get_in_samplerate (twolame_options *glopts)
 
TL_API int twolame_set_out_samplerate (twolame_options *glopts, int samplerate)
 
TL_API int twolame_get_out_samplerate (twolame_options *glopts)
 
TL_API int twolame_set_bitrate (twolame_options *glopts, int bitrate)
 
TL_API int twolame_get_bitrate (twolame_options *glopts)
 
TL_API int twolame_set_brate (twolame_options *glopts, int bitrate)
 
TL_API int twolame_get_brate (twolame_options *glopts)
 
TL_API int twolame_set_padding (twolame_options *glopts, TWOLAME_Padding padding)
 
TL_API TWOLAME_Padding twolame_get_padding (twolame_options *glopts)
 
TL_API int twolame_set_energy_levels (twolame_options *glopts, int energylevels)
 
TL_API int twolame_get_energy_levels (twolame_options *glopts)
 
TL_API int twolame_set_num_ancillary_bits (twolame_options *glopts, int num)
 
TL_API int twolame_get_num_ancillary_bits (twolame_options *glopts)
 
TL_API int twolame_set_emphasis (twolame_options *glopts, TWOLAME_Emphasis emphasis)
 
TL_API TWOLAME_Emphasis twolame_get_emphasis (twolame_options *glopts)
 
TL_API int twolame_set_error_protection (twolame_options *glopts, int err_protection)
 
TL_API int twolame_get_error_protection (twolame_options *glopts)
 
TL_API int twolame_set_copyright (twolame_options *glopts, int copyright)
 
TL_API int twolame_get_copyright (twolame_options *glopts)
 
TL_API int twolame_set_original (twolame_options *glopts, int original)
 
TL_API int twolame_get_original (twolame_options *glopts)
 
TL_API int twolame_set_extension (twolame_options *glopts, int extension)
 
TL_API int twolame_get_extension (twolame_options *glopts)
 
TL_API int twolame_set_VBR (twolame_options *glopts, int vbr)
 
TL_API int twolame_get_VBR (twolame_options *glopts)
 
TL_API int twolame_set_VBR_level (twolame_options *glopts, float level)
 
TL_API float twolame_get_VBR_level (twolame_options *glopts)
 
TL_API int twolame_set_ATH_level (twolame_options *glopts, float level)
 
TL_API float twolame_get_ATH_level (twolame_options *glopts)
 
TL_API int twolame_set_VBR_max_bitrate_kbps (twolame_options *glopts, int bitrate)
 
TL_API int twolame_get_VBR_max_bitrate_kbps (twolame_options *glopts)
 
TL_API int twolame_set_quick_mode (twolame_options *glopts, int quickmode)
 
TL_API int twolame_get_quick_mode (twolame_options *glopts)
 
TL_API int twolame_set_quick_count (twolame_options *glopts, int quickcount)
 
TL_API int twolame_get_quick_count (twolame_options *glopts)
 
TL_API int twolame_set_DAB (twolame_options *glopts, int dab)
 
TL_API int twolame_get_DAB (twolame_options *glopts)
 
TL_API int twolame_set_DAB_xpad_length (twolame_options *glopts, int length)
 
TL_API int twolame_get_DAB_xpad_length (twolame_options *glopts)
 
TL_API int twolame_set_DAB_crc_length (twolame_options *glopts, int length)
 
TL_API int twolame_set_DAB_scf_crc_length (twolame_options *glopts)
 
TL_API int twolame_get_DAB_crc_length (twolame_options *glopts)
 
TL_API int twolame_set_DAB_scf_crc (twolame_options *glopts, unsigned char *mp2buffer, int mp2buffer_size)
 

Macro Definition Documentation

◆ TWOLAME_SAMPLES_PER_FRAME

#define TWOLAME_SAMPLES_PER_FRAME   (1152)

Number of samples per frame of Layer 2 MPEG Audio

Typedef Documentation

◆ twolame_options

typedef struct twolame_options_struct twolame_options

Opaque data type for the twolame encoder options.

Enumeration Type Documentation

◆ TWOLAME_MPEG_mode

MPEG modes

Enumerator
TWOLAME_AUTO_MODE 

Choose Mode Automatically

TWOLAME_STEREO 

Stereo

TWOLAME_JOINT_STEREO 

Joint Stereo

TWOLAME_DUAL_CHANNEL 

Dual Channel

TWOLAME_MONO 

Mono

◆ TWOLAME_MPEG_version

MPEG Version.

MPEG2 is for Lower Sampling Frequencies - LSF < 32000.

Enumerator
TWOLAME_MPEG2 

MPEG-2 - for sample rates less than 32k

TWOLAME_MPEG1 

MPEG-1

◆ TWOLAME_Padding

Padding types.

Enumerator
TWOLAME_PAD_NO 

No Padding

TWOLAME_PAD_ALL 

Pad all frames

◆ TWOLAME_Emphasis

Emphasis types.

Enumerator
TWOLAME_EMPHASIS_N 

No Emphasis

TWOLAME_EMPHASIS_5 

50/15 ms

TWOLAME_EMPHASIS_C 

CCIT J.17

Function Documentation

◆ get_twolame_version()

TL_API const char* get_twolame_version ( void  )

Get the version number of the TwoLAME library. eg "0.3.1".

Returns
The version number as a C string

◆ get_twolame_url()

TL_API const char* get_twolame_url ( void  )

Get the URL of the TwoLAME homepage. eg "http://www.twolame.org/".

Returns
The url as a C string

◆ twolame_print_config()

TL_API void twolame_print_config ( twolame_options glopts)

Print the library version and encoder parameter settings to STDERR.

Will display differnent ammounts of information depending on the verbosity setting. If verbosity is set to 0 then no message will be displayed.

Parameters
gloptsOptions pointer created by twolame_init()

◆ twolame_init()

TL_API twolame_options* twolame_init ( void  )

Initialise the twolame encoder.

Sets defaults for all parameters. Will return NULL if malloc() failed, otherwise returns a pointer which you then need to pass to all future API calls.

Returns
a pointer to your new options data structure

◆ twolame_init_params()

TL_API int twolame_init_params ( twolame_options glopts)

Prepare to start encoding.

You must call twolame_init_params() before you start encoding. It will check call your parameters to make sure they are valid, as well as allocating buffers and initising internally used variables.

Parameters
gloptsOptions pointer created by twolame_init()
Returns
0 if all patameters are valid, non-zero if something is invalid

◆ twolame_encode_buffer()

TL_API int twolame_encode_buffer ( twolame_options glopts,
const short int  leftpcm[],
const short int  rightpcm[],
int  num_samples,
unsigned char *  mp2buffer,
int  mp2buffer_size 
)

Encode some 16-bit PCM audio to MP2.

Takes 16-bit PCM audio samples from seperate left and right buffers and places encoded audio into mp2buffer.

Parameters
gloptstwolame options pointer
leftpcmLeft channel audio samples
rightpcmRight channel audio samples
num_samplesNumber of samples per channel
mp2bufferBuffer to place encoded audio into
mp2buffer_sizeSize of the output buffer
Returns
The number of bytes put in output buffer or a negative value on error

◆ twolame_encode_buffer_interleaved()

TL_API int twolame_encode_buffer_interleaved ( twolame_options glopts,
const short int  pcm[],
int  num_samples,
unsigned char *  mp2buffer,
int  mp2buffer_size 
)

Encode some 16-bit PCM audio to MP2.

Takes interleaved 16-bit PCM audio samples from a single buffer and places encoded audio into mp2buffer.

Parameters
gloptstwolame options pointer
pcmAudio samples for left AND right channels
num_samplesNumber of samples per channel
mp2bufferBuffer to place encoded audio into
mp2buffer_sizeSize of the output buffer
Returns
The number of bytes put in output buffer or a negative value on error

◆ twolame_encode_buffer_float32()

TL_API int twolame_encode_buffer_float32 ( twolame_options glopts,
const float  leftpcm[],
const float  rightpcm[],
int  num_samples,
unsigned char *  mp2buffer,
int  mp2buffer_size 
)

Encode some 32-bit PCM audio to MP2.

Takes 32-bit floating point PCM audio samples from seperate left and right buffers and places encoded audio into mp2buffer.

Note: the 32-bit samples are currently scaled down to 16-bit samples internally.

Parameters
gloptstwolame options pointer
leftpcmLeft channel audio samples
rightpcmRight channel audio samples
num_samplesNumber of samples per channel
mp2bufferBuffer to place encoded audio into
mp2buffer_sizeSize of the output buffer
Returns
The number of bytes put in output buffer or a negative value on error

◆ twolame_encode_buffer_float32_interleaved()

int twolame_encode_buffer_float32_interleaved ( twolame_options glopts,
const float  pcm[],
int  num_samples,
unsigned char *  mp2buffer,
int  mp2buffer_size 
)

Encode some 32-bit PCM audio to MP2.

Takes 32-bit floating point PCM audio samples from a single buffer and places encoded audio into mp2buffer.

Parameters
gloptstwolame options pointer
pcmAudio samples for left AND right channels
num_samplesNumber of samples per channel
mp2bufferBuffer to place encoded audio into
mp2buffer_sizeSize of the output buffer
Returns
The number of bytes put in output buffer or a negative value on error

◆ twolame_encode_flush()

TL_API int twolame_encode_flush ( twolame_options glopts,
unsigned char *  mp2buffer,
int  mp2buffer_size 
)

Encode any remains buffered PCM audio to MP2.

Encodes any remaining audio samples in the libtwolame internal sample buffer. This function will return at most a single frame of MPEG Audio, and at least 0 frames.

Parameters
gloptstwolame options pointer
mp2bufferBuffer to place encoded audio into
mp2buffer_sizeSize of the output buffer
Returns
The number of bytes put in output buffer or a negative value on error

◆ twolame_close()

TL_API void twolame_close ( twolame_options **  glopts)

Shut down the twolame encoder.

Shuts down the twolame encoder and frees all memory that it previously allocated. You should call this once you have finished all your encoding. This function will set your glopts pointer to NULL for you.

Parameters
gloptspointer to twolame options pointer

◆ twolame_set_verbosity()

TL_API int twolame_set_verbosity ( twolame_options glopts,
int  verbosity 
)

Set the verbosity of the encoder.

Sets how verbose the encoder is with the debug and informational messages it displays. The higher the number, the more messages it will display. Set to 0 for no status messages to STDERR ( error messages will still be displayed ).

Default: 1

Parameters
gloptspointer to twolame options pointer
verbosityinteger between 0 and 10
Returns
0 if successful, non-zero on failure

◆ twolame_get_verbosity()

TL_API int twolame_get_verbosity ( twolame_options glopts)

Get the verbosity of the encoder.

Parameters
gloptspointer to twolame options pointer
Returns
integer indicating the verbosity of the encoder (0-10)

◆ twolame_set_mode()

TL_API int twolame_set_mode ( twolame_options glopts,
TWOLAME_MPEG_mode  mode 
)

Set the MPEG Audio Mode (Mono, Stereo, etc) for the output stream.

Default: TWOLAME_AUTO_MODE

Parameters
gloptspointer to twolame options pointer
modethe mode to set to
Returns
0 if successful, non-zero on failure

◆ twolame_get_mode()

TL_API TWOLAME_MPEG_mode twolame_get_mode ( twolame_options glopts)

Get the MPEG Audio mode of the output stream.

Parameters
gloptspointer to twolame options pointer
Returns
the MPEG audio mode

◆ twolame_get_mode_name()

TL_API const char* twolame_get_mode_name ( twolame_options glopts)

Get a string name for the current MPEG Audio mode.

Parameters
gloptspointer to twolame options pointer
Returns
the name of the MPEG audio mode as a string

◆ twolame_set_version()

TL_API int twolame_set_version ( twolame_options glopts,
TWOLAME_MPEG_version  version 
)

Set the MPEG version of the MPEG audio stream.

Default: TWOLAME_MPEG1

Parameters
gloptspointer to twolame options pointer
versionthe version to set to
Returns
0 if successful, non-zero on failure

◆ twolame_get_version()

TL_API TWOLAME_MPEG_version twolame_get_version ( twolame_options glopts)

Get the MPEG version of the output stream.

Parameters
gloptspointer to twolame options pointer
Returns
the MPEG version

◆ twolame_get_version_name()

TL_API const char* twolame_get_version_name ( twolame_options glopts)

Get a string name for the current MPEG version.

Parameters
gloptspointer to twolame options pointer
Returns
the name of the MPEG version as a string

◆ twolame_set_freeformat()

TL_API int twolame_set_freeformat ( twolame_options glopts,
int  freef 
)

Set the freeformat strem mode.

Parameters
gloptspointer to twolame options pointer
freeffreeformat mode ( TRUE / FALSE )
Returns
0

◆ twolame_get_framelength()

TL_API int twolame_get_framelength ( twolame_options glopts)

Get the number of bytes per MPEG audio frame, for current settings.

Parameters
gloptspointer to twolame options pointer
Returns
the number of bytes per frame

◆ twolame_set_psymodel()

TL_API int twolame_set_psymodel ( twolame_options glopts,
int  psymodel 
)

Set the Psychoacoustic Model used to encode the audio.

Default: 3

Parameters
gloptspointer to twolame options pointer
psymodelthe psychoacoustic model number
Returns
0 if successful, non-zero on failure

◆ twolame_get_psymodel()

TL_API int twolame_get_psymodel ( twolame_options glopts)

Get the Psychoacoustic Model used to encode the audio.

Parameters
gloptspointer to twolame options pointer
Returns
the psychoacoustic model number

◆ twolame_set_num_channels()

TL_API int twolame_set_num_channels ( twolame_options glopts,
int  num_channels 
)

Set the number of channels in the input stream.

If this is different the number of channels in the output stream (set by mode) then the encoder will automatically downmix/upmix the audio.

Default: 2

Parameters
gloptspointer to twolame options pointer
num_channelsthe number of input channels
Returns
0 if successful, non-zero on failure

◆ twolame_get_num_channels()

TL_API int twolame_get_num_channels ( twolame_options glopts)

Get the number of channels in the input stream.

Parameters
gloptspointer to twolame options pointer
Returns
the number of channels

◆ twolame_set_scale()

TL_API int twolame_set_scale ( twolame_options glopts,
float  scale 
)

Set the scaling level for audio before encoding.

Set to 0 to disable.

Default: 0

Parameters
gloptspointer to twolame options pointer
scalethe amount to scale by
Returns
0 if successful, non-zero on failure

◆ twolame_get_scale()

TL_API float twolame_get_scale ( twolame_options glopts)

Get the scaling level for audio before encoding.

Parameters
gloptspointer to twolame options pointer
Returns
the amount to scale audio sample by

◆ twolame_set_scale_left()

TL_API int twolame_set_scale_left ( twolame_options glopts,
float  scale 
)

Set the scaling level for left channel audio before encoding.

Set to 0 to disable.

Default: 0

Parameters
gloptspointer to twolame options pointer
scalethe amount to scale by
Returns
0 if successful, non-zero on failure

◆ twolame_get_scale_left()

TL_API float twolame_get_scale_left ( twolame_options glopts)

Get the scaling level for audio left channel before encoding.

Parameters
gloptspointer to twolame options pointer
Returns
the amount to scale left channel audio samples by

◆ twolame_set_scale_right()

TL_API int twolame_set_scale_right ( twolame_options glopts,
float  scale 
)

Set the scaling level for right channel audio before encoding.

Set to 0 to disable.

Default: 0

Parameters
gloptspointer to twolame options pointer
scalethe amount to scale by
Returns
0 if successful, non-zero on failure

◆ twolame_get_scale_right()

TL_API float twolame_get_scale_right ( twolame_options glopts)

Get the scaling level for audio right channel before encoding.

Parameters
gloptspointer to twolame options pointer
Returns
the amount to scale right channel audio samples by

◆ twolame_set_in_samplerate()

TL_API int twolame_set_in_samplerate ( twolame_options glopts,
int  samplerate 
)

Set the samplerate of the PCM audio input.

Default: 44100

Parameters
gloptspointer to twolame options pointer
sampleratethe samplerate in Hz
Returns
0 if successful, non-zero on failure

◆ twolame_get_in_samplerate()

TL_API int twolame_get_in_samplerate ( twolame_options glopts)

Get the samplerate of the PCM audio input.

Parameters
gloptspointer to twolame options pointer
Returns
the input samplerate

◆ twolame_set_out_samplerate()

TL_API int twolame_set_out_samplerate ( twolame_options glopts,
int  samplerate 
)

Set the samplerate of the MPEG audio output.

Default: 44100

Parameters
gloptspointer to twolame options pointer
sampleratethe samplerate in Hz
Returns
0 if successful, non-zero on failure

◆ twolame_get_out_samplerate()

TL_API int twolame_get_out_samplerate ( twolame_options glopts)

Get the samplerate of the MPEG audio output.

Parameters
gloptspointer to twolame options pointer
Returns
the output samplerate

◆ twolame_set_bitrate()

TL_API int twolame_set_bitrate ( twolame_options glopts,
int  bitrate 
)

Set the bitrate of the MPEG audio output stream.

Default: 192

Parameters
gloptspointer to twolame options pointer
bitratethe bitrate in kbps
Returns
0 if successful, non-zero on failure

◆ twolame_get_bitrate()

TL_API int twolame_get_bitrate ( twolame_options glopts)

Get the bitrate of the MPEG audio output.

Parameters
gloptspointer to twolame options pointer
Returns
the output bitrate in kbps

◆ twolame_set_brate()

TL_API int twolame_set_brate ( twolame_options glopts,
int  bitrate 
)

Set the bitrate of the MPEG audio output stream (LAME style).

Same as twolame_set_bitrate()

◆ twolame_get_brate()

TL_API int twolame_get_brate ( twolame_options glopts)

Get the bitrate of the MPEG audio output stream (LAME style).

Same as twolame_get_bitrate()

◆ twolame_set_padding()

TL_API int twolame_set_padding ( twolame_options glopts,
TWOLAME_Padding  padding 
)

Set frame padding for the MPEG audio output stream.

i.e. adjust frame sizes to achieve overall target bitrate

Default: TWOLAME_PAD_NO

Parameters
gloptspointer to twolame options pointer
paddingthe padding type
Returns
0 if successful, non-zero on failure

◆ twolame_get_padding()

TL_API TWOLAME_Padding twolame_get_padding ( twolame_options glopts)

Get the padding type of the MPEG audio output.

Parameters
gloptspointer to twolame options pointer
Returns
the output bitrate in kbps

◆ twolame_set_energy_levels()

TL_API int twolame_set_energy_levels ( twolame_options glopts,
int  energylevels 
)

Enable/Disable Energy Level Extension.

Enable writing the peak PCM level (energy level) at the end of each MPEG audio frame (in the ancillary bits). This function will automatically call twolame_set_num_ancillary_bits() to set the required number of ancillary bits for this feature.

The energy level extension is commonly used in the broadcast industry for visualising the audio in editing applications without decoding.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
energylevelsenergy level extension state (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_energy_levels()

TL_API int twolame_get_energy_levels ( twolame_options glopts)

Get the Energy Level Extension state.

Parameters
gloptspointer to twolame options pointer
Returns
state of the Energy Level Extension (TRUE/FALSE)

◆ twolame_set_num_ancillary_bits()

TL_API int twolame_set_num_ancillary_bits ( twolame_options glopts,
int  num 
)

Set number of Ancillary Bits at end of frame.

Default: 0

Parameters
gloptspointer to twolame options pointer
numnumber of bits to reserve
Returns
0 if successful, non-zero on failure

◆ twolame_get_num_ancillary_bits()

TL_API int twolame_get_num_ancillary_bits ( twolame_options glopts)

Get the number of Ancillary Bits at end of frame.

Parameters
gloptspointer to twolame options pointer
Returns
number of Ancillary Bits at end of frame

◆ twolame_set_emphasis()

TL_API int twolame_set_emphasis ( twolame_options glopts,
TWOLAME_Emphasis  emphasis 
)

Set the type of pre-emphasis to be applied to the decoded audio.

Default: TWOLAME_EMPHASIS_N

Parameters
gloptspointer to twolame options pointer
emphasisthe type of pre-emphasis
Returns
0 if successful, non-zero on failure

◆ twolame_get_emphasis()

TL_API TWOLAME_Emphasis twolame_get_emphasis ( twolame_options glopts)

Get the type of pre-emphasis to be applied to the decoded audio.

Parameters
gloptspointer to twolame options pointer
Returns
the type of pre-emphasis

◆ twolame_set_error_protection()

TL_API int twolame_set_error_protection ( twolame_options glopts,
int  err_protection 
)

Enable/Disable CRC Error Protection.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
err_protectionerror protection state (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_error_protection()

TL_API int twolame_get_error_protection ( twolame_options glopts)

Get the CRC Error Protection state.

Parameters
gloptspointer to twolame options pointer
Returns
state of Error Protection (TRUE/FALSE)

◆ twolame_set_copyright()

TL_API int twolame_set_copyright ( twolame_options glopts,
int  copyright 
)

Set the MPEG Audio Copyright flag.

Indicates that MPEG stream is copyrighted.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
copyrightcopyright flag state (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_copyright()

TL_API int twolame_get_copyright ( twolame_options glopts)

Get the copright flag state

Parameters
gloptspointer to twolame options pointer
Returns
state of the copyright flag (TRUE/FALSE)

◆ twolame_set_original()

TL_API int twolame_set_original ( twolame_options glopts,
int  original 
)

Set the MPEG Audio Original flag.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
originaloriginal flag state (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_original()

TL_API int twolame_get_original ( twolame_options glopts)

Get the MPEG Audio Original flag state.

Parameters
gloptspointer to twolame options pointer
Returns
state of the original flag (TRUE/FALSE)

◆ twolame_set_extension()

TL_API int twolame_set_extension ( twolame_options glopts,
int  extension 
)

Set the MPEG Audio Private Extension flag.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
extensionextension flag state (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_extension()

TL_API int twolame_get_extension ( twolame_options glopts)

Get the MPEG Audio Private Extension flag state.

Parameters
gloptspointer to twolame options pointer
Returns
state of the extension flag (TRUE/FALSE)

◆ twolame_set_VBR()

TL_API int twolame_set_VBR ( twolame_options glopts,
int  vbr 
)

Enable/Disable VBR (Variable Bit Rate) mode.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
vbrVBR state (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_VBR()

TL_API int twolame_get_VBR ( twolame_options glopts)

Get the VBR state.

Parameters
gloptspointer to twolame options pointer
Returns
state of VBR (TRUE/FALSE)

◆ twolame_set_VBR_level()

TL_API int twolame_set_VBR_level ( twolame_options glopts,
float  level 
)

Set the level/quality of the VBR audio.

The level value can is a measurement of quality - the higher the level the higher the average bitrate of the resultant file.

Default: 5.0

Parameters
gloptspointer to twolame options pointer
levelquality level (-10 to 10)
Returns
0 if successful, non-zero on failure

◆ twolame_get_VBR_level()

TL_API float twolame_get_VBR_level ( twolame_options glopts)

Get the level/quality of the VBR audio.

Parameters
gloptspointer to twolame options pointer
Returns
quality value for VBR

◆ twolame_set_ATH_level()

TL_API int twolame_set_ATH_level ( twolame_options glopts,
float  level 
)

Set the adjustment (in dB) applied to the ATH for Psycho models 3 and 4.

Default: 0.0

Parameters
gloptspointer to twolame options pointer
leveladjustment level in db
Returns
0 if successful, non-zero on failure

◆ twolame_get_ATH_level()

TL_API float twolame_get_ATH_level ( twolame_options glopts)

Get the adjustment (in dB) applied to the ATH for Psycho models 3 and 4.

Parameters
gloptspointer to twolame options pointer
Returns
adjustment level in db

◆ twolame_set_VBR_max_bitrate_kbps()

TL_API int twolame_set_VBR_max_bitrate_kbps ( twolame_options glopts,
int  bitrate 
)

Set the upper bitrate for VBR

Default: 0 (off)

Parameters
gloptspointer to twolame options pointer
bitrateupper bitrate for VBR
Returns
0 if successful, non-zero on failure

◆ twolame_get_VBR_max_bitrate_kbps()

TL_API int twolame_get_VBR_max_bitrate_kbps ( twolame_options glopts)

Get the upper bitrate for VBR.

Parameters
gloptspointer to twolame options pointer
Returns
the upper bitrate for VBR

◆ twolame_set_quick_mode()

TL_API int twolame_set_quick_mode ( twolame_options glopts,
int  quickmode 
)

Enable/Disable the quick mode for psycho model calculation.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
quickmodethe state of quick mode (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_quick_mode()

TL_API int twolame_get_quick_mode ( twolame_options glopts)

Get the state of quick mode.

Parameters
gloptspointer to twolame options pointer
Returns
the state of quick mode (TRUE/FALSE)

◆ twolame_set_quick_count()

TL_API int twolame_set_quick_count ( twolame_options glopts,
int  quickcount 
)

Set how often the psy model is calculated.

Default: 10

Parameters
gloptspointer to twolame options pointer
quickcountnumber of frames between calculations
Returns
0 if successful, non-zero on failure

◆ twolame_get_quick_count()

TL_API int twolame_get_quick_count ( twolame_options glopts)

Get the how often the psy model is calculated.

Parameters
gloptspointer to twolame options pointer
Returns
number of frames between calculations

◆ twolame_set_DAB()

TL_API int twolame_set_DAB ( twolame_options glopts,
int  dab 
)

Enable/Disable the Eureka 147 DAB extensions for MP2.

Default: FALSE

Parameters
gloptspointer to twolame options pointer
dabstate of DAB extensions (TRUE/FALSE)
Returns
0 if successful, non-zero on failure

◆ twolame_get_DAB()

TL_API int twolame_get_DAB ( twolame_options glopts)

Get the state of the DAB extensions

Parameters
gloptspointer to twolame options pointer
Returns
the state of DAB (TRUE/FALSE)

◆ twolame_set_DAB_xpad_length()

TL_API int twolame_set_DAB_xpad_length ( twolame_options glopts,
int  length 
)

Set the number of bytes to reserve for DAB XPAD data.

Default: 0

Parameters
gloptspointer to twolame options pointer
lengthnumber of bytes to reserve
Returns
0 if successful, non-zero on failure

◆ twolame_get_DAB_xpad_length()

TL_API int twolame_get_DAB_xpad_length ( twolame_options glopts)

Get the number of bytes reserved for DAB XPAD data.

Parameters
gloptspointer to twolame options pointer
Returns
number of XPAD bytes

◆ twolame_set_DAB_crc_length()

TL_API int twolame_set_DAB_crc_length ( twolame_options glopts,
int  length 
)

Set the CRC error protection length for DAB. Note: Alternative method is: twolame_set_DAB_scf_crc_length.

Default: 2

Parameters
gloptspointer to twolame options pointer
lengthlength of DAB CRC
Returns
0 if successful, non-zero on failure

◆ twolame_set_DAB_scf_crc_length()

TL_API int twolame_set_DAB_scf_crc_length ( twolame_options glopts)

Method that calculates and sets the length of the ScF-CRC field. The method must be called after initialization of bitrate, mpeg version and mpeg mode. If these conditions are met, the method can be used instead of twolame_set_DAB_crc_length.

Parameters
gloptspointer to twolame options pointer

◆ twolame_get_DAB_crc_length()

TL_API int twolame_get_DAB_crc_length ( twolame_options glopts)

Get the CRC error protection length for DAB.

Parameters
gloptspointer to twolame options pointer
Returns
length of DAB CRC

◆ twolame_set_DAB_scf_crc()

TL_API int twolame_set_DAB_scf_crc ( twolame_options glopts,
unsigned char *  mp2buffer,
int  mp2buffer_size 
)

Set the DAB ScF-CRC error protection. The front-end is responsible for holding at least two mp2 frames in memory to invoke this method.

For DAB to work properly follow these steps: First: Reserve enough bits in ancillary data field (options->num_ancillary_bits). Second: Put the encoder into "single frame mode" i.e. only read 1152 samples per channel. Third: When you receive an mp2 frame back from the library, call this method to insert the options->dabCrc[i] values to the previous mp2 frame.

Parameters
gloptspointer to twolame options pointer for the (N) encoded frame
mp2bufferbuffer to the (N-1) encoded frame
mp2buffer_sizethe length (in bytes) of mp2buffer
Returns
0 if successful, non-zero on failure
twolame-0.4.0/doc/html/Makefile.am0000644000015600001630000000257513550126461013661 00000000000000 asciidoc=@PATH_ASCIIDOC@ -b xhtml11 \ -a revision="@PACKAGE_VERSION@" \ -a stylesheet=twolame.css \ -a linkcss \ -a stylesdir='.' pkgdocdir = @docdir@ pkghtmldir = $(pkgdocdir)/html doxygen_files = \ doxygen.css \ doxygen.png \ nav_f.png \ nav_h.png \ tabs.css \ twolame_8h_source.html \ twolame_8h.html asciidoc_files = \ api.html \ authors.html \ news.html \ index.html \ psycho.html \ readme.html \ twolame.1.html \ vbr.html stylesheet_files = \ twolame-manpage.css \ twolame.css EXTRA_DIST = Doxyfile.in if MAINTAINER_MODE pkghtml_DATA = $(doxygen_files) $(asciidoc_files) $(stylesheet_files) EXTRA_DIST += Doxyfile.in $(pkghtml_DATA) $(doxygen_files): Doxyfile $(top_srcdir)/libtwolame/twolame.h @PATH_DOXYGEN@ rm -f index.html files.html globals*.html index.html: $(top_srcdir)/doc/index.txt $(asciidoc) -o $@ $< readme.html: $(top_srcdir)/README $(asciidoc) -o $@ $< authors.html: $(top_srcdir)/AUTHORS $(asciidoc) -o $@ $< news.html: $(top_srcdir)/NEWS $(asciidoc) -o $@ $< api.html: $(top_srcdir)/doc/api.txt $(asciidoc) -o $@ $< psycho.html: $(top_srcdir)/doc/psycho.txt $(asciidoc) -o $@ $< vbr.html: $(top_srcdir)/doc/vbr.txt $(asciidoc) -o $@ $< twolame.1.html: $(top_srcdir)/doc/twolame.1.txt $(asciidoc) -d manpage -o $@ $< MAINTAINERCLEANFILES = $(doxygen_files) $(asciidoc_files) endif twolame-0.4.0/doc/html/news.html0000644000015600001630000003161513550126544013466 00000000000000 What is new in TwoLAME

Version 0.4.0 (2019-10-11)

  • Added free format encoding (now up to 450 kbps)

  • Added DAB utility methods for ScF-CRC handling

  • Added twolame_get_original() and twolame_set_original()

  • Added twolame_get_extension() and twolame_set_extension()

  • Bundled .spec file in tarball for building RPM for twolame

  • Make libsndfile dependency (and therefore the frontend) optional

  • Fixed VBR encoding

  • Fixed setting for error protection flag

  • New check for invalid bitrate/channel encoder settings

  • New checks against failed memory allocations

  • Fixed padding policy (now adding an empty slot)

  • Fixed build when maintainer mode is disabled

  • Fixed scaling of floating point input source through libsndfile

  • Removed slotinfo global variables to fix thread safety bug

  • Switched to handling reading from STDIN using libsndfile

  • Fix for potential buffer overrun relating to MAX_NAME_SIZE in CLI tool

  • Install AUTHORS, COPYING, README, NEWS in $prefix/share/doc/twolame/

  • Zero the whole of the data structure when calling twolame_init()

  • Prefixed all global symbols with twolame_ to prevent symbol conflicts

  • Fix for twolame_get_framelength() returning the correct frame size when padding is enabled

  • Fix progress counter in twolame CLI

  • Fix compilation on mingw or mxe cross compiler

  • Fix symbols visibility on Windows

  • Add -no-undefined for compilation on Windows

  • Added win32-dll option to LT_INIT

  • Compiler and Valgrind warning fixes

  • Various other minor fixes

Version 0.3.13 (2011-01-21)

  • Fixed documentation location (--docdir in configure)

    • thanks to Chris Mayo for patch

  • Moved source code control to Github

  • Improvements to build system

  • Updated to autoconf 2.60, libtool 2.2, automake 1.10 and Doxygen 1.7.3

  • Fix problem with extern inline by changing them to static inline

  • Wrote perl script to test output of the frontend

  • Changed all debugging messages, writing to stdout to write to stderr

  • Removed calls to exit() from libtwolame.

  • Added --non-copyright option (which is enabled by default)

  • Fix for bad copy/paste of variable assignment.

  • Manpage correction

  • Changed fopen() options to wb to fix Windows

Version 0.3.12 (2008-01-09)

  • Fixed inline for the forthcoming gcc-4.3

    • thanks to Martin Michlmayr for patch

Version 0.3.11 (2007-07-02)

  • Fixed energy levels bug for mono audio

    • thanks to Staale Helleberg for patch

  • Fixed STDIN support in twolame frontend

Version 0.3.10 (2007-03-20)

  • Added win32/winutil.h to tarball - fixes bug #1629945

  • Fixed presentation of --enable-debug in configure script

  • Added twolame_encode_buffer_float32_interleaved()

  • Fixed bug that was loosing stereo in twolame_encode_buffer_float32()

  • Fixed twolame_set_mode() to accept TWOLAME_AUTO_MODE

  • Added source file Ids to the top of every file

  • Added -pedantic to CFLAGS for debug build

Version 0.3.9 (2006-12-31)

  • Fix for Windows in simple frontend: open files in binary mode

    • thanks to Kurien Mathew

  • (libtwolame) Fixed energy level support

    • thanks to Staale Helleberg

  • Nows displays the version number of libsndfile in frontend

    • as suggested by Elio Blanca

  • Changed documentation build system, so you have to run it manually

  • Buffer overrun fix in new_extension()

  • (libtwolame) Added warning that DAB support is still broken

  • (libtwolame) Added twolame_get_framelength() to return number of bytes per frame

  • Added TWOLAME_SAMPLES_PER_FRAME macro, clarifying that there are always 1152 samples per frame in Layer 2

  • Frontend now displays extra information

    • Duration of input file (if known)

    • Total number of frames to be encoded and percentage complete

    • The filesize of the output file

  • Cleaned up source files so that it is consistent and all uses tabs (tab width 4)

Version 0.3.8 (2006-06-19)

  • (libtwolame) Fixed CRC protection

  • More code tidying

  • pkg-config is no-longer required (but is recommended)

  • frontend now has the exectuable suffix appended to filename

  • added -std=c99 to the compiler options

Version 0.3.7 (2006-05-07)

  • (libtwolame) Added twolame_encode_buffer_float32() function

  • (libtwolame) Fix NAN bug for AMD64 processors

  • Checks type sizes of short and float

Version 0.3.6 (2006-12-25)

  • Removed comma which was causing problems with -pedantic

    • Thanks to Akos Maroy

  • (libtwolame) Added libtool library versioning

Version 0.3.5 (2005-11-29)

  • (libtwolame) Added back twolame_get_VBR_q/twolame_set_VBR_q

  • More documentation is installed

Version 0.3.4 (2005-11-19)

  • (libtwolame) Checks parameters a bit better

  • (libtwolame) Removed lots of exit() calls

  • (libtwolame) added twolame_print_config() API call

  • (libtwolame) Fixed twolame.h so that it works with C++ code

  • Rewrote frontend and now (only) uses libsndfile

  • Changed behavior in frontend and backend for verbosity setting

  • Rewrote manpage for frontend

  • (libtwolame) Fixed bug with setting MPEG version

  • (libtwolame) Removed default samplerate - must choose one

  • (libtwolame) Original flag is now turned on by default

  • (libtwolame) Default bitrate is automatically chosen based on the samplerate/channels

  • (libtwolame) Default mode is automatically chosen based on the number of channels

  • Documentation improvements and corrections

  • (libtwolame) made some of VBR debugging send to stderr instead of stdout

Version 0.3.3 (2005-04-19)

  • Added Debian package description

  • Now installs documentation

  • Removed old unused tables.c and tables.h sources

Version 0.3.2 (2005-04-10)

  • Added scaling of input samples

  • Added downmixing/upmixing of samples

  • Applied patch from Christophe Massiot to make TwoLAME thread-safe

Version 0.3.1 (2004-09-17)

  • Frontend displays information about the input file format

  • Fixed bug with audio_get_samples reading more than buffer size

  • Added asciidoc documentation

  • Added doxygen documentation

Version 0.3.0 (2004-09-14)

  • Based on tooLAME 0.2m beta 8

  • changed build system to use automake/libtool

  • now builds shared library

  • restructured lots of code

    • Removed some dead code and unused files

  • should now be close to being thread safe

  • removed memory leaks / static variables

  • changed library API so that it is almost the same as LAMEs

    • hopefully not too many people have been using the old API

    • not too many big differences

    • will hopefully add resampling support to next release

    • API is ready for resampling support to be added

    • ready for downmixing to be added to libtoolame

  • Added libsndfile support to toolame frontend (if you have it)

  • moved set/get functions into get_set.c

  • I have broken energy levels support (sorry !) - will try and fix

  • Added LGPL header to the top of all the files

  • Added toolame_encode_buffer_interleaved


twolame-0.4.0/doc/html/Doxyfile.in0000644000015600001630000031765313550126461013746 00000000000000# Doxyfile 1.8.14 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "@PACKAGE_NAME@" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = @PACKAGE_VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "MPEG Audio Layer 2 encoder" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines (in the resulting output). You can put ^^ in the value part of an # alias to insert a newline as if a physical newline was in the original file. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 0. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 0 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = NO # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = @top_srcdir@/libtwolame/twolame.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: https://www.gnu.org/software/libiconv/) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = NO # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = . # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via Javascript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have Javascript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: https://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.twolame.libtwolame # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.twolame # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = YES # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NONE # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 1 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. # The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /