2 terminatorX - realtime audio scratching software
3 Copyright (C) 1999 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 contains the main() function. All the initializing
26 19 Mar 1999: Applied a patch by Andrew C. Bul+hac?k (eMail: acb@zikzak.net)
27 that fixes wavfile reading routine for the overreading bug.
29 20 Mar 1999: Big endian support.
31 23 Mar 1999: display of new keys (<-, ->)
33 4 October 1999: Rewrite ;) - back to C++
37 #include "tX_mastergui.h"
51 #include "tX_wavfunc.h"
52 #include "tX_global.h"
54 #include "tX_dialog.h"
67 time=g_timer_elapsed(my_time, &ms);
70 gtk_idle_remove(idle_tag);
76 int main(int argc, char **argv)
79 fprintf(stderr, "%s, Copyright(C)1999 Alexander König, alkoit00@fht-esslingen.de\n", VERSIONSTRING);
81 fprintf(stderr, "%s, Copyright(C)1999 Alexander König, alkoit00@fht-esslingen.de\n", VERSIONSTRING);
82 setenv ("CYGWIN", "binmode");
84 fprintf(stderr, "terminatorX comes with ABSOLUTELY NO WARRANTY - for details read the license.\n");
89 printf("3DNow! not detected. Giving up.\n");
93 printf("3DNow! accelerations available.\n");
96 #ifndef CREATE_BENCHMARK
98 gtk_init (&argc, &argv);
102 if (globals.show_nag)
106 my_time=g_timer_new();
107 g_timer_start(my_time);
109 idle_tag=gtk_idle_add((GtkFunction)idle, NULL);
112 if (strlen(globals.scratch_name))
114 fprintf (stderr, "Loading: %s\n", globals.scratch_name);
115 if (load_wav(globals.scratch_name, &globals.scratch_data, &globals.scratch_size))
117 strcpy(globals.scratch_name , "");
118 globals.scratch_size=0;
119 globals.scratch_len=0;
122 globals.scratch_len=globals.scratch_size/sizeof(int16_t);
126 if (strlen(globals.loop_name))
128 fprintf (stderr, "Loading: %s\n", globals.loop_name);
129 if (load_wav(globals.loop_name, &globals.loop_data, &globals.loop_size))
131 strcpy(globals.loop_name , "");
137 globals.loop_len=globals.loop_size/sizeof(int16_t);
145 globals.rec_buffer=0;
147 create_mastergui(globals.width, globals.height);
149 if (!globals.show_nag) display_mastergui();
153 if (globals.scratch_data) free(globals.scratch_data);
154 if (globals.loop_data) free(globals.loop_data);
155 if (globals.rec_buffer) free(globals.rec_buffer);
159 fprintf(stderr, "Have a nice life.\n");