File: ctrlmode.h

package info (click to toggle)
sdl-mixer1.2 1.2.12-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,736 kB
  • sloc: ansic: 18,763; sh: 9,453; objc: 1,482; cpp: 238; csh: 219; makefile: 145
file content (74 lines) | stat: -rw-r--r-- 2,179 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
    TiMidity -- Experimental MIDI to WAVE converter
    Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the Perl Artistic License, available in COPYING.
 */

/* Return values for ControlMode.read */

#define RC_ERROR -1
#define RC_NONE 0
#define RC_QUIT 1
#define RC_NEXT 2
#define RC_PREVIOUS 3 /* Restart this song at beginning, or the previous
			 song if we're less than a second into this one. */
#define RC_FORWARD 4
#define RC_BACK 5
#define RC_JUMP 6
#define RC_TOGGLE_PAUSE 7 /* Pause/continue */
#define RC_RESTART 8 /* Restart song at beginning */

#define RC_PAUSE 9 /* Really pause playing */
#define RC_CONTINUE 10 /* Continue if paused */
#define RC_REALLY_PREVIOUS 11 /* Really go to the previous song */
#define RC_CHANGE_VOLUME 12
#define RC_LOAD_FILE 13		/* Load a new midifile */
#define RC_TUNE_END 14		/* The tune is over, play it again sam? */

#define CMSG_INFO	0
#define CMSG_WARNING	1
#define CMSG_ERROR	2
#define CMSG_FATAL	3
#define CMSG_TRACE	4
#define CMSG_TIME	5
#define CMSG_TOTAL	6
#define CMSG_FILE	7
#define CMSG_TEXT	8

#define VERB_NORMAL	0
#define VERB_VERBOSE	1
#define VERB_NOISY	2
#define VERB_DEBUG	3
#define VERB_DEBUG_SILLY	4

typedef struct {
  char *id_name, id_character;
  int verbosity, trace_playing, opened;

  int (*open)(int using_stdin, int using_stdout);
  void (*pass_playing_list)(int number_of_files, char *list_of_files[]);
  void (*close)(void);
  int (*read)(int32 *valp);
  int (*cmsg)(int type, int verbosity_level, char *fmt, ...);

  void (*refresh)(void);
  void (*reset)(void);
  void (*file_name)(char *name);
  void (*total_time)(int tt);
  void (*current_time)(int ct);

  void (*note)(int v);
  void (*master_volume)(int mv);
  void (*program)(int channel, int val); /* val<0 means drum set -val */
  void (*volume)(int channel, int val);
  void (*expression)(int channel, int val);
  void (*panning)(int channel, int val);
  void (*sustain)(int channel, int val);
  void (*pitch_bend)(int channel, int val);
  
} ControlMode;

extern ControlMode *ctl_list[], *ctl; 
extern char timidity_error[];