aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decode.c14
-rw-r--r--src/player.c14
2 files changed, 4 insertions, 24 deletions
diff --git a/src/decode.c b/src/decode.c
index bf3e1cb25..c66d67fe0 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -71,7 +71,6 @@ static void stopDecode(DecoderControl * dc)
{
if (decode_pid > 0 && (dc->start || dc->state != DECODE_STATE_STOP)) {
dc->stop = 1;
- kill(decode_pid, SIGCONT);
while (decode_pid > 0 && dc->stop)
my_usleep(10000);
}
@@ -127,8 +126,7 @@ static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af)
ERROR("problems opening audio device while playing \"%s\"\n", pc->utf8url); \
quitDecode(pc,dc); \
return; \
- } else if (decode_pid > 0) { \
- kill(decode_pid, SIGCONT); }\
+ } \
if (pause) { \
dropBufferedAudio(); \
closeAudioDevice(); \
@@ -240,8 +238,6 @@ static int decodeSeek(PlayerControl * pc, DecoderControl * dc,
pc->state = PLAYER_STATE_PAUSE; \
} else { \
if (openAudioDevice(NULL) >= 0) { \
- if (decode_pid > 0) \
- kill(decode_pid, SIGCONT); \
pc->state = PLAYER_STATE_PLAY; \
} else { \
pathcpy_trunc(pc->erroredUrl, pc->utf8url); \
@@ -583,11 +579,9 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
race conditions and weirdness */
end = cb->end;
- if (pause) {
- if (decode_pid)
- kill(decode_pid, SIGSTOP);
- kill(getpid(), SIGSTOP);
- } else if (cb->begin != end && cb->begin != next) {
+ if (pause)
+ my_usleep(10000);
+ else if (cb->begin != end && cb->begin != next) {
if (doCrossFade == 1 && next >= 0 &&
((next > cb->begin &&
(fadePosition = next - cb->begin)
diff --git a/src/player.c b/src/player.c
index 700d37b51..c53a6ae1d 100644
--- a/src/player.c
+++ b/src/player.c
@@ -194,10 +194,6 @@ int playerWait(int fd)
if (pc->wait)
return 0;
- pid = player_pid;
- if (pid > 0)
- kill(pid, SIGCONT);
-
if (playerStop(fd) < 0)
return -1;
@@ -235,8 +231,6 @@ int playerPlay(int fd, Song * song)
}
resetPlayerMetadata();
- if (player_pid)
- kill(player_pid, SIGCONT);
while (player_pid > 0 && pc->play)
my_usleep(1000);
@@ -249,7 +243,6 @@ int playerStop(int fd)
if (player_pid > 0 && pc->state != PLAYER_STATE_STOP) {
pc->stop = 1;
- kill(player_pid, SIGCONT);
while (player_pid > 0 && pc->stop)
my_usleep(1000);
}
@@ -277,8 +270,6 @@ int playerPause(int fd)
if (player_pid > 0 && pc->state != PLAYER_STATE_STOP) {
pc->pause = 1;
- if (player_pid > 0 && pc->state == PLAYER_STATE_PAUSE)
- kill(player_pid, SIGCONT);
while (player_pid > 0 && pc->pause)
my_usleep(1000);
}
@@ -386,7 +377,6 @@ void playerCloseAudio(void)
if (playerStop(STDERR_FILENO) < 0)
return;
pc->closeAudio = 1;
- kill(player_pid, SIGCONT);
while (player_pid > 0 && pc->closeAudio)
my_usleep(1000);
}
@@ -432,7 +422,6 @@ void playerQueueLock(void)
PlayerControl *pc = &(getPlayerData()->playerControl);
if (player_pid > 0 && pc->queueLockState == PLAYER_QUEUE_UNLOCKED) {
- kill(player_pid, SIGCONT);
pc->lockQueue = 1;
while (player_pid > 0 && pc->lockQueue)
my_usleep(1000);
@@ -444,7 +433,6 @@ void playerQueueUnlock(void)
PlayerControl *pc = &(getPlayerData()->playerControl);
if (player_pid > 0 && pc->queueLockState == PLAYER_QUEUE_LOCKED) {
- kill(player_pid, SIGCONT);
pc->unlockQueue = 1;
while (player_pid > 0 && pc->unlockQueue)
my_usleep(1000);
@@ -476,8 +464,6 @@ int playerSeek(int fd, Song * song, float time)
resetPlayerMetadata();
pc->seekWhere = time;
pc->seek = 1;
- if (player_pid)
- kill(player_pid, SIGCONT);
while (player_pid > 0 && pc->seek)
my_usleep(1000);
}