aboutsummaryrefslogtreecommitdiffstats
path: root/src/playerData.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-08-16 09:28:15 -0700
committerEric Wong <normalperson@yhbt.net>2008-08-16 09:39:32 -0700
commit44d9f62f34e0561d83ea32941f0ea1b529b1490d (patch)
tree5345eba046b6e3bcf8c063e7bae8b501b7a99f4a /src/playerData.c
parentf9f70860622613686e6ac0bf7ebd448f437d92a7 (diff)
downloadmpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.tar.gz
mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.tar.xz
mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.zip
core rewrite (decode,player,outputBuffer,playlist)
This is a huge refactoring of the core mpd process. The queueing/buffering mechanism is heavily reworked. The player.c code has been merged into outputBuffer (the actual ring buffering logic is handled by ringbuf.c); and decode.c actually handles decoding stuff. The end result is several hundreds of lines shorter, even though we still have a lot of DEBUG statements left in there for tracing and a lot of assertions, too.
Diffstat (limited to 'src/playerData.c')
-rw-r--r--src/playerData.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/playerData.c b/src/playerData.c
index 3934d0c6f..113a71f35 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -24,19 +24,14 @@
#define DEFAULT_BUFFER_SIZE 2048
#define DEFAULT_BUFFER_BEFORE_PLAY 10
-unsigned int buffered_before_play;
-PlayerControl pc;
-DecoderControl dc;
-OutputBuffer ob;
-
void initPlayerData(void)
{
float perc = DEFAULT_BUFFER_BEFORE_PLAY;
char *test;
- int crossfade = 0;
size_t bufferSize = DEFAULT_BUFFER_SIZE;
unsigned int buffered_chunks;
ConfigParam *param;
+ unsigned int buffered_before_play;
param = getConfigParam(CONF_AUDIO_BUFFER_SIZE);
@@ -73,18 +68,6 @@ void initPlayerData(void)
}
ob_init(buffered_chunks);
-
- notify_init(&pc.notify);
- pc.error = PLAYER_ERROR_NOERROR;
- pc.state = PLAYER_STATE_STOP;
- pc.queueState = PLAYER_QUEUE_BLANK;
- pc.queueLockState = PLAYER_QUEUE_UNLOCKED;
- pc.crossFade = crossfade;
- pc.softwareVolume = 1000;
-
- notify_init(&dc.notify);
- dc.state = DECODE_STATE_STOP;
- dc.error = DECODE_ERROR_NOERROR;
}