aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-06 08:04:57 +0100
committerMax Kellermann <max@duempel.org>2010-01-06 08:52:35 +0100
commit6f6d47dd20d30b81eb710f41cd5149b0ed73f98e (patch)
tree9ff9d56b84d35b192f89256d23dddc013490a908 /src/decoder/_flac_common.c
parent030e61115c9dcc804a5441329a9aef2ac9c3619b (diff)
downloadmpd-6f6d47dd20d30b81eb710f41cd5149b0ed73f98e.tar.gz
mpd-6f6d47dd20d30b81eb710f41cd5149b0ed73f98e.tar.xz
mpd-6f6d47dd20d30b81eb710f41cd5149b0ed73f98e.zip
decoder/flac: removed CUE sheet support
This feature has been moved to the "flac" playlist plugin.
Diffstat (limited to 'src/decoder/_flac_common.c')
-rw-r--r--src/decoder/_flac_common.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c
index 471e52522..0585a2c5a 100644
--- a/src/decoder/_flac_common.c
+++ b/src/decoder/_flac_common.c
@@ -193,56 +193,3 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame,
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
}
-
-#if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7
-
-char*
-flac_cue_track( const char* pathname,
- const unsigned int tnum)
-{
- FLAC__bool success;
- FLAC__StreamMetadata* cs;
-
- success = FLAC__metadata_get_cuesheet(pathname, &cs);
- if (!success)
- return NULL;
-
- assert(cs != NULL);
-
- if (cs->data.cue_sheet.num_tracks <= 1)
- {
- FLAC__metadata_object_delete(cs);
- return NULL;
- }
-
- if (tnum > 0 && tnum < cs->data.cue_sheet.num_tracks)
- {
- char* track = g_strdup_printf("track_%03u.flac", tnum);
-
- FLAC__metadata_object_delete(cs);
-
- return track;
- }
- else
- {
- FLAC__metadata_object_delete(cs);
- return NULL;
- }
-}
-
-unsigned int
-flac_vtrack_tnum(const char* fname)
-{
- /* find last occurrence of '_' in fname
- * which is hopefully something like track_xxx.flac
- * another/better way would be to use tag struct
- */
- char* ptr = strrchr(fname, '_');
- if (ptr == NULL)
- return 0;
-
- // copy ascii tracknumber to int
- return (unsigned int)strtol(++ptr, NULL, 10);
-}
-
-#endif /* FLAC_API_VERSION_CURRENT >= 7 */