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/mpc_plugin.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/inputPlugins/mpc_plugin.c') diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c index 867965688..77ca07b30 100644 --- a/src/inputPlugins/mpc_plugin.c +++ b/src/inputPlugins/mpc_plugin.c @@ -111,7 +111,7 @@ static inline mpd_sint16 convertSample(MPC_SAMPLE_FORMAT sample) return val; } -static int mpc_decode(OutputBuffer * cb, InputStream * inStream) +static int mpc_decode(InputStream * inStream) { mpc_decoder decoder; mpc_reader reader; @@ -170,7 +170,7 @@ static int mpc_decode(OutputBuffer * cb, InputStream * inStream) dc.audioFormat.channels = info.channels; dc.audioFormat.sampleRate = info.sample_freq; - getOutputAudioFormat(&(dc.audioFormat), &(cb->audioFormat)); + getOutputAudioFormat(&(dc.audioFormat), &(cb.audioFormat)); replayGainInfo = newReplayGainInfo(); replayGainInfo->albumGain = info.gain_album * 0.01; @@ -184,7 +184,7 @@ static int mpc_decode(OutputBuffer * cb, InputStream * inStream) if (dc.seek) { samplePos = dc.seekWhere * dc.audioFormat.sampleRate; if (mpc_decoder_seek_sample(&decoder, samplePos)) { - clearOutputBuffer(cb); + clearOutputBuffer(); s16 = (mpd_sint16 *) chunk; chunkpos = 0; } else @@ -221,7 +221,7 @@ static int mpc_decode(OutputBuffer * cb, InputStream * inStream) bitRate = vbrUpdateBits * dc.audioFormat.sampleRate / 1152 / 1000; - sendDataToOutputBuffer(cb, inStream, + sendDataToOutputBuffer(inStream, inStream->seekable, chunk, chunkpos, total_time, @@ -243,12 +243,12 @@ static int mpc_decode(OutputBuffer * cb, InputStream * inStream) bitRate = vbrUpdateBits * dc.audioFormat.sampleRate / 1152 / 1000; - sendDataToOutputBuffer(cb, NULL, inStream->seekable, + sendDataToOutputBuffer(NULL, inStream->seekable, chunk, chunkpos, total_time, bitRate, replayGainInfo); } - flushOutputBuffer(cb); + flushOutputBuffer(); freeReplayGainInfo(replayGainInfo); -- cgit v1.2.3