From c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 13 Apr 2008 01:16:15 +0000 Subject: Stop passing our single OutputBuffer object everywhere All of our main singleton data structures are implicitly shared, so there's no reason to keep passing them around and around in the stack and making our internal API harder to deal with. git-svn-id: https://svn.musicpd.org/mpd/trunk@7354 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/mod_plugin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/inputPlugins/mod_plugin.c') diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c index 728f42d6f..31ffa9a3d 100644 --- a/src/inputPlugins/mod_plugin.c +++ b/src/inputPlugins/mod_plugin.c @@ -163,7 +163,7 @@ static void mod_close(mod_Data * data) free(data); } -static int mod_decode(OutputBuffer * cb, char *path) +static int mod_decode(char *path) { mod_Data *data; float total_time = 0.0; @@ -183,7 +183,7 @@ static int mod_decode(OutputBuffer * cb, char *path) dc.audioFormat.bits = 16; dc.audioFormat.sampleRate = 44100; dc.audioFormat.channels = 2; - getOutputAudioFormat(&(dc.audioFormat), &(cb->audioFormat)); + getOutputAudioFormat(&(dc.audioFormat), &(cb.audioFormat)); secPerByte = 1.0 / ((dc.audioFormat.bits * dc.audioFormat.channels / 8.0) * @@ -205,12 +205,12 @@ static int mod_decode(OutputBuffer * cb, char *path) ret = VC_WriteBytes(data->audio_buffer, MIKMOD_FRAME_SIZE); total_time += ret * secPerByte; - sendDataToOutputBuffer(cb, NULL, 0, + sendDataToOutputBuffer(NULL, 0, (char *)data->audio_buffer, ret, total_time, 0, NULL); } - flushOutputBuffer(cb); + flushOutputBuffer(); mod_close(data); -- cgit v1.2.3