DOOM-3-BFG

DOOM 3 BFG Edition
Log | Files | Refs

controls.h (2721B)


      1 /*
      2 
      3 TiMidity -- Experimental MIDI to WAVE converter
      4 Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
      5 
      6 This program is free software; you can redistribute it and/or modify
      7 it under the terms of the GNU General Public License as published by
      8 the Free Software Foundation; either version 2 of the License, or
      9 (at your option) any later version.
     10 
     11 This program is distributed in the hope that it will be useful,
     12 but WITHOUT ANY WARRANTY; without even the implied warranty of
     13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14 GNU General Public License for more details.
     15 
     16 You should have received a copy of the GNU General Public License
     17 along with this program; if not, write to the Free Software
     18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     19 
     20 controls.h
     21 */
     22 
     23 /* Return values for ControlMode.read */
     24 
     25 #define RC_ERROR -1
     26 #define RC_NO_RETURN_VALUE 0
     27 #define RC_QUIT 1
     28 #define RC_NEXT 2
     29 #define RC_PREVIOUS 3 /* Restart this song at beginning, or the previous
     30 song if we're less than a second into this one. */
     31 #define RC_FORWARD 4
     32 #define RC_BACK 5
     33 #define RC_JUMP 6
     34 #define RC_TOGGLE_PAUSE 7 /* Pause/continue */
     35 #define RC_RESTART 8 /* Restart song at beginning */
     36 
     37 #define RC_PAUSE 9 /* Really pause playing */
     38 #define RC_CONTINUE 10 /* Continue if paused */
     39 #define RC_REALLY_PREVIOUS 11 /* Really go to the previous song */
     40 #define RC_CHANGE_VOLUME 12
     41 #define RC_LOAD_FILE 13		/* Load a new midifile */
     42 #define RC_TUNE_END 14		/* The tune is over, play it again sam? */
     43 
     44 #define CMSG_INFO	0
     45 #define CMSG_WARNING	1
     46 #define CMSG_ERROR	2
     47 #define CMSG_FATAL	3
     48 #define CMSG_TRACE	4
     49 #define CMSG_TIME	5
     50 #define CMSG_TOTAL	6
     51 #define CMSG_FILE	7
     52 #define CMSG_TEXT	8
     53 
     54 #define VERB_NORMAL	0
     55 #define VERB_VERBOSE	1
     56 #define VERB_NOISY	2
     57 #define VERB_DEBUG	3
     58 #define VERB_DEBUG_SILLY	4
     59 
     60 typedef struct {
     61 	char *id_name, id_character;
     62 	int verbosity, trace_playing, opened;
     63 
     64 	int (*open)(int using_stdin, int using_stdout);
     65 	void (*pass_playing_list)(int number_of_files, char *list_of_files[]);
     66 	void (*close)(void);
     67 	int (*read)(int *valp);
     68 	int (*cmsg)(int type, int verbosity_level, char *fmt, ...);
     69 
     70 	void (*refresh)(void);
     71 	void (*reset)(void);
     72 	void (*file_name)(char *name);
     73 	void (*total_time)(int tt);
     74 	void (*current_time)(int ct);
     75 
     76 	void (*note)(int v);
     77 	void (*master_volume)(int mv);
     78 	void (*program)(int channel, int val); /* val<0 means drum set -val */
     79 	void (*volume)(int channel, int val);
     80 	void (*expression)(int channel, int val);
     81 	void (*panning)(int channel, int val);
     82 	void (*sustain)(int channel, int val);
     83 	void (*pitch_bend)(int channel, int val);
     84 
     85 } ControlMode;
     86 
     87 extern ControlMode *ctl_list[], *ctl; 
     88 const int TIMIDITY_ERROR_MAX_CHARS = 1024;
     89 extern char timidity_error[];