2 terminatorX - realtime audio scratching software
3 Copyright (C) 1999-2003 Alexander König
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 Description: This takes care of the "pre-listening" of audiofiles
27 #include <sys/types.h>
31 #include "tX_global.h"
51 kill(player_pid, SIGTERM);
52 waitpid(player_pid, &status, 0);
58 void prelis_start(char *name) {
65 char ogg123_dev[PATH_MAX];
68 if (!globals.prelis) return;
70 if (player_pid) prelis_stop();
72 ext=strrchr(name, (int) '.');
78 #ifdef USE_OGG123_INPUT
79 strcpy(ogg123_dev, "dev:");
80 if (!strncasecmp("ogg", ext, 2))
84 #ifdef USE_MPG123_INPUT
85 if (!strncasecmp("mp", ext, 2))
99 if (temp==-1) /* error */
103 else if (temp==0) /* CHILD */
105 strcpy(dev, globals.oss_device);
106 strcat(ogg123_dev, dev);
108 #ifdef USE_OGG123_INPUT
110 res=execlp("ogg123", "ogg123", "-q", "-d", "oss", "-o", ogg123_dev,
114 #ifdef USE_MPG123_INPUT
116 res=execlp("mpg123", "mpg123", "-q", "-o","oss","-a", dev, nm, NULL);
120 res=execlp("sox", "sox", nm, "-t", "ossdsp", "-w", "-s", dev, NULL);
125 perror("Pre-Listen Error:");