From b61291f4bd51e3d9e30504c16de743decd54f2d9 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 22 Feb 2012 15:46:14 +0100 Subject: Minor player cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move player buffer to heap, a few const’s here and there, increase header buffer size, fix comments. --- src/player.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/player.h') diff --git a/src/player.h b/src/player.h index 070ac0f..ac6853c 100644 --- a/src/player.h +++ b/src/player.h @@ -38,6 +38,7 @@ THE SOFTWARE. /* required for freebsd */ #include #include +#include #include #include @@ -45,6 +46,7 @@ THE SOFTWARE. #include "settings.h" #define BAR_PLAYER_MS_TO_S_FACTOR 1000 +#define BAR_PLAYER_BUFSIZE (WAITRESS_BUFFER_SIZE*2) struct audioPlayer { char doQuit; @@ -82,7 +84,7 @@ struct audioPlayer { /* stsz atom: sample sizes */ size_t sampleSizeN; size_t sampleSizeCurr; - unsigned int *sampleSize; + uint32_t *sampleSize; NeAACDecHandle aacHandle; #endif @@ -97,10 +99,10 @@ struct audioPlayer { ao_device *audioOutDevice; const BarSettings_t *settings; + unsigned char *buffer; + pthread_mutex_t pauseMutex; WaitressHandle_t waith; - /* buffer; should be large enough */ - unsigned char buffer[WAITRESS_BUFFER_SIZE*2]; }; enum {PLAYER_RET_OK = 0, PLAYER_RET_ERR = 1}; -- cgit v1.2.3