mp3splt-gtk

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Enumerations | Functions
mp3splt.h File Reference
`#include <sys/types.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <ltdl.h>`
Include dependency graph for mp3splt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | splt_cd
struct | splt_cd_state
struct | splt_error
| structure containing error strings for error messages More...
struct | splt_freedb
struct | splt_freedb_one_result
| Defines one search result from the freedb search. More...
struct | splt_freedb_results
| All the freedb search results. More...
struct | splt_internal
struct | splt_oformat
struct | splt_options
| structure with all the options supplied to split the file More...
struct | splt_original_tags
struct | splt_plugin_data
| structure containing all the data about a plugin More...
struct | splt_plugin_func
| contains pointers to the plugin functions More...
struct | splt_plugin_info
| Structure containing information about one plugin. More...
struct | splt_plugins
| internal plugins structure More...
struct | splt_point
| Definition of a splitpoint. More...
struct | splt_progres
| The data structure for the progress bar. More...
struct | splt_proxy
| proxy information More...
struct | splt_ssplit
struct | splt_state
| structure for the splt state More...
struct | splt_struct
| The data libmp3splt keeps all its internal data in. More...
struct | splt_syncerrors
| The number of syncerrors. More...
struct | splt_tags
| The tags of a splitpoint. More...
struct | splt_wrap
| The wrapped filenames found inside a file. More...

## Macros

#define | MP3SPLT_LIB_GETTEXT_DOMAIN "libmp3splt"
#define | MP3SPLT_MP3SPLT_H
#define | SPLT_AUTHOR "Matteo Trotta | Munteanu Alexandru"
#define | SPLT_DEFAULT_CDDB_CUE_OUTPUT "@A - @n - @t"
#define | SPLT_DEFAULT_OUTPUT "@f_@mm_@ss_@hh__@Mm_@Ss_@Hh"
#define | SPLT_DEFAULT_PARAM_GAP 30
#define | SPLT_DEFAULT_PARAM_MINIMUM_LENGTH 0.0
#define | SPLT_DEFAULT_PARAM_MINIMUM_TRACK_LENGTH 0.0
#define | SPLT_DEFAULT_PARAM_OFFSET 0.8
#define | SPLT_DEFAULT_PARAM_SHOTS 25
#define | SPLT_DEFAULT_PARAM_THRESHOLD -48.0
#define | SPLT_DEFAULT_PARAM_TRACKS 0
#define | SPLT_DEFAULT_SILENCE_OUTPUT "@f_silence_@n"
#define | SPLT_DEFAULT_SYNCERROR_OUTPUT "@f_error_@n"
#define | SPLT_DEFAULT_TRIM_SILENCE_OUTPUT "@f_trimmed"
#define | SPLT_DIRCHAR '/'
#define | SPLT_DIRSTR "/"
#define | SPLT_DISCIDLEN 8
#define | SPLT_EMAIL "<mtrotta@users.sourceforge.net> | <io_fx@yahoo.fr>"
#define | SPLT_FALSE 0
#define | SPLT_FREEDB2_CGI_SITE "tracktype.org/~cddb/cddb.cgi"
#define | SPLT_FREEDB_CDDB_CGI_PORT 80
#define | SPLT_FREEDB_CDDB_PORT 8880
#define | SPLT_FREEDB_CGI_SITE "freedb.org/~cddb/cddb.cgi"
#define | SPLT_FREEDB_GET_FILE_TYPE_CDDB 4
#define | SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI 3
#define | SPLT_FREEDB_SEARCH_TYPE_CDDB 2
#define | SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI 1
#define | SPLT_ID3V1_NUMBER_OF_GENRES 127
#define | SPLT_INTERNAL_FRAME_MODE_ENABLED 2
#define | SPLT_INTERNAL_PROGRESS_RATE 1
#define | SPLT_MAXCD 512
#define | SPLT_MAXOLEN 255
#define | SPLT_NDIRCHAR '\\'
#define | SPLT_ORIGINAL_TAGS_DEFAULT "%[@o,@N=1]"
#define | SPLT_OUTNUM 20
#define | SPLT_PACKAGE_NAME "libmp3splt"
#define | SPLT_PACKAGE_VERSION "0.7.2"
#define | SPLT_TRUE 1
#define | SPLT_UNDEFINED_GENRE "Other"
#define | SPLT_WEBSITE "http://mp3splt.sourceforge.net"

## Typedefs

typedef struct splt_progres | splt_progress

## Enumerations

enum

splt_code {
SPLT_OK = 0, SPLT_OK_SPLIT = 1, SPLT_SPLITPOINT_BIGGER_THAN_LENGTH = 4, SPLT_SILENCE_OK = 5,
SPLT_TIME_SPLIT_OK = 6, SPLT_NO_SILENCE_SPLITPOINTS_FOUND = 7, SPLT_OK_SPLIT_EOF = 8, SPLT_LENGTH_SPLIT_OK = 9,
SPLT_TRIM_SILENCE_OK = 10, SPLT_FREEDB_OK = 100, SPLT_FREEDB_FILE_OK = 101, SPLT_CDDB_OK = 102,
SPLT_CUE_OK = 103, SPLT_FREEDB_MAX_CD_REACHED = 104, SPLT_AUDACITY_OK = 105, SPLT_DEWRAP_OK = 200,
SPLT_SYNC_OK = 300, SPLT_MIGHT_BE_VBR = 301, SPLT_ERR_SYNC = -300, SPLT_ERR_NO_SYNC_FOUND = -301,
SPLT_ERR_TOO_MANY_SYNC_ERR = -302, SPLT_OUTPUT_FORMAT_OK = 400, SPLT_OUTPUT_FORMAT_AMBIGUOUS = 401, SPLT_REGEX_OK = 800,
SPLT_ERROR_SPLITPOINTS = -1, SPLT_ERROR_CANNOT_OPEN_FILE = -2, SPLT_ERROR_INVALID = -3, SPLT_ERROR_EQUAL_SPLITPOINTS = -5,
SPLT_ERROR_SPLITPOINTS_NOT_IN_ORDER = -6, SPLT_ERROR_NEGATIVE_SPLITPOINT = -7, SPLT_ERROR_INCORRECT_PATH = -8, SPLT_ERROR_INCOMPATIBLE_OPTIONS = -10,
SPLT_ERROR_INPUT_OUTPUT_SAME_FILE = -12, SPLT_ERROR_CANNOT_ALLOCATE_MEMORY = -15, SPLT_ERROR_CANNOT_OPEN_DEST_FILE = -16, SPLT_ERROR_CANT_WRITE_TO_OUTPUT_FILE = -17,
SPLT_ERROR_WHILE_READING_FILE = -18, SPLT_ERROR_SEEKING_FILE = -19, SPLT_ERROR_BEGIN_OUT_OF_FILE = -20, SPLT_ERROR_INEXISTENT_FILE = -21,
SPLT_SPLIT_CANCELLED = -22, SPLT_ERROR_LIBRARY_LOCKED = -24, SPLT_ERROR_STATE_NULL = -25, SPLT_ERROR_NEGATIVE_TIME_SPLIT = -26,
SPLT_ERROR_CANNOT_CREATE_DIRECTORY = -27, SPLT_ERROR_CANNOT_CLOSE_FILE = -28, SPLT_ERROR_NO_PLUGIN_FOUND = -29, SPLT_ERROR_CANNOT_INIT_LIBLTDL = -30,
SPLT_ERROR_CRC_FAILED = -31, SPLT_ERROR_NO_PLUGIN_FOUND_FOR_FILE = -32, SPLT_ERROR_PLUGIN_ERROR = -33, SPLT_ERROR_TIME_SPLIT_VALUE_INVALID = -34,
SPLT_ERROR_LENGTH_SPLIT_VALUE_INVALID = -35, SPLT_ERROR_CANNOT_GET_TOTAL_TIME = -36, SPLT_ERROR_LIBID3 = -37, SPLT_FREEDB_ERROR_INITIALISE_SOCKET = -101,
SPLT_FREEDB_ERROR_CANNOT_GET_HOST = -102, SPLT_FREEDB_ERROR_CANNOT_OPEN_SOCKET = -103, SPLT_FREEDB_ERROR_CANNOT_CONNECT = -104, SPLT_FREEDB_ERROR_CANNOT_SEND_MESSAGE = -105,
SPLT_FREEDB_ERROR_INVALID_SERVER_ANSWER = -106, SPLT_FREEDB_ERROR_SITE_201 = -107, SPLT_FREEDB_ERROR_SITE_200 = -108, SPLT_FREEDB_ERROR_BAD_COMMUNICATION = -109,
SPLT_FREEDB_ERROR_GETTING_INFOS = -110, SPLT_FREEDB_NO_CD_FOUND = -111, SPLT_FREEDB_ERROR_CANNOT_RECV_MESSAGE = -112, SPLT_INVALID_CUE_FILE = -115,
SPLT_INVALID_CDDB_FILE = -116, SPLT_FREEDB_NO_SUCH_CD_IN_DATABASE = -118, SPLT_FREEDB_ERROR_SITE = -119, SPLT_FREEDB_ERROR_CANNOT_DISCONNECT = -120,
SPLT_DEWRAP_ERR_FILE_LENGTH = -200, SPLT_DEWRAP_ERR_VERSION_OLD = -201, SPLT_DEWRAP_ERR_NO_FILE_OR_BAD_INDEX = -202, SPLT_DEWRAP_ERR_FILE_DAMAGED_INCOMPLETE = -203,
SPLT_DEWRAP_ERR_FILE_NOT_WRAPED_DAMAGED = -204, SPLT_OUTPUT_FORMAT_ERROR = -400, SPLT_ERROR_INEXISTENT_SPLITPOINT = -500, SPLT_PLUGIN_ERROR_UNSUPPORTED_FEATURE = -600,
SPLT_INVALID_AUDACITY_FILE = -700, SPLT_INVALID_REGEX = -800, SPLT_REGEX_NO_MATCH = -801, SPLT_REGEX_UNAVAILABLE = -802
}

enum

splt_int_options {
SPLT_OPT_PRETEND_TO_SPLIT, SPLT_OPT_QUIET_MODE, SPLT_OPT_DEBUG_MODE, SPLT_OPT_SPLIT_MODE,
SPLT_OPT_TAGS, SPLT_OPT_XING, SPLT_OPT_CREATE_DIRS_FROM_FILENAMES, SPLT_OPT_OUTPUT_FILENAMES,
SPLT_OPT_FRAME_MODE, SPLT_OPT_AUTO_ADJUST, SPLT_OPT_INPUT_NOT_SEEKABLE, SPLT_OPT_PARAM_NUMBER_TRACKS,
SPLT_OPT_PARAM_SHOTS, SPLT_OPT_PARAM_REMOVE_SILENCE, SPLT_OPT_PARAM_GAP, SPLT_OPT_ALL_REMAINING_TAGS_LIKE_X,
SPLT_OPT_AUTO_INCREMENT_TRACKNUMBER_TAGS, SPLT_OPT_ENABLE_SILENCE_LOG, SPLT_OPT_FORCE_TAGS_VERSION, SPLT_OPT_LENGTH_SPLIT_FILE_NUMBER,
SPLT_OPT_REPLACE_TAGS_IN_TAGS, SPLT_OPT_OVERLAP_TIME, SPLT_OPT_SPLIT_TIME, SPLT_OPT_PARAM_THRESHOLD,
SPLT_OPT_PARAM_OFFSET, SPLT_OPT_PARAM_MIN_LENGTH, SPLT_OPT_PARAM_MIN_TRACK_LENGTH, SPLT_OPT_ARTIST_TAG_FORMAT,
SPLT_OPT_ALBUM_TAG_FORMAT, SPLT_OPT_TITLE_TAG_FORMAT, SPLT_OPT_COMMENT_TAG_FORMAT, SPLT_OPT_REPLACE_UNDERSCORES_TAG_FORMAT,
SPLT_OPT_SET_FILE_FROM_CUE_IF_FILE_TAG_FOUND
}

enum | splt_message_type { SPLT_MESSAGE_INFO, SPLT_MESSAGE_DEBUG }
enum | splt_output_filenames_options { SPLT_OUTPUT_FORMAT, SPLT_OUTPUT_DEFAULT, SPLT_OUTPUT_CUSTOM }
enum | splt_progress_messages { SPLT_PROGRESS_PREPARE, SPLT_PROGRESS_CREATE, SPLT_PROGRESS_SEARCH_SYNC, SPLT_PROGRESS_SCAN_SILENCE }
enum | splt_split_mode_options { SPLT_OPTION_NORMAL_MODE, SPLT_OPTION_WRAP_MODE, SPLT_OPTION_SILENCE_MODE, SPLT_OPTION_TRIM_SILENCE_MODE, SPLT_OPTION_ERROR_MODE, SPLT_OPTION_TIME_MODE, SPLT_OPTION_LENGTH_MODE }
enum | splt_str_format { SPLT_NO_CONVERSION, SPLT_TO_LOWERCASE, SPLT_TO_UPPERCASE, SPLT_TO_FIRST_UPPERCASE, SPLT_TO_WORD_FIRST_UPPERCASE }
enum | splt_tags_options { SPLT_TAGS_ORIGINAL_FILE, SPLT_CURRENT_TAGS, SPLT_NO_TAGS, SPLT_TAGS_FROM_FILENAME_REGEX }
enum | splt_type_of_splitpoint { SPLT_SPLITPOINT, SPLT_SKIPPOINT }

## Functions

int | mp3splt_append_plugins_scan_dir (splt_state *state, char *dir)
int | mp3splt_append_splitpoint (splt_state *state, long split_value, const char *name, int type)
int | mp3splt_append_tags (splt_state *state, const char *title, const char *artist, const char *album, const char *performer, const char *year, const char *comment, int track, const char *genre)
int | mp3splt_count_silence_points (splt_state *state, int *error)
void | mp3splt_erase_all_splitpoints (splt_state *state, int *error)
void | mp3splt_erase_all_tags (splt_state *state, int *error)
void | mp3splt_export_to_cue (splt_state *state, const char *out_file, short stop_at_total_time, int *error)
char ** | mp3splt_find_filenames (splt_state *state, const char *filename, int *num_of_files_found, int *error)
int | mp3splt_find_plugins (splt_state *state)
void | mp3splt_free_one_tag (splt_tags *tags)
void | mp3splt_free_state (splt_state *state, int *error)
float | mp3splt_get_float_option (splt_state *state, int option_name, int *error)
const splt_freedb_results * | mp3splt_get_freedb_search (splt_state *state, const char *searched_string, int *error, int search_type, const char *search_server, int port)
int | mp3splt_get_int_option (splt_state *state, int option_name, int *error)
long | mp3splt_get_long_option (splt_state *state, int option_name, int *error)
const splt_point * | mp3splt_get_splitpoints (splt_state *state, int *splitpoints_number, int *error)
char * | mp3splt_get_strerror (splt_state *state, int error_code)
const splt_syncerrors * | mp3splt_get_syncerrors (splt_state *state, int *error)
const splt_tags * | mp3splt_get_tags (splt_state *state, int *tags_number, int *error)
void | mp3splt_get_version (char *version)
const splt_wrap * | mp3splt_get_wrap_files (splt_state *state, int *error)
splt_state * | mp3splt_new_state (int *error)
splt_tags * | mp3splt_parse_filename_regex (splt_state *state, int *error)
void | mp3splt_put_audacity_labels_splitpoints_from_file (splt_state *state, const char *file, int *error)
void | mp3splt_put_cddb_splitpoints_from_file (splt_state *state, const char *cddb_file, int *error)
void | mp3splt_put_cue_splitpoints_from_file (splt_state *state, const char *cue_file, int *error)
int | mp3splt_put_tags_from_string (splt_state *state, const char *tags, int *error)
int | mp3splt_set_float_option (splt_state *state, int option_name, float value)
int | mp3splt_set_int_option (splt_state *state, int option_name, int value)
int | mp3splt_set_long_option (splt_state *state, int option_name, long value)
int | mp3splt_set_message_function (splt_state *state, void(*message_cb)(const char *, splt_message_type))
void | mp3splt_set_oformat (splt_state *state, const char *format_string, int *error)
int | mp3splt_set_progress_function (splt_state *state, void(*progress_cb)(splt_progress *p_bar))
int | mp3splt_set_silence_level_function (splt_state *state, void(*get_silence_cb)(long time, float level, void *user_data), void *user_data)
int | mp3splt_set_silence_points (splt_state *state, int *error)
int | mp3splt_set_split_filename_function (splt_state *state, void(*file_cb)(const char *, int))
void | mp3splt_set_trim_silence_points (splt_state *state, int *error)
int | mp3splt_split (splt_state *state)
void | mp3splt_stop_split (splt_state *state, int *error)
int | mp3splt_u_check_if_directory (const char *fname)
void | mp3splt_write_freedb_file_result (splt_state *state, int disc_id, const char *cddb_file, int *error, int cddb_get_type, const char *cddb_get_server, int port)
int | mp3splt_set_path_of_split (splt_state *state, const char *path)
int | mp3splt_set_filename_to_split (splt_state *state, const char *filename)
char * | mp3splt_get_filename_to_split (splt_state *state)
int | mp3splt_set_m3u_filename (splt_state *state, const char *filename)
int | mp3splt_set_silence_log_filename (splt_state *state, const char *filename)
int | mp3splt_set_input_filename_regex (splt_state *state, const char *regex)
int | mp3splt_set_default_comment_tag (splt_state *state, const char *default_comment_tag)
int | mp3splt_set_default_genre_tag (splt_state *state, const char *default_genre_tag)

## Detailed Description

Main types, error codes and confirmations.

main functions

This is the main file containing the most important types, error codes and confirmations

The errors are negative values, the warnings and the confirmations are positive values

Contains the library API functions.

Definition in file mp3splt.h.

## Macro Definition Documentation

#define SPLT_AUTHOR "Matteo Trotta | Munteanu Alexandru"

Package authors.

Definition at line 1354 of file mp3splt.h.

#define SPLT_DEFAULT_CDDB_CUE_OUTPUT "@A - @n - @t"

Default output for the cddb and cue.

See #mp3splt_set_oformat

Definition at line 535 of file mp3splt.h.

#define SPLT_DEFAULT_PARAM_GAP 30

Default value for the SPLT_OPT_PARAM_GAP option.

Definition at line 491 of file mp3splt.h.

Referenced by set_default_prefs_event().

#define SPLT_DEFAULT_PARAM_MINIMUM_LENGTH 0.0

Default value for the SPLT_OPT_PARAM_MIN_LENGTH option.

Definition at line 483 of file mp3splt.h.

#define SPLT_DEFAULT_PARAM_MINIMUM_TRACK_LENGTH 0.0

Default value for the SPLT_OPT_PARAM_MIN_TRACK_LENGTH option.

Definition at line 487 of file mp3splt.h.

#define SPLT_DEFAULT_PARAM_OFFSET 0.8

Default value for the SPLT_OPT_PARAM_OFFSET option.

Definition at line 479 of file mp3splt.h.

Referenced by set_default_prefs_event().

#define SPLT_DEFAULT_PARAM_SHOTS 25

Default value for the SPLT_OPT_PARAM_SHOTS option.

Definition at line 499 of file mp3splt.h.

#define SPLT_DEFAULT_PARAM_THRESHOLD -48.0

Default value for the SPLT_OPT_PARAM_THRESHOLD option.

Definition at line 475 of file mp3splt.h.

Referenced by set_default_prefs_event().

#define SPLT_DEFAULT_PARAM_TRACKS 0

Default value for the SPLT_OPT_PARAM_NUMBER_TRACKS option.

Definition at line 495 of file mp3splt.h.

#define SPLT_DEFAULT_SILENCE_OUTPUT "@f_silence_@n"

Default output for the silence split.

See #mp3splt_set_oformat

Definition at line 545 of file mp3splt.h.

#define SPLT_DEFAULT_SYNCERROR_OUTPUT "@f_error_@n"

Default output for the syncerror.

See #mp3splt_set_oformat

Definition at line 540 of file mp3splt.h.

#define SPLT_DEFAULT_TRIM_SILENCE_OUTPUT "@f_trimmed"

Default output for the trim silence split.

See #mp3splt_set_oformat

Definition at line 550 of file mp3splt.h.

#define SPLT_FALSE 0

False value.

Definition at line 63 of file mp3splt.h.

Referenced by create_tags_options_box(), detect_silence_and_add_splitpoints_start_thread(), detect_silence_and_set_splitpoints(), freedb_search(), main(), put_options_from_preferences(), and split_it().

#define SPLT_FREEDB_CDDB_CGI_PORT 80

default port

Definition at line 1327 of file mp3splt.h.

#define SPLT_FREEDB_CDDB_PORT 8880

default port

Definition at line 1331 of file mp3splt.h.

#define SPLT_FREEDB_CGI_SITE "freedb.org/~cddb/cddb.cgi"

urls of freedb2.org and freedb.org

Definition at line 1335 of file mp3splt.h.

#define SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI 1

Freedb constants.

Definition at line 1308 of file mp3splt.h.

Referenced by freedb_search().

#define SPLT_MAXCD 512

Maximum results for the freedb search.

Definition at line 119 of file mp3splt.h.

#define SPLT_PACKAGE_NAME "libmp3splt"

Package name.

Definition at line 1343 of file mp3splt.h.

#define SPLT_PACKAGE_VERSION "0.7.2"

Package version.

Definition at line 1349 of file mp3splt.h.

#define SPLT_TRUE 1

True value.

Definition at line 59 of file mp3splt.h.

Referenced by detect_silence_and_set_splitpoints(), main(), put_options_from_preferences(), and split_it().

#define SPLT_WEBSITE "http://mp3splt.sourceforge.net"

Package website.

Definition at line 1359 of file mp3splt.h.

## Typedef Documentation

typedef struct splt_progres splt_progress

The data structure for the progress bar.

The meanings of the values are:

float = fraction in percent char * = string (name on the progress bar)

## Enumeration Type Documentation

enum splt_code

All error codes we can generate.

Definition at line 862 of file mp3splt.h.

enum splt_int_options

Integer options.

Integer options

Use #mp3splt_set_option to set those options
Use #mp3splt_get_option to get those options

Enumerator:

  SPLT_OPT_PRETEND_TO_SPLIT | Pretend to split the file, without real split: this option works in all modes except error mode and dewrap split.
  SPLT_OPT_DEBUG_MODE | If we print out debug messages. The option can take the values SPLT_TRUE or SPLT_FALSE Default is SPLT_FALSE
  SPLT_OPT_SPLIT_MODE | The type of the split. The option can take the values from splt_split_mode_options Default is SPLT_OPTION_NORMAL_MODE
  SPLT_OPT_TAGS | The type of tags to put in the new split files. The option can take the values from splt_tags_options Default is SPLT_CURRENT_TAGS
  SPLT_OPT_XING | SPLT_TRUE if we write Xing header (mp3 only)

  SPLT_OPT_CREATE_DIRS_FROM_FILENAMES

  If this option is SPLT_TRUE, we create directories from the output file names without parsing for illegal characters the output filenames.

  Otherwise, we parse for illegal characters the filenames and replace them with '_'. The tags are always checked for illegal characters when set into filenames.

  Default is SPLT_FALSE because it's safer to check for illegal characters.

  SPLT_OPT_OUTPUT_FILENAMES | The option can take the values from #SPLT_OUTPUT_FILENAMES_OPTIONS. Default is SPLT_FALSE
  SPLT_OPT_FRAME_MODE | If we enable the frame mode or not The frame mode processes the file frame by frame and it is useful when splitting a VBR (Variable Bit Rate) file. The option can take the values SPLT_TRUE or SPLT_FALSE Default is SPLT_TRUE
  SPLT_OPT_AUTO_ADJUST | If we use silence detection to auto-adjust splitpoints The following options may change the behaviour of the auto-adjust: SPLT_OPT_PARAM_THRESHOLD, SPLT_OPT_PARAM_OFFSET, SPLT_OPT_PARAM_GAP, #. The option can take the values SPLT_TRUE or SPLT_FALSE Default is SPLT_FALSE
  SPLT_OPT_INPUT_NOT_SEEKABLE | If the input is not seekable This allows you to split mp3 and ogg streams which can be read only one time and can't be seeked. The option can take the values SPLT_TRUE or SPLT_FALSE Default is SPLT_FALSE
  SPLT_OPT_PARAM_NUMBER_TRACKS | The desired number of tracks when having a SPLT_OPTION_SILENCE_MODE split. The option can take positive integer values. 0 means that we split as many files we found Default is SPLT_DEFAULT_PARAM_TRACKS
  SPLT_OPT_PARAM_SHOTS | The desired number of shots when having a SPLT_OPTION_SILENCE_MODE or SPLT_OPTION_TRIM_SILENCE_MODE split or using the SPLT_OPT_AUTO_ADJUST option. The option can take positive integer values. It defines the number of shots to be found after the silence. Decrease this value if you need to split files having closer silence points. Default is SPLT_DEFAULT_PARAM_SHOTS
  SPLT_OPT_PARAM_REMOVE_SILENCE | Allows you to remove the silence between the split tracks when having a SPLT_OPTION_SILENCE_MODE split. The option can take the values SPLT_TRUE or SPLT_FALSE Default is SPLT_FALSE
  SPLT_OPT_PARAM_GAP | The time to auto-adjust before and after splitpoint when having the SPLT_OPT_AUTO_ADJUST option. The option can take positive integer values Default is SPLT_DEFAULT_PARAM_GAP
  SPLT_OPT_ALL_REMAINING_TAGS_LIKE_X | if to set all tags like X one
  SPLT_OPT_AUTO_INCREMENT_TRACKNUMBER_TAGS | -if we auto increment the tracknumber in the tags
  SPLT_OPT_ENABLE_SILENCE_LOG | if we enable the silence points log ('mp3splt.log')
  SPLT_OPT_FORCE_TAGS_VERSION | if we force a tags version or not
  SPLT_OPT_LENGTH_SPLIT_FILE_NUMBER | number of files to split by equal time length
  SPLT_OPT_OVERLAP_TIME | Time to overlap between the split files.
  SPLT_OPT_SPLIT_TIME | The interval for the SPLT_OPTION_TIME_MODE split (in hundreths of seconds) The option can take positive float values Default is 6000 hundreths of seconds (one minute)
  SPLT_OPT_PARAM_THRESHOLD | The threshold level (dB) to be considered silence It is a float number between -96 and 0. It is used when having a SPLT_OPTION_SILENCE_MODE or a SPLT_OPTION_TRIM_SILENCE_MODE split or when having the SPLT_OPT_AUTO_ADJUST option The option can take float values between -96 and 0 Default is SPLT_DEFAULT_PARAM_THRESHOLD
  SPLT_OPT_PARAM_OFFSET | Allows you to adjust the offset of cutpoint in silence time when having a SPLT_OPTION_SILENCE_MODE or a SPLT_OPTION_TRIM_SILENCE_MODE split or when having the SPLT_OPT_AUTO_ADJUST option. The option can take float values between -2 and 2 0 is the begin of silence, and 1 the end Default is SPLT_DEFAULT_PARAM_OFFSET
  SPLT_OPT_PARAM_MIN_LENGTH | Minimum number of seconds to be considered a valid splitpoint All silences shorter than this value are discarded. The option can take positive float values Default is SPLT_DEFAULT_PARAM_MINIMUM_LENGTH
  SPLT_OPT_PARAM_MIN_TRACK_LENGTH | Minimum number of seconds to be considered a valid track All tracks shorter than this value are discarded. The option can take positive float values. Default is SPLT_DEFAULT_PARAM_MINIMUM_TRACK_LENGTH
  SPLT_OPT_ARTIST_TAG_FORMAT | Format of the artist tag from filename. Possible values are #splt_str_format
  SPLT_OPT_ALBUM_TAG_FORMAT | Format of the album tag from filename. Possible values are #splt_str_format
  SPLT_OPT_TITLE_TAG_FORMAT | Format of the title tag from filename. Possible values are #splt_str_format
  SPLT_OPT_COMMENT_TAG_FORMAT | Format of the comment tag from filename. Possible values are #splt_str_format
  SPLT_OPT_REPLACE_UNDERSCORES_TAG_FORMAT | Replace underscores with space when setting tags from filename regex.
  SPLT_OPT_SET_FILE_FROM_CUE_IF_FILE_TAG_FOUND | If SPLT_TRUE, parse the FILE line and set the filename to split from the CUE file.

Definition at line 1001 of file mp3splt.h.

enum splt_message_type

used with the 'put_message' function

Enumerator:

  SPLT_MESSAGE_INFO | Info message.
  SPLT_MESSAGE_DEBUG | Debug message.

Definition at line 357 of file mp3splt.h.

enum splt_output_filenames_options

Values for the SPLT_OPT_OUTPUT_FILENAMES option.

Values for the SPLT_OPT_OUTPUT_FILENAMES option

Enumerator:

  SPLT_OUTPUT_FORMAT | output specified by the set_oformat
  SPLT_OUTPUT_DEFAULT | the default output. depends of the type of the split.
  SPLT_OUTPUT_CUSTOM | we don't change anything Of course we use our internal logic to generate at least unique names in this case

Definition at line 459 of file mp3splt.h.

enum splt_progress_messages

Progress messages sent from the library to the client.

Progress messages sent from the library to the client

Enumerator:

  SPLT_PROGRESS_PREPARE | Preparing to split a song.
  SPLT_PROGRESS_CREATE | Creating the split file.
  SPLT_PROGRESS_SEARCH_SYNC | Searching for syncerrors.
  SPLT_PROGRESS_SCAN_SILENCE | Scanning for silence.

Definition at line 974 of file mp3splt.h.

enum splt_split_mode_options

Values for the SPLT_OPT_SPLIT_MODE option.

Values for the SPLT_OPT_SPLIT_MODE option

Enumerator:

  SPLT_OPTION_NORMAL_MODE | Normal split.
  SPLT_OPTION_WRAP_MODE | Split the file created with mp3wrap or albumwrap.
  SPLT_OPTION_SILENCE_MODE | Split with silence detection.
  SPLT_OPTION_TRIM_SILENCE_MODE | Split with trim silence detection.
  SPLT_OPTION_ERROR_MODE | Split with error mode It is useful to split large file derivated from a concatenation of smaller files.
  SPLT_OPTION_TIME_MODE | Will create an indefinite number of smaller files with a fixed time length specified by SPLT_OPT_SPLIT_TIME.
  SPLT_OPTION_LENGTH_MODE | Split in X pieces of equal time length. X is defined by the SPLT_OPT_LENGTH_SPLIT_FILE_NUMBER option

Definition at line 419 of file mp3splt.h.

enum splt_tags_options

Values for the SPLT_OPT_TAGS option.

Values for the SPLT_OPT_TAGS option

Enumerator:

  SPLT_TAGS_ORIGINAL_FILE | Keep the tags of the original file.
  SPLT_CURRENT_TAGS | Keep the tags issued from cddb, cue or set by the user with #mp3splt_append_tags.
  SPLT_NO_TAGS | Does not put any tags.
  SPLT_TAGS_FROM_FILENAME_REGEX | Sets tags from filename regex. See mp3splt_set_input_filename_regex.

Definition at line 506 of file mp3splt.h.

enum splt_type_of_splitpoint

we define a 'skippoint' as a splitpoint that is not taken into consideration

Definition at line 1249 of file mp3splt.h.

## Function Documentation

char* mp3splt_get_filename_to_split | ( | splt_state * | state | ) |

Reads out the path to the input file.

Is very practical after importing a cue file: The cue file provides an input filename but does not tell us about this.

Parameters

  state | The central struct libmp3splt keeps all its data in
  path | The new input file name

Returns
  The error code

const splt_freedb_results* mp3splt_get_freedb_search | ( | splt_state * | state,
|  | const char * | searched_string,
|  | int * | error,
|  | int | search_type,
|  | const char * | search_server,
|  | int | port
| ) |  |

test

Referenced by freedb_search().

Here is the caller graph for this function:

splt_state* mp3splt_new_state | ( | int * | error | ) |

Initialisation and free.

Creates a new state structure

Creates a new state structure, needed by libmp3splt

Referenced by main().

Here is the caller graph for this function:

int mp3splt_set_filename_to_split | ( | splt_state * | state,
|  | const char * | filename
| ) |  |

Sets path to the input file.

Parameters

  state | The central struct libmp3splt keeps all its data in
  path | The new input file name

Returns
  The error code

Referenced by detect_silence_and_set_splitpoints(), fix_ogg_stream(), split_it(), and update_output_options().

Here is the caller graph for this function:

int mp3splt_set_input_filename_regex | ( | splt_state * | state,
|  | const char * | regex
| ) |  |

Defines the regex that will be used for SPLT_TAGS_FROM_FILENAME_REGEX to get out tags.

Example: (?<artist>.*?) _ (?<album>.*?) will extract 'one artist' and 'one album' from 'one artist _ one album',

int mp3splt_set_path_of_split | ( | splt_state * | state,
|  | const char * | path
| ) |  |

splt_filepaths Set filenames and paths

    Sets the path for the creation of new split files

Parameters

  state | The central struct libmp3splt keeps all its data in
  path | The new output path

Returns
  The error code

Referenced by fix_ogg_stream(), and split_it().

Here is the caller graph for this function: