/* Copyright (C) 1996 Byron Stanoszek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * **************************************************************************/ /* pcm.h */ /************************************************************************** * Sound Driver v1.3a1 Data Controls * **************************************************************************/ /* maintainence & operation settings */ #define WV_RESET 0x00 /* update sound driver */ #define WV_MAINVOLUME 0x01 /* primary volume, 1 byte argument. defualt 75 */ #define WV_SCSELECT_OFF 0x04 /* Off: changes tune at current volume */ #define WV_SCSELECT_ON 0x05 /* On: scales volume down before changing tune */ #define WV_INPUT_OFF 0x06 /* Off: turns synthesizer input off */ #define WV_INPUT_ON 0x07 /* On: turns input back on */ #define WV_DEFAULT 0x0F /* reset tune's settings to default */ /* soundcard speed control */ #define WV_SPEED 0x10 /* new speed. 1 byte argument in KHz */ #define WV_SCALE 0x11 /* gradually increases or decreases the speed of the tune, when it repeats, to new speed value in 1 byte argument; spd(hex)= 12 to 1E */ #define WV_4410 0x12 /* 4410 Hz */ #define WV_8820 0x13 /* 8820 Hz */ #define WV_11025 0x14 /* 11025 Hz */ #define WV_13230 0x15 /* 13230 Hz */ #define WV_15435 0x16 /* 15435 Hz */ #define WV_17640 0x17 /* 17640 Hz */ #define WV_22050 0x18 /* 22050 Hz */ #define WV_26460 0x19 /* 26460 Hz */ #define WV_30870 0x1A /* 30870 Hz */ #define WV_35280 0x1B /* 35280 Hz */ #define WV_39690 0x1C /* 39690 Hz */ #define WV_44100 0x1D /* 44100 Hz */ #define WV_48510 0x1E /* 48510 Hz */ #define WV_NORMAL 0x1F /* set speed from tune's default */ /* tune reading controls */ #define WV_SELECT 0x20 /* select new tune. 2 byte argument */ #define WV_PREV 0x21 /* select previous tune in list. */ #define WV_NEXT 0x22 /* select next tune in list. */ #define WV_OFF 0x23 /* selects tune #0 (blank). */ #define WV_REPEATOFF 0x24 /* turn repeat mode off. */ #define WV_REPEATON 0x25 /* turn repeat mode on. */ #define WV_REPEATFULL 0x26 /* set repeat to beginning of tune. */ #define WV_REPEATMIDDLE 0x27 /* set repeats at the repeat point to beginning */ #define WV_REPEATNUM 0x28 /* repeat only a number of times. 1 argument */ #define WV_REPEATINF 0x29 /* repeat infinitely (Default) */ #define WV_MIDWAY 0x2A /* restarts tune from repeat point. */ #define WV_RESTART 0x2B /* force start entire tune over. */ #define WV_REPEATEXIT 0x2C /* like REPEATMIDDLE, but exits at repeat */ /* songs within songs */ #define WV_ALLOC 0x30 /* play a subsong. 2 byte new tune */ #define WV_ALLOCFX 0x31 /* play 2 byte subsong, wait until finish */ #define WV_FADEFX 0x32 /* play 2 byte subsong, wait, then fade in old */ #define WV_HALFFX 0x33 /* play 2 byte subsong, stop at repeat mark */ #define WV_HALFFXSPEED 0x34 /* same as HALFFX, however 3rd byte used to set speed of new tune; spd(hex) = 12 - 1E */ #define WV_ALLOCMIX 0x35 /* play 1 byte lib effect in with foreground */ #define WV_FREE 0x38 /* exit subsong and return to old. */ /* volume control */ #define WV_VOLUME 0x40 /* selects volume 0-50. 1 byte argument */ #define WV_VOLOFF 0x44 /* selects volume 0 with/without scale */ #define WV_VOLDOWN 0x45 /* selects volume 10 with/without scale */ #define WV_VOLSOFT 0x46 /* selects volume 38 with/without scale */ #define WV_VOLMAX 0x47 /* selects volume 50 with/without scale */ #define WV_VOLSCALE 0x48 /* scales volume to new amount. 1 byte argument */ #define WV_VOLSPEED 0x49 /* speed of volume scaling. 1 byte argument: 0=slowest, 255=fastest */ #define WV_SCALEOFF 0x4A /* turns volume changing scaling off */ #define WV_SCALEON 0x4B /* turns volume scaling back on (default) */ /* audio output wait controls; these suppress further data commands */ #define WV_POST 0xF0 /* skip all music in output buffer */ #define WV_SYNC 0xF8 /* wait until all current output drains. */ #define WV_WAIT 0xF9 /* sleep code. 1 byte duration; # seconds */ #define WV_FINISH 0xFF /* suppress until whole song has been played. */