aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-09-06 00:45:34 +0000
committerEric Wong <normalperson@yhbt.net>2007-09-06 00:45:34 +0000
commit7024700cc51914c3b93e0fd3747f2c3c99ac484a (patch)
tree4ad4d3459128155d2ca172b41522f7c83cd57b6a /src/decode.c
parentfe584bb11c20fbc42055070f27c2a1c62e7e38e3 (diff)
downloadmpd-7024700cc51914c3b93e0fd3747f2c3c99ac484a.tar.gz
mpd-7024700cc51914c3b93e0fd3747f2c3c99ac484a.tar.xz
mpd-7024700cc51914c3b93e0fd3747f2c3c99ac484a.zip
return to busy-waiting on pause for now..
Until we can fix it properly (or replace it with a cleaner event system), I don't want this in trunk. Currently there are strange pauses when queueing and during shutdown that I can't seem to figure out right away. git-svn-id: https://svn.musicpd.org/mpd/trunk@6860 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c14
1 files changed, 4 insertions, 10 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)