📄 ctaweapi.h
字号:
/****************************************************************************\
* *
* CTAWEAPI.H SB AWE32 DOS API header *
* *
* (C) Copyright Creative Technology Ltd. 1992-94. All rights reserved *
* worldwide. *
* *
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY *
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE *
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR *
* PURPOSE. *
* *
* You have a royalty-free right to use, modify, reproduce and *
* distribute the Sample Files (and/or any modified version) in *
* any way you find useful, provided that you agree to *
* the Creative's Software Licensing Aggreement and you also agree that *
* Creative has no warranty obligations or liability for any Sample Files. *
* *
\****************************************************************************/
/****************************************************************************\
* File name : CTAWEAPI.H *
* *
* Programmer : Creative SB AWE32 Team *
* Creative Technology Ltd, 1994. All rights reserved. *
* *
* Version : 2.50b *
* *
\****************************************************************************/
#ifndef _CTAWEAPI
#define _CTAWEAPI
#pragma pack(1)
#define MAXBANKS 64 /* maximum number of banks */
#define MAXNRPN 32 /* maximum number of NRPN */
#if defined(__FLAT__) || defined(__HIGHC__) || defined(DOS386) || defined(__NDPC__)
#if defined(FAROBJ) && !defined(__NDPC__)
#ifdef __HIGHC__
#define _FAR_ _Far
#else
#define _FAR_ _far
#endif
#else
#define _FAR_
#endif
#define PACKETSIZE 8192 /* packet size for 32bit libraries */
#else
#define PACKETSIZE 512 /* packet size for real mode libraries */
#endif
#if defined(__NDPC__)
#define _PASCAL_
#endif
#if defined(__HIGHC__)
#pragma Push_align_members(1)
#pragma Global_aliasing_convention("_%r")
#define _PASCAL_ _DCC((_DEFAULT_CALLING_CONVENTION|_CALLEE_POPS_STACK) & \
~ (_REVERSE_PARMS|_OVERLOADED))
#endif
#ifdef __WATCOMC__
/* pragma to tell the compiler to put all data elements into CODE segment. */
#ifdef _DATA_IN_CODE
#pragma data_seg("_CODE", "");
#endif
#endif
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
#ifndef _FAR_
#define _FAR_ _far
#endif
#ifndef _PASCAL_
#define _PASCAL_ _pascal
#endif
#if defined(__cplusplus)
extern "C" {
#endif
/* Start of modules */
extern int* __midieng_code(void);
extern int* __sysex_code(void);
extern int* __sfhelp1_code(void);
extern int* __sfhelp2_code(void);
extern int* __sbkload_code(void);
extern int* __wavload_code(void);
extern int* __hardware_code(void);
extern int* __nrpn_code(void);
extern int* __c3da_code(void);
extern int __midivar_data;
extern int __nrpnvar_data;
extern int __embed_data;
#ifdef FAROBJ
typedef char SCRATCH[692];
#else
typedef char SCRATCH[552];
#endif
typedef char SOUNDFONT[134];
typedef char GCHANNEL[20];
typedef char MIDICHANNEL[30];
typedef char NRPNCHANNEL[90];
typedef struct {
WORD bank_no; /* Slot number being used */
WORD total_banks; /* Total number of banks */
long _FAR_* banksizes; /* Pointer to a list of bank sizes */
long reserved; /* Unused */
char _FAR_* data; /* Address of buffer of size >= PACKETSIZE */
char _FAR_* presets; /* Allocated memory for preset data */
long total_patch_ram; /* Total patch ram available */
WORD no_sample_packets; /* Number of packets of sound sample to stream */
long sample_seek; /* Start file location of sound sample */
long preset_seek; /* Address of preset_seek location */
long preset_read_size; /* Number of bytes from preset_seek to allocate and read */
long preset_size; /* Preset actual size */
} SOUND_PACKET;
#ifdef NEW_WP
typedef struct {
WORD tag; /* Must be 0x200 */
WORD preset_size; /* Preset table of this size is required */
WORD no_wave_packets; /* Number of packets of Wave sample to stream. */
WORD bank_no; /* bank number */
char FAR* data; /* Address of packet of size PACKETSIZE */
char FAR* presets; /* Allocated memory for preset data */
LONG sample_size; /* Sample size, i.e. number of samples */
LONG samples_per_sec; /* Samples per second */
WORD bits_per_sample; /* Bits per sample, 8 or 16 */
WORD no_channels; /* Number of channels, 1=mono, 2=stereo */
WORD looping; /* Looping? 0=no, 1=yes */
LONG startloop; /* if looping, then these are the addresses */
LONG endloop;
WORD reserved1;
WORD patch_no; /* all values follow that of NRPNs */
SHORT delayLfo1; /* not documented yet */
SHORT freqLfo1;
SHORT delayLfo2;
SHORT freqLfo2;
SHORT delayEnv1;
SHORT attackEnv1;
SHORT holdEnv1;
SHORT decayEnv;
SHORT sustainEnv1;
SHORT releaseEnv1;
SHORT delayEnv2;
SHORT attackEnv2;
SHORT holdEnv2;
SHORT decayEnv;
SHORT sustainEnv2;
SHORT releaseEnv2;
SHORT initialPitch;
SHORT lfo1ToPitch;
SHORT lfo2ToPitch;
SHORT env1ToPitch;
SHORT lfo1ToVolume;
SHORT initialFilterFc;
SHORT initialFilterQ;
SHORT lfo1ToFilterFc;
SHORT env1ToFilterFc;
SHORT chorusSend;
SHORT reverbSend;
SHORT panSend;
SHORT coarseTune;
SHORT fineTune;
} WAVE_PACKET;
#else
typedef struct {
WORD tag; /* Must be 0x100 or 0x101 */
WORD preset_size; /* Preset table of this size is required */
WORD no_wave_packets; /* Number of packets of Wave sample to stream. */
WORD bank_no; /* Bank number */
char _FAR_* data; /* Address of packet of size PACKETSIZE */
char _FAR_* presets; /* Allocated memory for preset data */
long sample_size; /* Sample size, i.e. number of samples */
long samples_per_sec; /* Samples per second */
WORD bits_per_sample; /* Bits per sample, 8 or 16 */
WORD no_channels; /* Number of channels, 1=mono, 2=stereo */
WORD looping; /* Looping? 0=no, 1=yes */
long startloop; /* If looping, then these are the addresses */
long endloop;
WORD release; /* Release time, 0=24ms, 8191=23.78s */
} WAVE_PACKET;
#endif
typedef struct {
BYTE _FAR_* SPad1;
BYTE _FAR_* SPad2;
BYTE _FAR_* SPad3;
BYTE _FAR_* SPad4;
BYTE _FAR_* SPad5;
BYTE _FAR_* SPad6;
BYTE _FAR_* SPad7;
} SOUNDPAD;
#define c3daSTART 0
#define c3daSTOP 1
#define c3daPAUSE 2
#define c3daSUCCESS 0
#define c3daFAILURE 1
typedef int c3daError;
typedef int c3daSoundState;
typedef struct {
unsigned magic;
int id;
int sound_state;
unsigned bank; /* MIDI bank, program, & note no. */
unsigned program;
unsigned note;
int x; /* x position relative to receiver */
int y; /* y position relative to receiver */
int z; /* z position relative to receiver */
char data[92];
} c3daEmitter;
typedef struct {
unsigned magic;
int x; /* current x position (absolute) */
int y; /* current y position (absolute) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -