aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mpc_plugin.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-04-13 01:16:15 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-13 01:16:15 +0000
commitc1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3 (patch)
treeb8c2ff14310e1e659f509aeae0cf847608af2d5f /src/inputPlugins/mpc_plugin.c
parentdec6b1612e953c6029d963ff55d2b4a669b60f43 (diff)
downloadmpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.tar.gz
mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.tar.xz
mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.zip
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
Diffstat (limited to 'src/inputPlugins/mpc_plugin.c')
-rw-r--r--src/inputPlugins/mpc_plugin.c12
1 files changed, 6 insertions, 6 deletions
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);