1
0
mirror of http://mpg123.de/trunk/.git synced 2025-10-28 02:55:29 +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:
thor
2007-05-02 12:08:21 +00:00
parent d0bdf59025
commit c7df68fe55

View File

@@ -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)