1
2 /*
3 * Diverse Bristol audio routines.
4 * Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2012
5 *
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22 /*
23 * Library routines for operator management. Initialisation, creation and
24 * destruction of operator.s
25 */
26
27 #include "bristol.h"
28
bristolParamPrint(bristolOPParam * param)29 int bristolParamPrint(bristolOPParam *param)
30 {
31 #ifdef DEBUG
32 printf("bristolParamPrint(0x%08x)\n", param);
33 #endif
34
35 printf(" name %s\n", param->pname);
36 printf(" desc %s\n", param->description);
37 printf(" type %i\n", param->type);
38 printf(" low %i\n", param->low);
39 printf(" high %i\n", param->high);
40 printf(" flags %i\n", param->flags);
41
42 return(0);
43 }
44
bristolIOprint(bristolOPIO * io)45 int bristolIOprint(bristolOPIO *io)
46 {
47 #ifdef DEBUG
48 printf("bristolIOprint(0x%08x)\n", io);
49 #endif
50
51 printf(" name %s\n", io->ioname);
52 printf(" desc %s\n", io->description);
53 printf(" rate %i\n", io->samplerate);
54 printf(" count %i\n", io->samplecount);
55 printf(" flags %x\n", io->flags);
56 printf(" buf %p\n", io->buf);
57
58 return(0);
59 }
60
bristolSpecPrint(bristolOPSpec * specs)61 int bristolSpecPrint(bristolOPSpec *specs)
62 {
63 int i;
64
65 #ifdef DEBUG
66 printf("bristolSpecPrint(0x%08x)\n", specs);
67 #endif
68
69 printf(" name %s\n", specs->opname);
70 printf(" desc %s\n", specs->description);
71 printf(" pcount %i\n", specs->pcount);
72 printf(" param %p\n", specs->param);
73 printf(" iocount %i\n", specs->iocount);
74 printf(" io %p\n", specs->io);
75 printf(" lclsize %i\n", specs->localsize);
76
77 for (i = 0; i < specs->iocount; i++)
78 bristolIOprint(&specs->io[i]);
79
80 for (i = 0; i < specs->pcount; i++)
81 bristolParamPrint(&specs->param[i]);
82
83 return(0);
84 }
85
86 int
bristolOPprint(bristolOP * operator)87 bristolOPprint(bristolOP *operator)
88 {
89 #ifdef DEBUG
90 printf("bristolOPprint(0x%08x)\n", operator);
91 #endif
92
93 printf(" index %i\n", operator->index);
94 printf(" flags %i\n", operator->flags);
95 printf(" next %p\n", operator->next);
96 printf(" last %p\n", operator->last);
97 printf(" spec %p\n", operator->specs);
98 printf(" size %i\n", operator->size);
99 printf(" init %p\n", operator->init);
100 printf(" dest %p\n", operator->destroy);
101 printf(" reset %p\n", operator->reset);
102 printf(" param %p\n", operator->param);
103 printf(" operate %p\n", operator->operate);
104
105 bristolSpecPrint(operator->specs);
106
107 return(0);
108 }
109
110