mirror of
http://mpg123.de/trunk/.git
synced 2025-10-29 14:09:21 +03:00
wrap buffer code in #ifndef NOXFERMEM
git-svn-id: svn://scm.orgis.org/mpg123/trunk@630 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
@@ -221,13 +221,17 @@ int control_generic (struct frame *fr)
|
|||||||
if (mode == MODE_PLAYING) {
|
if (mode == MODE_PLAYING) {
|
||||||
mode = MODE_PAUSED;
|
mode = MODE_PAUSED;
|
||||||
audio_flush(param.outmode, &ai);
|
audio_flush(param.outmode, &ai);
|
||||||
|
#ifndef NOXFERMEM
|
||||||
if (param.usebuffer)
|
if (param.usebuffer)
|
||||||
kill(buffer_pid, SIGSTOP);
|
kill(buffer_pid, SIGSTOP);
|
||||||
|
#endif
|
||||||
generic_sendmsg("P 1");
|
generic_sendmsg("P 1");
|
||||||
} else {
|
} else {
|
||||||
mode = MODE_PLAYING;
|
mode = MODE_PLAYING;
|
||||||
|
#ifndef NOXFERMEM
|
||||||
if (param.usebuffer)
|
if (param.usebuffer)
|
||||||
kill(buffer_pid, SIGCONT);
|
kill(buffer_pid, SIGCONT);
|
||||||
|
#endif
|
||||||
generic_sendmsg("P 2");
|
generic_sendmsg("P 2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -475,15 +479,19 @@ int control_generic (struct frame *fr)
|
|||||||
} /* end main (alive) loop */
|
} /* end main (alive) loop */
|
||||||
|
|
||||||
/* quit gracefully */
|
/* quit gracefully */
|
||||||
|
#ifndef NOXFERMEM
|
||||||
if (param.usebuffer) {
|
if (param.usebuffer) {
|
||||||
kill(buffer_pid, SIGINT);
|
kill(buffer_pid, SIGINT);
|
||||||
xfermem_done_writer(buffermem);
|
xfermem_done_writer(buffermem);
|
||||||
waitpid(buffer_pid, NULL, 0);
|
waitpid(buffer_pid, NULL, 0);
|
||||||
xfermem_done(buffermem);
|
xfermem_done(buffermem);
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
audio_flush(param.outmode, &ai);
|
audio_flush(param.outmode, &ai);
|
||||||
free(pcm_sample);
|
free(pcm_sample);
|
||||||
|
#ifndef NOXFERMEM
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (param.outmode == DECODE_AUDIO)
|
if (param.outmode == DECODE_AUDIO)
|
||||||
audio_close(&ai);
|
audio_close(&ai);
|
||||||
if (param.outmode == DECODE_WAV)
|
if (param.outmode == DECODE_WAV)
|
||||||
|
|||||||
Reference in New Issue
Block a user