aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/aac_plugin.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-04-13 01:16:03 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-13 01:16:03 +0000
commitdec6b1612e953c6029d963ff55d2b4a669b60f43 (patch)
treea1138cb07f67c821ee5000618302d21367ab2245 /src/inputPlugins/aac_plugin.c
parent98acfa8ac5bac09ca49a7c21938b5a5801e01ca5 (diff)
downloadmpd-dec6b1612e953c6029d963ff55d2b4a669b60f43.tar.gz
mpd-dec6b1612e953c6029d963ff55d2b4a669b60f43.tar.xz
mpd-dec6b1612e953c6029d963ff55d2b4a669b60f43.zip
Stop passing our single DecoderControl object everywhere
This at least makes the argument list to a lot of our plugin functions shorter and removes a good amount of line nois^W^Wcode, hopefully making things easier to read and follow. git-svn-id: https://svn.musicpd.org/mpd/trunk@7353 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputPlugins/aac_plugin.c')
-rw-r--r--src/inputPlugins/aac_plugin.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index 2962b57c6..aeda10492 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -282,7 +282,7 @@ static int getAacTotalTime(char *file)
return file_time;
}
-static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
+static int aac_decode(OutputBuffer * cb, char *path)
{
float file_time;
float totalTime;
@@ -339,9 +339,9 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
return -1;
}
- dc->audioFormat.bits = 16;
+ dc.audioFormat.bits = 16;
- dc->totalTime = totalTime;
+ dc.totalTime = totalTime;
file_time = 0.0;
@@ -372,12 +372,12 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
sampleRate = frameInfo.samplerate;
#endif
- if (dc->state != DECODE_STATE_DECODE) {
- dc->audioFormat.channels = frameInfo.channels;
- dc->audioFormat.sampleRate = sampleRate;
- getOutputAudioFormat(&(dc->audioFormat),
+ if (dc.state != DECODE_STATE_DECODE) {
+ dc.audioFormat.channels = frameInfo.channels;
+ dc.audioFormat.sampleRate = sampleRate;
+ getOutputAudioFormat(&(dc.audioFormat),
&(cb->audioFormat));
- dc->state = DECODE_STATE_DECODE;
+ dc.state = DECODE_STATE_DECODE;
}
advanceAacBuffer(&b, frameInfo.bytesconsumed);
@@ -395,14 +395,14 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
sampleBufferLen = sampleCount * 2;
- sendDataToOutputBuffer(cb, NULL, dc, 0, sampleBuffer,
+ sendDataToOutputBuffer(cb, NULL, 0, sampleBuffer,
sampleBufferLen, file_time,
bitRate, NULL);
- if (dc->seek) {
- dc->seekError = 1;
- dc->seek = 0;
+ if (dc.seek) {
+ dc.seekError = 1;
+ dc.seek = 0;
decoder_wakeup_player();
- } else if (dc->stop) {
+ } else if (dc.stop) {
eof = 1;
break;
}
@@ -414,12 +414,12 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
if (b.buffer)
free(b.buffer);
- if (dc->state != DECODE_STATE_DECODE)
+ if (dc.state != DECODE_STATE_DECODE)
return -1;
- if (dc->seek) {
- dc->seekError = 1;
- dc->seek = 0;
+ if (dc.seek) {
+ dc.seekError = 1;
+ dc.seek = 0;
decoder_wakeup_player();
}