From 847ca4193e3fbc5b27285979888ab364bbf1792e Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Wed, 9 Jan 2013 11:52:01 -0800 Subject: Add play and pause commands Add commands that always play and always pause, in addition to the current toggle pause command. Closes #342. --- src/player.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/player.h') diff --git a/src/player.h b/src/player.h index ac6853c..d0eac22 100644 --- a/src/player.h +++ b/src/player.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2010 +Copyright (c) 2008-2013 Lars-Dominik Braun Permission is hereby granted, free of charge, to any person obtaining a copy @@ -49,7 +49,8 @@ THE SOFTWARE. #define BAR_PLAYER_BUFSIZE (WAITRESS_BUFFER_SIZE*2) struct audioPlayer { - char doQuit; + bool doQuit; /* protected by pauseMutex */ + bool doPause; /* protected by pauseMutex */ unsigned char channels; unsigned char aoError; @@ -102,6 +103,7 @@ struct audioPlayer { unsigned char *buffer; pthread_mutex_t pauseMutex; + pthread_cond_t pauseCond; WaitressHandle_t waith; }; -- cgit v1.2.3