aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/oggvorbis_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/oggvorbis_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 '')
-rw-r--r--src/inputPlugins/oggvorbis_plugin.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c
index afcef3e08..eb44b5c6e 100644
--- a/src/inputPlugins/oggvorbis_plugin.c
+++ b/src/inputPlugins/oggvorbis_plugin.c
@@ -195,7 +195,7 @@ static MpdTag *oggCommentsParse(char **comments)
return tag;
}
-static void putOggCommentsIntoOutputBuffer(OutputBuffer * cb, char *streamName,
+static void putOggCommentsIntoOutputBuffer(char *streamName,
char **comments)
{
MpdTag *tag;
@@ -216,7 +216,7 @@ static void putOggCommentsIntoOutputBuffer(OutputBuffer * cb, char *streamName,
}
/* public */
-static int oggvorbis_decode(OutputBuffer * cb, InputStream * inStream)
+static int oggvorbis_decode(InputStream * inStream)
{
OggVorbis_File vf;
ov_callbacks callbacks;
@@ -275,7 +275,7 @@ static int oggvorbis_decode(OutputBuffer * cb, InputStream * inStream)
while (1) {
if (dc.seek) {
if (0 == ov_time_seek_page(&vf, dc.seekWhere)) {
- clearOutputBuffer(cb);
+ clearOutputBuffer();
chunkpos = 0;
} else
dc.seekError = 1;
@@ -292,11 +292,11 @@ static int oggvorbis_decode(OutputBuffer * cb, InputStream * inStream)
dc.audioFormat.sampleRate = vi->rate;
if (dc.state == DECODE_STATE_START) {
getOutputAudioFormat(&(dc.audioFormat),
- &(cb->audioFormat));
+ &(cb.audioFormat));
dc.state = DECODE_STATE_DECODE;
}
comments = ov_comment(&vf, -1)->user_comments;
- putOggCommentsIntoOutputBuffer(cb, inStream->metaName,
+ putOggCommentsIntoOutputBuffer(inStream->metaName,
comments);
ogg_getReplayGainInfo(comments, &replayGainInfo);
}
@@ -316,7 +316,7 @@ static int oggvorbis_decode(OutputBuffer * cb, InputStream * inStream)
if ((test = ov_bitrate_instant(&vf)) > 0) {
bitRate = test / 1000;
}
- sendDataToOutputBuffer(cb, inStream,
+ sendDataToOutputBuffer(inStream,
inStream->seekable,
chunk, chunkpos,
ov_pcm_tell(&vf) /
@@ -329,7 +329,7 @@ static int oggvorbis_decode(OutputBuffer * cb, InputStream * inStream)
}
if (!dc.stop && chunkpos > 0) {
- sendDataToOutputBuffer(cb, NULL, inStream->seekable,
+ sendDataToOutputBuffer(NULL, inStream->seekable,
chunk, chunkpos,
ov_time_tell(&vf), bitRate,
replayGainInfo);
@@ -340,7 +340,7 @@ static int oggvorbis_decode(OutputBuffer * cb, InputStream * inStream)
ov_clear(&vf);
- flushOutputBuffer(cb);
+ flushOutputBuffer();
return 0;
}