File: map.c

package info (click to toggle)
sox 12.16-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,180 kB
  • ctags: 1,466
  • sloc: ansic: 16,658; sh: 2,071; makefile: 126
file content (67 lines) | stat: -rw-r--r-- 1,507 bytes parent folder | download | duplicates (2)
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

/*
 * July 5, 1991
 * Copyright 1991 Lance Norskog And Sundry Contributors
 * This source code is freely redistributable and may be used for
 * any purpose.  This copyright notice must be maintained. 
 * Lance Norskog And Sundry Contributors are not responsible for 
 * the consequences of using this software.
 */

/*
 * Sound Tools Map effect file.
 *
 * Print out map of sound file instrument specifications.
 */

#include <math.h>
#include "st.h"

/*
 * Process options
 */
void map_getopts(effp, n, argv) 
eff_t effp;
int n;
char **argv;
{
	if (n)
		fail("Map effect takes no options.");
}

/*
 * Prepare processing.
 */
void map_start(effp)
eff_t effp;
{
	int i;

	fprintf(stderr, "Loop info:\n");
	for(i = 0; i < 8; i++) {
		fprintf(stderr, "Loop %d: start:  %6d",i,effp->loops[i].start);
		fprintf(stderr, " length: %6d", effp->loops[i].length);
		fprintf(stderr, " count: %6d", effp->loops[i].count);
		fprintf(stderr, " type:  ");
		switch(effp->loops[i].type) {
			case 0: fprintf(stderr, "off\n"); break;
			case 1: fprintf(stderr, "forward\n"); break;
			case 2: fprintf(stderr, "forward/backward\n"); break;
		}
	}
	fprintf(stderr, "MIDI note: %d\n", effp->instr.MIDInote);
	fprintf(stderr, "MIDI low : %d\n", effp->instr.MIDIlow);
	fprintf(stderr, "MIDI hi  : %d\n", effp->instr.MIDIhi);
}

/*
 * Processed signed long samples from ibuf to obuf.
 * Return number of samples processed.
 */

void map_flow(effp, ibuf, obuf, isamp, osamp)
eff_t effp;
LONG *ibuf, *obuf;
int *isamp, *osamp;
{
}