Input filename and paths
Using libmp3splt
Collaboration diagram for Input filename and paths:

## Functions

const char * | mp3splt_get_filename_to_split (splt_state *state)
splt_code | mp3splt_set_filename_to_split (splt_state *state, const char *filename)
splt_code | mp3splt_set_m3u_filename (splt_state *state, const char *m3u_filename)
splt_code | mp3splt_set_path_of_split (splt_state *state, const char *path_of_split)
splt_code | mp3splt_set_silence_full_log_filename (splt_state *state, const char *filename)
splt_code | mp3splt_set_silence_log_filename (splt_state *state, const char *filename)

## Detailed Description

## Function Documentation

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

Returns the filename to be split from the `state`.

It is useful after importing a CUE file that provides a filename with the FILE tag.

Parameters

  [in] | state | Main state.

Returns
  Possible error.

See Also
  SPLT_OPT_SET_FILE_FROM_CUE_IF_FILE_TAG_FOUND

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

Sets the input filename to split.

Parameters

  [in] | state | Main state.
  [in] | filename | Input filename to be split.

Returns
  Possible error.

Referenced by update_output_options().

Here is the caller graph for this function:

splt_code mp3splt_set_m3u_filename | ( | splt_state * | state,
|  | const char * | m3u_filename
| ) |  |

Output filename for a M3U file that will be created in the output path.

The M3U file will contain all the split files. It will not be created if this function is not called.

Parameters

  [in] | state | Main state.
  [in] | m3u_filename | M3U filename.

Returns
  Possible error.

See Also
  mp3splt_set_path_of_split

splt_code mp3splt_set_path_of_split | ( | splt_state * | state,
|  | const char * | path_of_split
| ) |  |

Sets the output directory where the split files will be created.

Parameters

  [in] | state | Main state.
  [in] | path_of_split | Output directory for the generated files.

Returns
  Possible error.

splt_code mp3splt_set_silence_full_log_filename | ( | splt_state * | state,
|  | const char * | filename
| ) |  |

Full log filename for the SPLT_OPTION_SILENCE_MODE split mode that will be created.

The full log filename is useful to draw the amplitude wave of the input file (in dB) in order to choose a threshold. If this function is not called, no full log is written.

Note
  Full log file structure:
  The first column is a dummy column which is always zero, for plotting on zero axis purposes.
  The second column is the time in seconds as double.
  The third column is the dB level.
  The fourth column is the silences shots counter.
  The five column is the number of splitpoints found.
  The sixth column is the start time of the silence spot found.
  The seventh column is the end time of the silence spot found.

Example of plotting the full log file with gnuplot:

gnuplot -e "file='silence_logs.txt'; set decimalsign locale; set xlabel 'Time in seconds';
plot file using 2:3 title 'Threshold',
file using 2:4 title 'Silence shots' with linespoints,
file using 2:5 title 'Number of silence points found' with fsteps,
file using 6:1 title 'Begin of silence',
file using 7:1 title 'End of silence' with points;
pause -1"

Parameters

  [in] | state | Main state.
  [in] | filename | Full log filename when detecting splitpoints from silence.

Returns
  Possible error.

See Also
  mp3splt_set_path_of_split

splt_code mp3splt_set_silence_log_filename | ( | splt_state * | state,
|  | const char * | filename
| ) |  |

Log filename for the SPLT_OPTION_SILENCE_MODE split mode that will be created.

The log filename is useful to find out the silence splitpoints with different parameters without having to detect silence every time. Note that if changing the SPLT_OPT_PARAM_MIN_LENGTH or SPLT_OPT_PARAM_THRESHOLD or the input filename, the silence detection will still need be to be recomputed.

By default, the filename is `mp3splt.log`.

Note
  Log file structure:
  The first line contains the name of the split file.
  The second line contains the threshold and the minimum silence length.
  The next lines contain each one three columns:
  - the first column is the start position of the found silence (in seconds.fractions)
  - the second column is the end position of the found silence (in seconds.fractions)
  - the third column is the order of magnitude of the silence length; it is useful to find out most probable silence points

Parameters

  [in] | state | Main state.
  [in] | filename | Log filename when detecting splitpoints from silence.

Returns
  Possible error.

See Also
  mp3splt_set_path_of_split