Mercurial > audlegacy-plugins
changeset 566:98c4735c3c2e trunk
[svn] - update to new input plugin API
author | nenolod |
---|---|
date | Mon, 29 Jan 2007 03:26:26 -0800 |
parents | c2f3df58cad6 |
children | 1e987b380776 |
files | ChangeLog src/wavpack/libwavpack.cxx |
diffstat | 2 files changed, 30 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 29 03:14:02 2007 -0800 +++ b/ChangeLog Mon Jan 29 03:26:26 2007 -0800 @@ -1,3 +1,12 @@ +2007-01-29 11:14:02 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [1216] + - make this compile again + + trunk/src/wav/wav-sndfile.c | 1 + + trunk/src/wav/wav-sndfile.h | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + + 2007-01-29 06:42:40 +0000 Daniel Barkalow <barkalow@iabervon.org> revision [1214] Fix a dumb mistake, and also use generic flags and get_time.
--- a/src/wavpack/libwavpack.cxx Mon Jan 29 03:14:02 2007 -0800 +++ b/src/wavpack/libwavpack.cxx Mon Jan 29 03:26:26 2007 -0800 @@ -33,11 +33,11 @@ extern "C" InputPlugin * get_iplugin_info(void); static void wv_load_config(); static int wv_is_our_fd(gchar *filename, VFSFile *file); -static void wv_play(char *); -static void wv_stop(void); -static void wv_pause(short); -static void wv_seek(int); -static int wv_get_time(void); +static void wv_play(InputPlayback *); +static void wv_stop(InputPlayback *); +static void wv_pause(InputPlayback *, short); +static void wv_seek(InputPlayback *, int); +static int wv_get_time(InputPlayback *); static void wv_get_song_info(char *, char **, int *); static char *generate_title(const char *, WavpackContext *ctx); static double isSeek; @@ -349,13 +349,13 @@ } static void -wv_play(char *filename) +wv_play(InputPlayback *data) { paused = 0; isSeek = -1; killDecodeThread = false; AudioError = false; - thread_handle = g_thread_create(DecodeThread, (void *) filename, TRUE, NULL); + thread_handle = g_thread_create(DecodeThread, (void *) data->filename, TRUE, NULL); return; } @@ -445,33 +445,32 @@ } static int -wv_get_time(void) +wv_get_time(InputPlayback *data) { - if (!mod.output) + if (data->output == NULL) return -1; if (AudioError) return -2; - if (killDecodeThread && !mod.output->buffer_playing()) + if (killDecodeThread && !data->output->buffer_playing()) return -1; - return mod.output->output_time(); -} - - -static void -wv_seek(int sec) -{ - isSeek = sec; - mod.output->flush((int) (1000 * isSeek)); + return data->output->output_time(); } static void -wv_pause(short pause) +wv_seek(InputPlayback *data, int sec) { - mod.output->pause(paused = pause); + isSeek = sec; + data->output->flush((int) (1000 * isSeek)); } static void -wv_stop(void) +wv_pause(InputPlayback *data, short pause) +{ + data->output->pause(paused = pause); +} + +static void +wv_stop(InputPlayback *data) { killDecodeThread = true; if (thread_handle != 0) {