diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-05-26 15:06:05 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-05-26 15:10:54 +0200 |
commit | 2c5bcc5ee10d6e982daa6660ba1925b3d95a2922 (patch) | |
tree | 5f8879251782e52d40a33a31da158f8a640f2cb2 /src/player.h | |
parent | f54c15c8b1b88c9689cadf9a9bc43a5f735f4b8e (diff) | |
download | pianobar-2c5bcc5ee10d6e982daa6660ba1925b3d95a2922.tar.gz pianobar-2c5bcc5ee10d6e982daa6660ba1925b3d95a2922.tar.bz2 pianobar-2c5bcc5ee10d6e982daa6660ba1925b3d95a2922.zip |
Revert "Remove pause mutex/add pthread cleanup function"
This reverts commit 7df9371491e96a99c1e463f7787aede352ac5a37.
Diffstat (limited to 'src/player.h')
-rw-r--r-- | src/player.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/player.h b/src/player.h index 2261d44..ac6853c 100644 --- a/src/player.h +++ b/src/player.h @@ -47,11 +47,11 @@ THE SOFTWARE. #define BAR_PLAYER_MS_TO_S_FACTOR 1000 #define BAR_PLAYER_BUFSIZE (WAITRESS_BUFFER_SIZE*2) -#define BAR_PLAYER_SIGSTOP SIGRTMIN -#define BAR_PLAYER_SIGCONT SIGRTMIN+1 struct audioPlayer { + char doQuit; unsigned char channels; + unsigned char aoError; enum { PLAYER_FREED = 0, /* thread is not running */ @@ -64,10 +64,6 @@ struct audioPlayer { PLAYER_RECV_DATA, /* playing track */ PLAYER_FINISHED_PLAYBACK } mode; - enum { - PLAYER_RET_OK = 0, - PLAYER_RET_ERR = 1, - } ret; PianoAudioFormat_t audioFormat; unsigned int scale; @@ -105,11 +101,12 @@ struct audioPlayer { unsigned char *buffer; - bool paused; - pthread_t thread; + pthread_mutex_t pauseMutex; WaitressHandle_t waith; }; +enum {PLAYER_RET_OK = 0, PLAYER_RET_ERR = 1}; + void *BarPlayerThread (void *data); unsigned int BarPlayerCalcScale (float); |