synth_if.m revision 158979
1158979Snetchild#- 2158979Snetchild# (c) 2003 Mathew Kanner 3158979Snetchild# 4158979Snetchild# Redistribution and use in source and binary forms, with or without 5158979Snetchild# modification, are permitted provided that the following conditions are 6158979Snetchild# met: 1. Redistributions of source code must retain the above copyright 7158979Snetchild# notice, this list of conditions and the following disclaimer. 2. 8158979Snetchild# Redistributions in binary form must reproduce the above copyright notice, 9158979Snetchild# this list of conditions and the following disclaimer in the documentation 10158979Snetchild# and/or other materials provided with the distribution. 11158979Snetchild# 12158979Snetchild# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY 13158979Snetchild# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 14158979Snetchild# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 15158979Snetchild# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 16158979Snetchild# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17158979Snetchild# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 18158979Snetchild# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 19158979Snetchild# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20158979Snetchild# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21158979Snetchild# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22158979Snetchild# SUCH DAMAGE. 23158979Snetchild# 24158979Snetchild# $FreeBSD: head/sys/dev/sound/midi/synth_if.m 158979 2006-05-27 16:32:05Z netchild $ 25158979Snetchild# 26158979Snetchild 27158979SnetchildINTERFACE synth; 28158979Snetchild 29158979Snetchild#include <sys/systm.h> 30158979Snetchild 31158979SnetchildCODE { 32158979Snetchild 33158979Snetchildsynth_killnote_t nokillnote; 34158979Snetchildsynth_startnote_t nostartnote; 35158979Snetchildsynth_setinstr_t nosetinstr; 36158979Snetchildsynth_hwcontrol_t nohwcontrol; 37158979Snetchildsynth_aftertouch_t noaftertouch; 38158979Snetchildsynth_panning_t nopanning; 39158979Snetchildsynth_controller_t nocontroller; 40158979Snetchildsynth_volumemethod_t novolumemethod; 41158979Snetchildsynth_bender_t nobender; 42158979Snetchildsynth_setupvoice_t nosetupvoice; 43158979Snetchildsynth_sendsysex_t nosendsysex; 44158979Snetchildsynth_allocvoice_t noallocvoice; 45158979Snetchildsynth_writeraw_t nowriteraw; 46158979Snetchildsynth_reset_t noreset; 47158979Snetchildsynth_shortname_t noshortname; 48158979Snetchildsynth_open_t noopen; 49158979Snetchildsynth_close_t noclose; 50158979Snetchildsynth_query_t noquery; 51158979Snetchildsynth_insync_t noinsync; 52158979Snetchildsynth_alloc_t noalloc; 53158979Snetchild 54158979Snetchild int 55158979Snetchild nokillnote(void *_kobj, uint8_t _chn, uint8_t _note, uint8_t _vel) 56158979Snetchild { 57158979Snetchild printf("nokillnote\n"); 58158979Snetchild return 0; 59158979Snetchild } 60158979Snetchild 61158979Snetchild int 62158979Snetchild noopen(void *_kobj, void *_arg, int mode) 63158979Snetchild { 64158979Snetchild printf("noopen\n"); 65158979Snetchild return 0; 66158979Snetchild } 67158979Snetchild 68158979Snetchild int 69158979Snetchild noquery(void *_kboj) 70158979Snetchild { 71158979Snetchild printf("noquery\n"); 72158979Snetchild return 0; 73158979Snetchild } 74158979Snetchild 75158979Snetchild int 76158979Snetchild nostartnote(void *_kb, uint8_t _voice, uint8_t _note, uint8_t _parm) 77158979Snetchild { 78158979Snetchild printf("nostartnote\n"); 79158979Snetchild return 0; 80158979Snetchild } 81158979Snetchild 82158979Snetchild int 83158979Snetchild nosetinstr(void *_kb, uint8_t _chn, uint16_t _patchno) 84158979Snetchild { 85158979Snetchild printf("nosetinstr\n"); 86158979Snetchild return 0; 87158979Snetchild } 88158979Snetchild 89158979Snetchild int 90158979Snetchild nohwcontrol(void *_kb, uint8_t *_event) 91158979Snetchild { 92158979Snetchild printf("nohwcontrol\n"); 93158979Snetchild return 0; 94158979Snetchild } 95158979Snetchild 96158979Snetchild int 97158979Snetchild noaftertouch ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2) 98158979Snetchild { 99158979Snetchild printf("noaftertouch\n"); 100158979Snetchild return 0; 101158979Snetchild } 102158979Snetchild 103158979Snetchild int 104158979Snetchild nopanning ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2) 105158979Snetchild { 106158979Snetchild printf("nopanning\n"); 107158979Snetchild return 0; 108158979Snetchild } 109158979Snetchild 110158979Snetchild int 111158979Snetchild nocontroller ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2, uint16_t _x3) 112158979Snetchild { 113158979Snetchild printf("nocontroller\n"); 114158979Snetchild return 0; 115158979Snetchild } 116158979Snetchild 117158979Snetchild int 118158979Snetchild novolumemethod ( 119158979Snetchild void /* X */ * _kobj, 120158979Snetchild uint8_t _x1) 121158979Snetchild { 122158979Snetchild printf("novolumemethod\n"); 123158979Snetchild return 0; 124158979Snetchild } 125158979Snetchild 126158979Snetchild int 127158979Snetchild nobender ( void /* X */ * _kobj, uint8_t _voice, uint16_t _bend) 128158979Snetchild { 129158979Snetchild printf("nobender\n"); 130158979Snetchild return 0; 131158979Snetchild } 132158979Snetchild 133158979Snetchild int 134158979Snetchild nosetupvoice ( void /* X */ * _kobj, uint8_t _voice, uint8_t _chn) 135158979Snetchild { 136158979Snetchild 137158979Snetchild printf("nosetupvoice\n"); 138158979Snetchild return 0; 139158979Snetchild } 140158979Snetchild 141158979Snetchild int 142158979Snetchild nosendsysex ( void /* X */ * _kobj, void * _buf, size_t _len) 143158979Snetchild { 144158979Snetchild printf("nosendsysex\n"); 145158979Snetchild return 0; 146158979Snetchild } 147158979Snetchild 148158979Snetchild int 149158979Snetchild noallocvoice ( void /* X */ * _kobj, uint8_t _chn, uint8_t _note, void *_x) 150158979Snetchild { 151158979Snetchild printf("noallocvoice\n"); 152158979Snetchild return 0; 153158979Snetchild } 154158979Snetchild 155158979Snetchild int 156158979Snetchild nowriteraw ( void /* X */ * _kobjt, uint8_t * _buf, size_t _len) 157158979Snetchild { 158158979Snetchild printf("nowriteraw\n"); 159158979Snetchild return 1; 160158979Snetchild } 161158979Snetchild 162158979Snetchild int 163158979Snetchild noreset ( void /* X */ * _kobjt) 164158979Snetchild { 165158979Snetchild 166158979Snetchild printf("noreset\n"); 167158979Snetchild return 0; 168158979Snetchild } 169158979Snetchild 170158979Snetchild char * 171158979Snetchild noshortname (void /* X */ * _kobjt) 172158979Snetchild { 173158979Snetchild printf("noshortname\n"); 174158979Snetchild return "noshortname"; 175158979Snetchild } 176158979Snetchild 177158979Snetchild int 178158979Snetchild noclose ( void /* X */ * _kobjt) 179158979Snetchild { 180158979Snetchild 181158979Snetchild printf("noclose\n"); 182158979Snetchild return 0; 183158979Snetchild } 184158979Snetchild 185158979Snetchild int 186158979Snetchild noinsync (void /* X */ * _kobjt) 187158979Snetchild { 188158979Snetchild 189158979Snetchild printf("noinsync\n"); 190158979Snetchild return 0; 191158979Snetchild } 192158979Snetchild 193158979Snetchild int 194158979Snetchild noalloc ( void /* x */ * _kbojt, uint8_t _chn, uint8_t _note) 195158979Snetchild { 196158979Snetchild printf("noalloc\n"); 197158979Snetchild return 0; 198158979Snetchild } 199158979Snetchild} 200158979Snetchild 201158979SnetchildMETHOD int killnote { 202158979Snetchild void /* X */ * _kobj; 203158979Snetchild uint8_t _chan; 204158979Snetchild uint8_t _note; 205158979Snetchild uint8_t _vel; 206158979Snetchild} DEFAULT nokillnote; 207158979Snetchild 208158979SnetchildMETHOD int startnote { 209158979Snetchild void /* X */ * _kobj; 210158979Snetchild uint8_t _voice; 211158979Snetchild uint8_t _note; 212158979Snetchild uint8_t _parm; 213158979Snetchild} DEFAULT nostartnote; 214158979Snetchild 215158979SnetchildMETHOD int setinstr { 216158979Snetchild void /* X */ * _kobj; 217158979Snetchild uint8_t _chn; 218158979Snetchild uint16_t _patchno; 219158979Snetchild} DEFAULT nosetinstr; 220158979Snetchild 221158979SnetchildMETHOD int hwcontrol { 222158979Snetchild void /* X */ * _kobj; 223158979Snetchild uint8_t *_event; 224158979Snetchild} DEFAULT nohwcontrol; 225158979Snetchild 226158979SnetchildMETHOD int aftertouch { 227158979Snetchild void /* X */ * _kobj; 228158979Snetchild uint8_t _x1; 229158979Snetchild uint8_t _x2; 230158979Snetchild} DEFAULT noaftertouch; 231158979Snetchild 232158979SnetchildMETHOD int panning { 233158979Snetchild void /* X */ * _kobj; 234158979Snetchild uint8_t _x1; 235158979Snetchild uint8_t _x2; 236158979Snetchild} DEFAULT nopanning; 237158979Snetchild 238158979SnetchildMETHOD int controller { 239158979Snetchild void /* X */ * _kobj; 240158979Snetchild uint8_t _x1; 241158979Snetchild uint8_t _x2; 242158979Snetchild uint16_t _x3; 243158979Snetchild} DEFAULT nocontroller; 244158979Snetchild 245158979SnetchildMETHOD int volumemethod { 246158979Snetchild void /* X */ * _kobj; 247158979Snetchild uint8_t _x1; 248158979Snetchild} DEFAULT novolumemethod; 249158979Snetchild 250158979SnetchildMETHOD int bender { 251158979Snetchild void /* X */ * _kobj; 252158979Snetchild uint8_t _voice; 253158979Snetchild uint16_t _bend; 254158979Snetchild} DEFAULT nobender; 255158979Snetchild 256158979SnetchildMETHOD int setupvoice { 257158979Snetchild void /* X */ * _kobj; 258158979Snetchild uint8_t _voice; 259158979Snetchild uint8_t _chn; 260158979Snetchild} DEFAULT nosetupvoice; 261158979Snetchild 262158979SnetchildMETHOD int sendsysex { 263158979Snetchild void /* X */ * _kobj; 264158979Snetchild void * _buf; 265158979Snetchild size_t _len; 266158979Snetchild} DEFAULT nosendsysex; 267158979Snetchild 268158979SnetchildMETHOD int allocvoice { 269158979Snetchild void /* X */ * _kobj; 270158979Snetchild uint8_t _chn; 271158979Snetchild uint8_t _note; 272158979Snetchild void *_x; 273158979Snetchild} DEFAULT noallocvoice; 274158979Snetchild 275158979SnetchildMETHOD int writeraw { 276158979Snetchild void /* X */ * _kobjt; 277158979Snetchild uint8_t * _buf; 278158979Snetchild size_t _len; 279158979Snetchild} DEFAULT nowriteraw; 280158979Snetchild 281158979SnetchildMETHOD int reset { 282158979Snetchild void /* X */ * _kobjt; 283158979Snetchild} DEFAULT noreset; 284158979Snetchild 285158979SnetchildMETHOD char * shortname { 286158979Snetchild void /* X */ * _kobjt; 287158979Snetchild} DEFAULT noshortname; 288158979Snetchild 289158979SnetchildMETHOD int open { 290158979Snetchild void /* X */ * _kobjt; 291158979Snetchild void * _sythn; 292158979Snetchild int _mode; 293158979Snetchild} DEFAULT noopen; 294158979Snetchild 295158979SnetchildMETHOD int close { 296158979Snetchild void /* X */ * _kobjt; 297158979Snetchild} DEFAULT noclose; 298158979Snetchild 299158979SnetchildMETHOD int query { 300158979Snetchild void /* X */ * _kobjt; 301158979Snetchild} DEFAULT noquery; 302158979Snetchild 303158979SnetchildMETHOD int insync { 304158979Snetchild void /* X */ * _kobjt; 305158979Snetchild} DEFAULT noinsync; 306158979Snetchild 307158979SnetchildMETHOD int alloc { 308158979Snetchild void /* x */ * _kbojt; 309158979Snetchild uint8_t _chn; 310158979Snetchild uint8_t _note; 311158979Snetchild} DEFAULT noalloc; 312