diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-02-22 15:46:14 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-02-22 15:47:08 +0100 |
commit | b61291f4bd51e3d9e30504c16de743decd54f2d9 (patch) | |
tree | c7c506bd9fba6463dd0db13a5b9888f1d8294641 /src/player.h | |
parent | c2ab253a32ae7652e7ae59ea43b68a53e0ee68e4 (diff) | |
download | pianobar-b61291f4bd51e3d9e30504c16de743decd54f2d9.tar.gz pianobar-b61291f4bd51e3d9e30504c16de743decd54f2d9.tar.bz2 pianobar-b61291f4bd51e3d9e30504c16de743decd54f2d9.zip |
Minor player cleanup
Move player buffer to heap, a few const’s here and there, increase
header buffer size, fix comments.
Diffstat (limited to 'src/player.h')
-rw-r--r-- | src/player.h | 8 |
1 files changed, 5 insertions, 3 deletions
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 <sys/types.h> #include <pthread.h> +#include <stdint.h> #include <piano.h> #include <waitress.h> @@ -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}; |