Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/sound
File: sfnt_info.h
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef __SOUND_SFNT_INFO_H
[1] Fix | Delete
#define __SOUND_SFNT_INFO_H
[2] Fix | Delete
[3] Fix | Delete
/*
[4] Fix | Delete
* Patch record compatible with AWE driver on OSS
[5] Fix | Delete
*
[6] Fix | Delete
* Copyright (C) 1999-2000 Takashi Iwai
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
#include <sound/asound.h>
[10] Fix | Delete
[11] Fix | Delete
/*
[12] Fix | Delete
* patch information record
[13] Fix | Delete
*/
[14] Fix | Delete
[15] Fix | Delete
#ifdef SNDRV_BIG_ENDIAN
[16] Fix | Delete
#define SNDRV_OSS_PATCHKEY(id) (0xfd00|id)
[17] Fix | Delete
#else
[18] Fix | Delete
#define SNDRV_OSS_PATCHKEY(id) ((id<<8)|0xfd)
[19] Fix | Delete
#endif
[20] Fix | Delete
[21] Fix | Delete
/* patch interface header: 16 bytes */
[22] Fix | Delete
struct soundfont_patch_info {
[23] Fix | Delete
unsigned short key; /* use the key below */
[24] Fix | Delete
#define SNDRV_OSS_SOUNDFONT_PATCH SNDRV_OSS_PATCHKEY(0x07)
[25] Fix | Delete
[26] Fix | Delete
short device_no; /* synthesizer number */
[27] Fix | Delete
unsigned short sf_id; /* file id (should be zero) */
[28] Fix | Delete
short optarg; /* optional argument */
[29] Fix | Delete
int len; /* data length (without this header) */
[30] Fix | Delete
[31] Fix | Delete
short type; /* patch operation type */
[32] Fix | Delete
#define SNDRV_SFNT_LOAD_INFO 0 /* awe_voice_rec */
[33] Fix | Delete
#define SNDRV_SFNT_LOAD_DATA 1 /* awe_sample_info */
[34] Fix | Delete
#define SNDRV_SFNT_OPEN_PATCH 2 /* awe_open_parm */
[35] Fix | Delete
#define SNDRV_SFNT_CLOSE_PATCH 3 /* none */
[36] Fix | Delete
/* 4 is obsolete */
[37] Fix | Delete
#define SNDRV_SFNT_REPLACE_DATA 5 /* awe_sample_info (optarg=#channels)*/
[38] Fix | Delete
#define SNDRV_SFNT_MAP_PRESET 6 /* awe_voice_map */
[39] Fix | Delete
/* 7 is not used */
[40] Fix | Delete
#define SNDRV_SFNT_PROBE_DATA 8 /* optarg=sample */
[41] Fix | Delete
#define SNDRV_SFNT_REMOVE_INFO 9 /* optarg=(bank<<8)|instr */
[42] Fix | Delete
[43] Fix | Delete
short reserved; /* word alignment data */
[44] Fix | Delete
[45] Fix | Delete
/* the actual patch data begins after this */
[46] Fix | Delete
};
[47] Fix | Delete
[48] Fix | Delete
[49] Fix | Delete
/*
[50] Fix | Delete
* open patch
[51] Fix | Delete
*/
[52] Fix | Delete
[53] Fix | Delete
#define SNDRV_SFNT_PATCH_NAME_LEN 32
[54] Fix | Delete
[55] Fix | Delete
struct soundfont_open_parm {
[56] Fix | Delete
unsigned short type; /* sample type */
[57] Fix | Delete
#define SNDRV_SFNT_PAT_TYPE_MISC 0
[58] Fix | Delete
#define SNDRV_SFNT_PAT_TYPE_GUS 6
[59] Fix | Delete
#define SNDRV_SFNT_PAT_TYPE_MAP 7
[60] Fix | Delete
#define SNDRV_SFNT_PAT_LOCKED 0x100 /* lock the samples */
[61] Fix | Delete
#define SNDRV_SFNT_PAT_SHARED 0x200 /* sample is shared */
[62] Fix | Delete
[63] Fix | Delete
short reserved;
[64] Fix | Delete
char name[SNDRV_SFNT_PATCH_NAME_LEN];
[65] Fix | Delete
};
[66] Fix | Delete
[67] Fix | Delete
[68] Fix | Delete
/*
[69] Fix | Delete
* raw voice information record
[70] Fix | Delete
*/
[71] Fix | Delete
[72] Fix | Delete
/* wave table envelope & effect parameters to control EMU8000 */
[73] Fix | Delete
struct soundfont_voice_parm {
[74] Fix | Delete
unsigned short moddelay; /* modulation delay (0x8000) */
[75] Fix | Delete
unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */
[76] Fix | Delete
unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */
[77] Fix | Delete
unsigned short modrelease; /* modulation release time (0x807f) */
[78] Fix | Delete
short modkeyhold, modkeydecay; /* envelope change per key (not used) */
[79] Fix | Delete
unsigned short voldelay; /* volume delay (0x8000) */
[80] Fix | Delete
unsigned short volatkhld; /* volume attack & hold time (0x7f7f) */
[81] Fix | Delete
unsigned short voldcysus; /* volume decay & sustain (0x7f7f) */
[82] Fix | Delete
unsigned short volrelease; /* volume release time (0x807f) */
[83] Fix | Delete
short volkeyhold, volkeydecay; /* envelope change per key (not used) */
[84] Fix | Delete
unsigned short lfo1delay; /* LFO1 delay (0x8000) */
[85] Fix | Delete
unsigned short lfo2delay; /* LFO2 delay (0x8000) */
[86] Fix | Delete
unsigned short pefe; /* modulation pitch & cutoff (0x0000) */
[87] Fix | Delete
unsigned short fmmod; /* LFO1 pitch & cutoff (0x0000) */
[88] Fix | Delete
unsigned short tremfrq; /* LFO1 volume & freq (0x0000) */
[89] Fix | Delete
unsigned short fm2frq2; /* LFO2 pitch & freq (0x0000) */
[90] Fix | Delete
unsigned char cutoff; /* initial cutoff (0xff) */
[91] Fix | Delete
unsigned char filterQ; /* initial filter Q [0-15] (0x0) */
[92] Fix | Delete
unsigned char chorus; /* chorus send (0x00) */
[93] Fix | Delete
unsigned char reverb; /* reverb send (0x00) */
[94] Fix | Delete
unsigned short reserved[4]; /* not used */
[95] Fix | Delete
};
[96] Fix | Delete
[97] Fix | Delete
[98] Fix | Delete
/* wave table parameters: 92 bytes */
[99] Fix | Delete
struct soundfont_voice_info {
[100] Fix | Delete
unsigned short sf_id; /* file id (should be zero) */
[101] Fix | Delete
unsigned short sample; /* sample id */
[102] Fix | Delete
int start, end; /* sample offset correction */
[103] Fix | Delete
int loopstart, loopend; /* loop offset correction */
[104] Fix | Delete
short rate_offset; /* sample rate pitch offset */
[105] Fix | Delete
unsigned short mode; /* sample mode */
[106] Fix | Delete
#define SNDRV_SFNT_MODE_ROMSOUND 0x8000
[107] Fix | Delete
#define SNDRV_SFNT_MODE_STEREO 1
[108] Fix | Delete
#define SNDRV_SFNT_MODE_LOOPING 2
[109] Fix | Delete
#define SNDRV_SFNT_MODE_NORELEASE 4 /* obsolete */
[110] Fix | Delete
#define SNDRV_SFNT_MODE_INIT_PARM 8
[111] Fix | Delete
[112] Fix | Delete
short root; /* midi root key */
[113] Fix | Delete
short tune; /* pitch tuning (in cents) */
[114] Fix | Delete
unsigned char low, high; /* key note range */
[115] Fix | Delete
unsigned char vellow, velhigh; /* velocity range */
[116] Fix | Delete
signed char fixkey, fixvel; /* fixed key, velocity */
[117] Fix | Delete
signed char pan, fixpan; /* panning, fixed panning */
[118] Fix | Delete
short exclusiveClass; /* exclusive class (0 = none) */
[119] Fix | Delete
unsigned char amplitude; /* sample volume (127 max) */
[120] Fix | Delete
unsigned char attenuation; /* attenuation (0.375dB) */
[121] Fix | Delete
short scaleTuning; /* pitch scale tuning(%), normally 100 */
[122] Fix | Delete
struct soundfont_voice_parm parm; /* voice envelope parameters */
[123] Fix | Delete
unsigned short sample_mode; /* sample mode_flag (set by driver) */
[124] Fix | Delete
};
[125] Fix | Delete
[126] Fix | Delete
[127] Fix | Delete
/* instrument info header: 4 bytes */
[128] Fix | Delete
struct soundfont_voice_rec_hdr {
[129] Fix | Delete
unsigned char bank; /* midi bank number */
[130] Fix | Delete
unsigned char instr; /* midi preset number */
[131] Fix | Delete
char nvoices; /* number of voices */
[132] Fix | Delete
char write_mode; /* write mode; normally 0 */
[133] Fix | Delete
#define SNDRV_SFNT_WR_APPEND 0 /* append anyway */
[134] Fix | Delete
#define SNDRV_SFNT_WR_EXCLUSIVE 1 /* skip if already exists */
[135] Fix | Delete
#define SNDRV_SFNT_WR_REPLACE 2 /* replace if already exists */
[136] Fix | Delete
};
[137] Fix | Delete
[138] Fix | Delete
[139] Fix | Delete
/*
[140] Fix | Delete
* sample wave information
[141] Fix | Delete
*/
[142] Fix | Delete
[143] Fix | Delete
/* wave table sample header: 32 bytes */
[144] Fix | Delete
struct soundfont_sample_info {
[145] Fix | Delete
unsigned short sf_id; /* file id (should be zero) */
[146] Fix | Delete
unsigned short sample; /* sample id */
[147] Fix | Delete
int start, end; /* start & end offset */
[148] Fix | Delete
int loopstart, loopend; /* loop start & end offset */
[149] Fix | Delete
int size; /* size (0 = ROM) */
[150] Fix | Delete
short dummy; /* not used */
[151] Fix | Delete
unsigned short mode_flags; /* mode flags */
[152] Fix | Delete
#define SNDRV_SFNT_SAMPLE_8BITS 1 /* wave data is 8bits */
[153] Fix | Delete
#define SNDRV_SFNT_SAMPLE_UNSIGNED 2 /* wave data is unsigned */
[154] Fix | Delete
#define SNDRV_SFNT_SAMPLE_NO_BLANK 4 /* no blank loop is attached */
[155] Fix | Delete
#define SNDRV_SFNT_SAMPLE_SINGLESHOT 8 /* single-shot w/o loop */
[156] Fix | Delete
#define SNDRV_SFNT_SAMPLE_BIDIR_LOOP 16 /* bidirectional looping */
[157] Fix | Delete
#define SNDRV_SFNT_SAMPLE_STEREO_LEFT 32 /* stereo left sound */
[158] Fix | Delete
#define SNDRV_SFNT_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */
[159] Fix | Delete
#define SNDRV_SFNT_SAMPLE_REVERSE_LOOP 128 /* reverse looping */
[160] Fix | Delete
unsigned int truesize; /* used memory size (set by driver) */
[161] Fix | Delete
};
[162] Fix | Delete
[163] Fix | Delete
[164] Fix | Delete
/*
[165] Fix | Delete
* voice preset mapping (aliasing)
[166] Fix | Delete
*/
[167] Fix | Delete
[168] Fix | Delete
struct soundfont_voice_map {
[169] Fix | Delete
int map_bank, map_instr, map_key; /* key = -1 means all keys */
[170] Fix | Delete
int src_bank, src_instr, src_key;
[171] Fix | Delete
};
[172] Fix | Delete
[173] Fix | Delete
[174] Fix | Delete
/*
[175] Fix | Delete
* ioctls for hwdep
[176] Fix | Delete
*/
[177] Fix | Delete
[178] Fix | Delete
#define SNDRV_EMUX_HWDEP_NAME "Emux WaveTable"
[179] Fix | Delete
[180] Fix | Delete
#define SNDRV_EMUX_VERSION ((1 << 16) | (0 << 8) | 0) /* 1.0.0 */
[181] Fix | Delete
[182] Fix | Delete
struct snd_emux_misc_mode {
[183] Fix | Delete
int port; /* -1 = all */
[184] Fix | Delete
int mode;
[185] Fix | Delete
int value;
[186] Fix | Delete
int value2; /* reserved */
[187] Fix | Delete
};
[188] Fix | Delete
[189] Fix | Delete
#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int)
[190] Fix | Delete
#define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info)
[191] Fix | Delete
#define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82)
[192] Fix | Delete
#define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83)
[193] Fix | Delete
#define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int)
[194] Fix | Delete
#define SNDRV_EMUX_IOCTL_MISC_MODE _IOWR('H', 0x84, struct snd_emux_misc_mode)
[195] Fix | Delete
[196] Fix | Delete
#endif /* __SOUND_SFNT_INFO_H */
[197] Fix | Delete
[198] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function