diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-06-02 10:10:26 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-06-02 10:10:26 +0000 |
commit | f57be50d73a167500ee04135e15e0474a7532478 (patch) | |
tree | e7bc9082a93b57edba9d5ee8926b14a14bf66488 /src/playerData.c | |
parent | 6ac1d797afac1f2ec6e89594516a1e7ffe8cfe8a (diff) | |
download | mpd-f57be50d73a167500ee04135e15e0474a7532478.tar.gz mpd-f57be50d73a167500ee04135e15e0474a7532478.tar.xz mpd-f57be50d73a167500ee04135e15e0474a7532478.zip |
remove audioDeviceStates from playerData and getPlayerData
git-svn-id: https://svn.musicpd.org/mpd/trunk@7372 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/playerData.c')
-rw-r--r-- | src/playerData.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/playerData.c b/src/playerData.c index 103ec2980..3934d0c6f 100644 --- a/src/playerData.c +++ b/src/playerData.c @@ -21,12 +21,10 @@ #include "log.h" #include "utils.h" -unsigned int buffered_before_play; - #define DEFAULT_BUFFER_SIZE 2048 #define DEFAULT_BUFFER_BEFORE_PLAY 10 -static PlayerData playerData_pd; +unsigned int buffered_before_play; PlayerControl pc; DecoderControl dc; OutputBuffer ob; @@ -39,7 +37,6 @@ void initPlayerData(void) size_t bufferSize = DEFAULT_BUFFER_SIZE; unsigned int buffered_chunks; ConfigParam *param; - size_t device_array_size = audio_device_count() * sizeof(mpd_sint8); param = getConfigParam(CONF_AUDIO_BUFFER_SIZE); @@ -75,8 +72,6 @@ void initPlayerData(void) buffered_before_play = buffered_chunks; } - playerData_pd.audioDeviceStates = xmalloc(device_array_size); - ob_init(buffered_chunks); notify_init(&pc.notify); @@ -92,18 +87,4 @@ void initPlayerData(void) dc.error = DECODE_ERROR_NOERROR; } -PlayerData *getPlayerData(void) -{ - return &playerData_pd; -} - -void freePlayerData(void) -{ - /* We don't want to release this memory until we know our player and - * decoder have exited. Otherwise, their signal handlers will want to - * access playerData_pd and we need to keep it available for them */ - waitpid(-1, NULL, 0); - ob_free(); - free(playerData_pd.audioDeviceStates); -} |