volatile fun-ness
git-svn-id: https://svn.musicpd.org/mpd/trunk@705 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
57742785b4
commit
6bc445d00f
|
@ -28,9 +28,9 @@
|
||||||
#define AUDIO_AO_DRIVER_DEFAULT "default"
|
#define AUDIO_AO_DRIVER_DEFAULT "default"
|
||||||
|
|
||||||
typedef struct _AudioFormat {
|
typedef struct _AudioFormat {
|
||||||
mpd_sint8 volatile channels;
|
volatile mpd_sint8 channels;
|
||||||
mpd_uint32 volatile sampleRate;
|
volatile mpd_uint32 sampleRate;
|
||||||
mpd_sint8 volatile bits;
|
volatile mpd_sint8 bits;
|
||||||
} AudioFormat;
|
} AudioFormat;
|
||||||
|
|
||||||
void initAudioDriver();
|
void initAudioDriver();
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
int volatile * decode_pid = NULL;
|
volatile int * volatile decode_pid = NULL;
|
||||||
|
|
||||||
void decodeSigHandler(int sig) {
|
void decodeSigHandler(int sig) {
|
||||||
if(sig==SIGCHLD) {
|
if(sig==SIGCHLD) {
|
||||||
|
|
|
@ -72,11 +72,11 @@ Directory * mp3rootDirectory = NULL;
|
||||||
|
|
||||||
char directorydb[MAXPATHLEN+1];
|
char directorydb[MAXPATHLEN+1];
|
||||||
|
|
||||||
int directory_updatePid = 0;
|
volatile int directory_updatePid = 0;
|
||||||
|
|
||||||
int directory_reReadDB = 0;
|
volatile int directory_reReadDB = 0;
|
||||||
|
|
||||||
mpd_uint16 directory_updateJobId = 0;
|
volatile mpd_uint16 directory_updateJobId = 0;
|
||||||
|
|
||||||
DirectoryList * newDirectoryList();
|
DirectoryList * newDirectoryList();
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
int player_pid = 0;
|
volatile int player_pid = 0;
|
||||||
int player_termSent = 0;
|
volatile int player_termSent = 0;
|
||||||
|
|
||||||
void resetPlayer() {
|
void resetPlayer() {
|
||||||
int pid;
|
int pid;
|
||||||
|
|
48
src/player.h
48
src/player.h
|
@ -51,32 +51,32 @@
|
||||||
#define PLAYER_QUEUE_LOCKED 1
|
#define PLAYER_QUEUE_LOCKED 1
|
||||||
|
|
||||||
typedef struct _PlayerControl {
|
typedef struct _PlayerControl {
|
||||||
mpd_sint8 volatile decodeType;
|
volatile mpd_sint8 decodeType;
|
||||||
mpd_sint8 volatile stop;
|
volatile mpd_sint8 stop;
|
||||||
mpd_sint8 volatile play;
|
volatile mpd_sint8 play;
|
||||||
mpd_sint8 volatile pause;
|
volatile mpd_sint8 pause;
|
||||||
mpd_sint8 volatile state;
|
volatile mpd_sint8 state;
|
||||||
mpd_sint8 volatile closeAudio;
|
volatile mpd_sint8 closeAudio;
|
||||||
mpd_sint8 volatile error;
|
volatile mpd_sint8 error;
|
||||||
mpd_uint16 bitRate;
|
volatile mpd_uint16 bitRate;
|
||||||
mpd_sint8 bits;
|
volatile mpd_sint8 bits;
|
||||||
mpd_sint8 channels;
|
volatile mpd_sint8 channels;
|
||||||
mpd_uint32 sampleRate;
|
volatile mpd_uint32 sampleRate;
|
||||||
float beginTime;
|
volatile float beginTime;
|
||||||
float totalTime;
|
volatile float totalTime;
|
||||||
float elapsedTime;
|
volatile float elapsedTime;
|
||||||
char file[MAXPATHLEN+1];
|
char file[MAXPATHLEN+1];
|
||||||
char erroredFile[MAXPATHLEN+1];
|
char erroredFile[MAXPATHLEN+1];
|
||||||
mpd_sint8 volatile queueState;
|
volatile mpd_sint8 queueState;
|
||||||
mpd_sint8 volatile queueLockState;
|
volatile mpd_sint8 queueLockState;
|
||||||
mpd_sint8 volatile lockQueue;
|
volatile mpd_sint8 lockQueue;
|
||||||
mpd_sint8 volatile unlockQueue;
|
volatile mpd_sint8 unlockQueue;
|
||||||
mpd_sint8 volatile seek;
|
volatile mpd_sint8 seek;
|
||||||
double volatile seekWhere;
|
volatile double seekWhere;
|
||||||
float crossFade;
|
volatile float crossFade;
|
||||||
mpd_uint16 softwareVolume;
|
volatile mpd_uint16 softwareVolume;
|
||||||
double totalPlayTime;
|
volatile double totalPlayTime;
|
||||||
int volatile decode_pid;
|
volatile int decode_pid;
|
||||||
} PlayerControl;
|
} PlayerControl;
|
||||||
|
|
||||||
void player_sigChldHandler(int pid, int status);
|
void player_sigChldHandler(int pid, int status);
|
||||||
|
|
Loading…
Reference in New Issue