aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/audiofile_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/audiofile_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/audiofile_plugin.c')
-rw-r--r--src/inputPlugins/audiofile_plugin.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index 4510ba46a..d661278b1 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -45,7 +45,7 @@ static int getAudiofileTotalTime(char *file)
return total_time;
}
-static int audiofile_decode(OutputBuffer * cb, char *path)
+static int audiofile_decode(char *path)
{
int fs, frame_count;
AFfilehandle af_fp;
@@ -72,7 +72,7 @@ static int audiofile_decode(OutputBuffer * cb, char *path)
(unsigned int)afGetRate(af_fp, AF_DEFAULT_TRACK);
dc.audioFormat.channels =
(mpd_uint8)afGetVirtualChannels(af_fp, AF_DEFAULT_TRACK);
- getOutputAudioFormat(&(dc.audioFormat), &(cb->audioFormat));
+ getOutputAudioFormat(&(dc.audioFormat), &(cb.audioFormat));
frame_count = afGetFrameCount(af_fp, AF_DEFAULT_TRACK);
@@ -97,7 +97,7 @@ static int audiofile_decode(OutputBuffer * cb, char *path)
while (!eof) {
if (dc.seek) {
- clearOutputBuffer(cb);
+ clearOutputBuffer();
current = dc.seekWhere *
dc.audioFormat.sampleRate;
afSeekFrame(af_fp, AF_DEFAULT_TRACK, current);
@@ -112,8 +112,7 @@ static int audiofile_decode(OutputBuffer * cb, char *path)
eof = 1;
else {
current += ret;
- sendDataToOutputBuffer(cb,
- NULL,
+ sendDataToOutputBuffer(NULL,
1,
chunk,
ret * fs,
@@ -126,7 +125,7 @@ static int audiofile_decode(OutputBuffer * cb, char *path)
}
}
- flushOutputBuffer(cb);
+ flushOutputBuffer();
}
afCloseFile(af_fp);