![]() |
![]() |
![]() |
LibRhythmCat Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <rclib-cue.h> struct RCLibCueData; enum RCLibCueInputType; struct RCLibCueTrack; void rclib_cue_free (RCLibCueData *data
); const gchar * rclib_cue_get_fallback_encoding (); gboolean rclib_cue_get_track_num (const gchar *path
,gchar **cue_path
,gint *track_num
); guint rclib_cue_read_data (const gchar *input
,RCLibCueInputType type
,RCLibCueData *data
); void rclib_cue_set_fallback_encoding (const gchar *encoding
);
struct RCLibCueData { RCLibCueInputType type; gchar *file; gchar *performer; gchar *title; gchar *genre; guint year; guint length; RCLibCueTrack *track; };
The structure for CUE sheet data.
RCLibCueInputType |
the input type of the CUE file |
gchar * |
the audio file URI |
gchar * |
the performer |
gchar * |
the title (it is usually the album name) |
gchar * |
the genre |
guint |
the year number |
guint |
the track length (number) |
RCLibCueTrack * |
the track data |
typedef enum { RCLIB_CUE_INPUT_URI = 0, RCLIB_CUE_INPUT_PATH = 1, RCLIB_CUE_INPUT_EMBEDDED = 2 } RCLibCueInputType;
The input data type of CUE.
struct RCLibCueTrack { guint index; gchar *title; gchar *performer; guint64 time0; guint64 time1; };
The track data structure of CUE data.
void rclib_cue_free (RCLibCueData *data
);
Free the CUE data. Notice that the pointer itself will not be free.
|
the CUE data to free |
const gchar * rclib_cue_get_fallback_encoding ();
Get the fallback encoding used in the CUE parser, NULL if not set.
gboolean rclib_cue_get_track_num (const gchar *path
,gchar **cue_path
,gint *track_num
);
Get the CUE path/URI and track number from given path/URI.
e.g. For the given path "/home/test/1.cue:1", you will get path "/home/test/1.cue", and track number 1.
|
the file path or URI |
|
the file path or URI of the CUE file. [out][allow-none] |
|
the track number. [out][allow-none] |
Returns : |
Whether the path/URI is valid. |
guint rclib_cue_read_data (const gchar *input
,RCLibCueInputType type
,RCLibCueData *data
);
Read and parse data from CUE file or string.
|
the input data |
|
the data type of the input data |
|
the parsed CUE data. [out] |
Returns : |
The track number, 0 if the CUE data is incorrect. |
void rclib_cue_set_fallback_encoding (const gchar *encoding
);
Set the fallback encoding for CUE parser.
|
the new fallback encoding |