# HG changeset patch # User William Pitcock # Date 1188091362 18000 # Node ID 8a53b54fc0815aaefee66feea4247622ee44da84 # Parent 56b0d46a02f6c0221ea3467a822530e8fdc2a840# Parent bee9eaedefa52e12c821bd2ed18784ce9945d4cd Automated merge with ssh://hg.atheme.org//hg/audacious-plugins diff -r bee9eaedefa5 -r 8a53b54fc081 src/wavpack/libwavpack.cxx --- a/src/wavpack/libwavpack.cxx Sat Aug 25 22:57:25 2007 +0200 +++ b/src/wavpack/libwavpack.cxx Sat Aug 25 20:22:42 2007 -0500 @@ -34,6 +34,7 @@ static void wv_load_config(); static int wv_is_our_fd(gchar *filename, VFSFile *file); +static Tuple *wv_probe_for_tuple(gchar *filename, VFSFile *file); static void wv_play(InputPlayback *); static void wv_stop(InputPlayback *); static void wv_pause(InputPlayback *, short); @@ -90,6 +91,8 @@ NULL, wv_is_our_fd, (gchar **)wv_fmts, + NULL, // high precision seeking + wv_probe_for_tuple // probe for a tuple }; int32_t read_bytes (void *id, void *data, int32_t bcount) @@ -447,6 +450,20 @@ return ti; } +static Tuple * +wv_probe_for_tuple(gchar *filename, VFSFile *file) +{ + Tuple *ti; + WavpackDecoder d(&mod); + + if (!d.attach(filename, file)) + return NULL; + + ti = tuple_from_WavpackContext(filename, d.ctx); + + return ti; +} + static void wv_get_song_info(char *filename, char **title, int *length) {