----------------------------------------
-- Microsoft DirectX Ada Binding Lib --
-- File : xact3.ads --
-- Translator:Dongfeng.Gu,2018/11/05 --
-- Mail: 515639@qq.com --
-- Progress:100% --
----------------------------------------
with win32; use win32;
with win32.rpcdce;
with win32.Winerror; use win32.Winerror;
with win32.winbase;
with win32.windef; use win32.windef;
with win32.winnt; use win32.winnt;
with win32.objbase; use win32.objbase;
with win32.crt.Limits; use win32.crt.Limits;
with Interfaces.C;
with XAudio2; use XAudio2;
with xact3wb; use xact3wb;
package xact3 is
subtype HRESULT is win32.objbase.HRESULT;
CLSID_XACTEngine:constant win32.rpcdce.GUID:=(16#074b110f#,16#7f58#,16#4743#,(16#ae#,16#a5#,16#12#,16#f1#,16#5b#,16#50#,16#74#,16#ed#));
CLSID_XACTAuditionEngine:constant win32.rpcdce.GUID:=(16#3e96e3f2#,16#ce27#,16#41b1#,(16#ba#,16#f0#,16#15#,16#77#,16#8c#,16#d0#,16#d8#,16#1a#));
CLSID_XACTDebugEngine:constant win32.rpcdce.GUID:=(16#41573416#,16#af5b#,16#4877#,(16#a2#,16#80#,16#29#,16#a0#,16#36#,16#1e#,16#f2#,16#1b#));
IID_IXACT3Engine:constant win32.rpcdce.GUID:=(16#b1ee676a#,16#d9cd#,16#4d2a#,(16#89#,16#a8#,16#fa#,16#53#,16#eb#,16#9e#,16#48#,16#0b#));
type IXACT3SoundBank;
type LPIXACT3SoundBank is access all IXACT3SoundBank;
type LPLPIXACT3SoundBank is access all LPIXACT3SoundBank;
subtype LPXACT3SoundBank is LPIXACT3SoundBank;
subtype LPLPXACT3SoundBank is LPLPIXACT3SoundBank;
type IXACT3WaveBank;
type LPIXACT3WaveBank is access all IXACT3WaveBank;
type LPLPIXACT3WaveBank is access all LPIXACT3WaveBank;
subtype LPXACT3WaveBank is LPIXACT3WaveBank;
subtype LPLPXACT3WaveBank is LPLPIXACT3WaveBank;
type IXACT3Cue;
type LPIXACT3Cue is access all IXACT3Cue;
type LPLPIXACT3Cue is access all LPIXACT3Cue;
subtype LPXACT3Cue is LPIXACT3Cue;
subtype LPLPXACT3Cue is LPLPIXACT3Cue;
type IXACT3Wave;
type LPIXACT3Wave is access all IXACT3Wave;
type LPLPIXACT3Wave is access all LPIXACT3Wave;
subtype LPXACT3Wave is LPIXACT3Wave;
subtype LPLPXACT3Wave is LPLPIXACT3Wave;
type IXACT3Engine;
type LPIXACT3Engine is access all IXACT3Engine;
type LPLPIXACT3Engine is access all LPIXACT3Engine;
subtype LPXACT3Engine is LPIXACT3Engine;
subtype LPLPXACT3Engine is LPLPIXACT3Engine;
type XACT_NOTIFICATION;
type LPXACT_NOTIFICATION is access all XACT_NOTIFICATION;
type LPCXACT_NOTIFICATION is access constant XACT_NOTIFICATION;
subtype XACTINDEX is WORD;
type LPXACTINDEX is access all XACTINDEX;
subtype XACTNOTIFICATIONTYPE is BYTE;
subtype XACTVARIABLEVALUE is FLOAT;
type LPXACTVARIABLEVALUE is access all XACTVARIABLEVALUE;
subtype XACTVARIABLEINDEX is WORD;
subtype XACTCATEGORY is WORD;
subtype XACTCHANNEL is BYTE;
subtype XACTVOLUME is FLOAT;
subtype XACTTIME is LONG;
subtype XACTPITCH is SHORT;
subtype XACTLOOPCOUNT is BYTE;
subtype XACTVARIATIONWEIGHT is BYTE;
subtype XACTPRIORITY is BYTE;
subtype XACTINSTANCELIMIT is BYTE;
WAVE_FORMAT_IEEE_FLOAT : constant := 16#0003#;
WAVE_FORMAT_EXTENSIBLE : constant := 16#FFFE#;
type tWAVEFORMATEX is record
wFormatTag: WORD;
nChannels: WORD;
nSamplesPerSec: DWORD;
nAvgBytesPerSec: DWORD;
nBlockAlign: WORD;
wBitsPerSample: WORD;
cbSize: WORD;
end record with Alignment=>1;
subtype WAVEFORMATEX is tWAVEFORMATEX;
type LPWAVEFORMATEX is access all tWAVEFORMATEX;
subtype PWAVEFORMATEX is LPWAVEFORMATEX;
type WAVEFORMATEXTENSIBLE_Samples(i:Integer:=0) is record
case i is
when 0=>
wValidBitsPerSample: WORD;
when 1=>
wSamplesPerBlock: WORD;
when others=>
wReserved: WORD;
end case;
end record with Unchecked_Union,size=>16;
type WAVEFORMATEXTENSIBLE is record
Format: WAVEFORMATEX;
Samples:WAVEFORMATEXTENSIBLE_Samples;
dwChannelMask: DWORD;
SubFormat: rpcdce.GUID;
end record with Alignment=>1;
type LPWAVEFORMATEXTENSIBLE is access all WAVEFORMATEXTENSIBLE;
subtype PWAVEFORMATEXTENSIBLE is LPWAVEFORMATEXTENSIBLE;
XACT_CUE_NAME_LENGTH : constant := 16#FF#;
XACT_CONTENT_VERSION : constant := 46;
FLT_MAX:constant float:=float'Last;
use type Interfaces.C.short;
XACTTIME_MIN :constant XACTTIME:= LONG_MIN;
XACTTIME_MAX :constant XACTTIME:= LONG_MAX; -- 24 days 20:31:23.647
XACTTIME_INFINITE :constant XACTTIME:= LONG_MAX;
XACTINSTANCELIMIT_INFINITE :constant XACTINSTANCELIMIT:= 16#ff#;
XACTINSTANCELIMIT_MIN :constant XACTINSTANCELIMIT:= 16#00#; -- == 1 instance total (0 additional instances)
XACTINSTANCELIMIT_MAX :constant XACTINSTANCELIMIT:= 16#fe#; -- == 255 instances total (254 additional instances)
XACTINDEX_MIN :constant XACTINDEX:= 16#0#;
XACTINDEX_MAX :constant XACTINDEX:= 16#fffe#;
XACTINDEX_INVALID :constant XACTINDEX:= 16#ffff#;
XACTNOTIFICATIONTYPE_MIN :constant XACTNOTIFICATIONTYPE:= 16#00#;
XACTNOTIFICATIONTYPE_MAX :constant XACTNOTIFICATIONTYPE:= 16#ff#;
XACTVARIABLEVALUE_MIN :constant XACTVARIABLEVALUE:= -FLT_MAX;
XACTVARIABLEVALUE_MAX :constant XACTVARIABLEVALUE:= FLT_MAX;
XACTVARIABLEINDEX_MIN :constant XACTVARIABLEINDEX:= 16#0000#;
XACTVARIABLEINDEX_MAX :constant XACTVARIABLEINDEX:= 16#fffe#;
XACTVARIABLEINDEX_INVALID :constant XACTVARIABLEINDEX:= 16#ffff#;
XACTCATEGORY_MIN :constant XACTCATEGORY:= 16#0#;
XACTCATEGORY_MAX :constant XACTCATEGORY:= 16#fffe#;
XACTCATEGORY_INVALID :constant XACTCATEGORY:= 16#ffff#;
XACTCHANNEL_MIN :constant XACTCHANNEL:= 0;
XACTCHANNEL_MAX :constant XACTCHANNEL:= 16#FF#;
XACTPITCH_MIN :constant XACTPITCH:= -1200; -- pitch change allowable per individual content field
XACTPITCH_MAX :constant XACTPITCH:= 1200;
XACTPITCH_MIN_TOTAL :constant XACTPITCH:= -2400; -- total allowable pitch change, use with IXACTWave.SetPitch()
XACTPITCH_MAX_TOTAL :constant XACTPITCH:= 2400;
XACTVOLUME_MIN :constant XACTVOLUME:= 0.0;
XACTVOLUME_MAX :constant XACTVOLUME:= 16777216.0; -- Maximum acceptable volume level (2^24) - matches XAudio2 max volume
XACTPARAMETERVALUE_MIN :constant XACTVARIABLEVALUE:= -FLT_MAX;
XACTPARAMETERVALUE_MAX :constant XACTVARIABLEVALUE:= FLT_MAX;
XACTLOOPCOUNT_MIN :constant XACTLOOPCOUNT:= 16#0#;
XACTLOOPCOUNT_MAX :constant XACTLOOPCOUNT:= 16#fe#;
XACTLOOPCOUNT_INFINITE :constant XACTLOOPCOUNT:= 16#ff#;
XACTWAVEALIGNMENT_MIN :constant DWORD:= 2048;
XACTMAXOUTPUTVOICECOUNT :constant BYTE:= 3;
XACT_FLAG_STOP_RELEASE :constant DWORD:=16#00000000#; -- Stop with release envelope (or as authored), for looping waves this acts as break loop.
XACT_FLAG_STOP_IMMEDIATE :constant DWORD:=16#00000001#; -- Stop immediately
-- -----------------------------------------------------------------------------
-- XACT Manage Data Flag - XACT will manage the lifetime of this data
-- -----------------------------------------------------------------------------
XACT_FLAG_MANAGEDATA :constant DWORD:=16#00000001#;
-- -----------------------------------------------------------------------------
-- XACT Content Preparation Flags
-- -----------------------------------------------------------------------------
XACT_FLAG_BACKGROUND_MUSIC :constant DWORD:=16#00000002#; -- Marks the waves as background music.
XACT_FLAG_UNITS_MS :constant DWORD:=16#00000004#; -- Indicates that the units passed in are in milliseconds.
XACT_FLAG_UNITS_SAMPLES :constant DWORD:=16#00000008#; -- Indicates that the units passed in are in samples.
-- -----------------------------------------------------------------------------
-- XACT State flags
-- -----------------------------------------------------------------------------
XACT_STATE_CREATED :constant DWORD:=16#00000001#; -- Created, but nothing else
XACT_STATE_PREPARING :constant DWORD:=16#00000002#; -- In the middle of preparing
XACT_STATE_PREPARED :constant DWORD:=16#00000004#; -- Prepared, but not yet played
XACT_STATE_PLAYING :constant DWORD:=16#00000008#; -- Playing (though could be paused)
XACT_STATE_STOPPING :constant DWORD:=16#00000010#; -- Stopping
XACT_STATE_STOPPED :constant DWORD:=16#00000020#; -- Stopped
XACT_STATE_PAUSED :constant DWORD:=16#00000040#; -- Paused (Can be combined with some of the other state flags above)
XACT_STATE_INUSE :constant DWORD:=16#00000080#; -- Object is in use (used by wavebanks and soundbanks).
XACT_STATE_PREPAREFAILED :constant DWORD:=16#80000000#; -- Object preparation failed.
XACT_FLAG_GLOBAL_SETTINGS_MANAGEDATA : constant := XACT_FLAG_MANAGEDATA;
type XACT_READFILE_CALLBACK is access function(hFile:HANDLE;lpBuffer:LPVOID;nNumberOfBytesToRead:DWORD;lpNumberOfBytesRead:LPDWORD;lpOverlapped:winbase.LPOVERLAPPED) return BOOL with Convention=>Stdcall;
type XACT_GETOVERLAPPEDRESULT_CALLBACK is access function(hFile:HANDLE;lpOverlapped:winbase.LPOVERLAPPED;lpNumberOfBytesTransferred:LPDWORD;bWait:BOOL) return BOOL with Convention=>Stdcall;
type XACT_FILEIO_CALLBACKS is record
readFileCallback: XACT_READFILE_CALLBACK;
getOverlappedResultCallback: XACT_GETOVERLAPPEDRESULT_CALLBACK;
end record;
type PXACT_FILEIO_CALLBACKS is access all XACT_FILEIO_CALLBACKS;
type PCXACT_FILEIO_CALLBACKS is access constant XACT_FILEIO_CALLBACKS;
type XACT_NOTIFICATION_CALLBACK is access procedure(pNotification:LPXACT_NOTIFICATION) with Convention=>Stdcall;
XACT_RENDERER_ID_LENGTH : constant := 16#ff# ; -- Maximum number of characters allowed in the renderer ID;
XACT_RENDERER_NAME_LENGTH : constant := 16#ff# ; -- Maximum number of characters allowed in the renderer display name.;
type XACT_RENDERER_DETAILS is record
rendererID: WCHAR_Array(0..XACT_RENDERER_ID_LENGTH-1);
displayName: WCHAR_Array(0..XACT_RENDERER_NAME_LENGTH-1);
defaultDevice: BOOL;
end record;
type LPXACT_RENDERER_DETAILS is access all XACT_RENDERER_DETAILS;
XACT_ENGINE_LOOKAHEAD_DEFAULT : constant := 250 ; -- Default look-ahead time of 250ms can be used during XACT engine initialization.;
type XACT_RUNTIME_PARAMETERS is record
lookAheadTime: DWORD;
pGlobalSettingsBuffer:LPvoid;
globalSettingsBufferSize: DWORD;
globalSettingsFlags: DWORD;
globalSettingsAllocAttributes: DWORD;
fileIOCallbacks: XACT_FILEIO_CALLBACKS;
fnNotificationCallback: XACT_NOTIFICATION_CALLBACK;
pRendererID: PWSTR;
pXAudio2:LPIXAudio2;
pMasteringVoice:LPIXAudio2MasteringVoice;
end record;
type LPXACT_RUNTIME_PARAMETERS is access all XACT_RUNTIME_PARAMETERS;
type LPCXACT_RUNTIME_PARAMETERS is access constant XACT_RUNTIME_PARAMETERS;
type XACT_STREAMING_PARAMETERS is record
file: HANDLE;
offset: DWORD;
flags: DWORD;
packetSize: WORD;
end record;
subtype XACT_WAVEBANK_STREAMING_PARAMETERS is XACT_STREAMING_PARAMETERS;
type LPXACT_WAVEBANK_STREAMING_PARAMETERS is access all XACT_STREAMING_PARAMETERS;
type LPXACT_STREAMING_PARAMETERS is access all XACT_STREAMING_PARAMETERS;
type LPCXACT_STREAMING_PARAMETERS is access constant XACT_STREAMING_PARAMETERS;
type LPCXACT_WAVEBANK_STREAMING_PARAMETERS is access constant XACT_WAVEBANK_STREAMING_PARAMETERS;
type XACT_CUE_PROPERTIES is record
friendlyName: CHAR_Array(0..XACT_CUE_NAME_LENGTH-1);
interactive: BOOL;
iaVariableIndex: XACTINDEX;
numVariations: XACTINDEX;
maxInstances: XACTINSTANCELIMIT;
currentInstances: XACTINSTANCELIMIT;
end record;
type LPXACT_CUE_PROPERTIES is access all XACT_CUE_PROPERTIES;
type XACT_TRACK_PROPERTIES is record
duration: XACTTIME;
numVariations: XACTINDEX;
numChannels: XACTCHANNEL;
waveVariation: XACTINDEX;
loopCount: XACTLOOPCOUNT;
end record;
type XACT_TRACK_PROPERTIES_Array IS array (Natural range<>) of XACT_TRACK_PROPERTIES;
type LPXACT_TRACK_PROPERTIES is access all XACT_TRACK_PROPERTIES;
type XACT_VARIATION_PROPERTIES is record
index: XACTINDEX;
weight: XACTVARIATIONWEIGHT;
iaVariableMin: XACTVARIABLEVALUE;
iaVariableMax: XACTVARIABLEVALUE;
linger: BOOL;
end record;
type LPXACT_VARIATION_PROPERTIES is access all XACT_VARIATION_PROPERTIES;
type XACT_SOUND_PROPERTIES is record
category: XACTCATEGORY;
priority: BYTE;
pitch: XACTPITCH;
volume: XACTVOLUME;
numTracks: XACTINDEX;
arrTrackProperties: XACT_TRACK_PROPERTIES_Array(0..1-1);
end record;
type LPXACT_SOUND_PROPERTIES is access all XACT_SOUND_PROPERTIES;
type XACT_SOUND_VARIATION_PROPERTIES is record
variationProperties: XACT_VARIATION_PROPERTIES;
soundProperties: XACT_SOUND_PROPERTIES;
end record;
type LPXACT_SOUND_VARIATION_PROPERTIES is access all XACT_SOUND_VARIATION_PROPERTIES;
type XACT_CUE_INSTANCE_PROPERTIES is record
allocAttributes: DWORD;
cueProperties: XACT_CUE_PROPERTIES;
activeVariationProperties: XACT_SOUND_VARIATION_PROPERTIES;
end record;
type LPXACT_CUE_INSTANCE_PROPERTIES is access all XACT_CUE_INSTANCE_PROPERTIES;
type LPLPXACT_CUE_INSTANCE_PROPERTIES is access all LPXACT_CUE_INSTANCE_PROPERTIES;
type XACT_WAVE_PROPERTIES is record
friendlyName: char_Array(0..64-1);
format: WAVEBANKMINIWAVEFORMAT;
durationInSamples: DWORD;
loopRegion: WAVEBANKSAMPLEREGION;
streaming: BOOL;
end record;
type LPXACT_WAVE_PROPERTIES is access all XACT_WAVE_PROPERTIES;
type LPCXACT_WAVE_PROPERTIES is access constant XACT_WAVE_PROPERTIES;
type XACT_WAVE_INSTANCE_PROPERTIES is record
properties: XACT_WAVE_PROPERTIES;
backgroundMusic: BOOL;
end record;
type LPXACT_WAVE_INSTANCE_PROPERTIES is access all XACT_WAVE_INSTANCE_PROPERTIES;
type LPCXACT_WAVE_INSTANCE_PROPERTIES is access constant XACT_WAVE_INSTANCE_PROPERTIES;
type XACTCHANNELMAPENTRY is record
InputChannel: XACTCHANNEL;
OutputChannel: XACTCHANNEL;
Volume: XACTVOLUME;
end record;
type LPXACTCHANNELMAPENTRY is access all XACTCHANNELMAPENTRY;
type LPCXACTCHANNELMAPENTRY is access constant XACTCHANNELMAPENTRY;
type XACTCHANNELMAP is record
EntryCount: XACTCHANNEL;
paEntries:LPXACTCHANNELMAPENTRY;
end record;
type LPXACTCHANNELMAP is access all XACTCHANNELMAP;
type LPCXACTCHANNELMAP is access constant XACTCHANNELMAP;
type XACTCHANNELVOLUMEENTRY is record
EntryIndex: XACTCHANNEL;
Volume: XACTVOLUME;
end record;
type LPXACTCHANNELVOLUMEENTRY is access all XACTCHANNELVOLUMEENTRY;
type LPCXACTCHANNELVOLUMEENTRY is access constant XACTCHANNELVOLUMEENTRY;
type XACTCHANNELVOLUME is record
EntryCount: XACTCHANNEL;
paEntries:LPXACTCHANNELVOLUMEENTRY;
end record;
type LPXACTCHANNELVOLUME is access all XACTCHANNELVOLUME;
type LPCXACTCHANNELVOLUME is access constant XACTCHANNELVOLUME;
type XACT_NOTIFICATION_DESCRIPTION is record
typ: XACTNOTIFICATIONTYPE;
flags: BYTE;
pSoundBank:LPIXACT3SoundBank;
pWaveBank:LPIXACT3WaveBank;
pCue:LPIXACT3Cue;
pWave:LPIXACT3Wave;
cueIndex: XACTINDEX;
waveIndex: XACTINDEX;
pvContext: PVOID;
end record;
type LPXACT_NOTIFICATION_DESCRIPTION is access all XACT_NOTIFICATION_DESCRIPTION;
type LPCXACT_NOTIFICATION_DESCRIPTION is access constant XACT_NOTIFICATION_DESCRIPTION;
type XACT_NOTIFICATION_CUE is record
cueIndex: XACTINDEX;
pSoundBank:LPIXACT3SoundBank;
pCue:LPIXACT3Cue;
end record;
type LPXACT_NOTIFICATION_CUE is access all XACT_NOTIFICATION_CUE;
type LPCXACT_NOTIFICATION_CUE is access constant XACT_NOTIFICATION_CUE;
type XACT_NOTIFICATION_MARKER is record
cueIndex: XACTINDEX;
pSoundBank:LPIXACT3SoundBank;
pCue:LPIXACT3Cue;
marker: DWORD;
end record;
type LPXACT_NOTIFICATION_MARKER is access all XACT_NOTIFICATION_MARKER;
type LPCXACT_NOTIFICATION_MARKER is access constant XACT_NOTIFICATION_MARKER;
type XACT_NOTIFICATION_SOUNDBANK is record
pSoundBank:LPIXACT3SoundBank;
end record;
type LPXACT_NOTIFICATION_SOUNDBANK is access all XACT_NOTIFICATION_SOUNDBANK;
type LPCXACT_NOTIFICATION_SOUNDBANK is access constant XACT_NOTIFICATION_SOUNDBANK;
type XACT_NOTIFICATION_WAVEBANK is record
pWaveBank:LPIXACT3WaveBank;
end record;
type LPXACT_NOTIFICATION_WAVEBANK is access all XACT_NOTIFICATION_WAVEBANK;
type LPCXACT_NOTIFICATION_WAVEBANK is access constant XACT_NOTIFICATION_WAVEBANK;
type XACT_NOTIFICATION_VARIABLE is record
cueIndex: XACTINDEX;
pSoundBank:LPIXACT3SoundBank;
pCue:LPIXACT3Cue;
variableIndex: XACTVARIABLEINDEX;
variableValue: XACTVARIABLEVALUE;
local: BOOL;
end record;
type LPXACT_NOTIFICATION_VARIABLE is access all XACT_NOTIFICATION_VARIABLE;
type LPCXACT_NOTIFICATION_VARIABLE is access constant XACT_NOTIFICATION_VARIABLE;
type XACT_NOTIFICATION_GUI is record
reserved: DWORD;
end record;
type LPXACT_NOTIFICATION_GUI is access all XACT_NOTIFICATION_GUI;
type LPCXACT_NOTIFICATION_GUI is access constant XACT_NOTIFICATION_GUI;
type XACT_NOTIFICATION_WAVE is record
pWaveBank:LPIXACT3WaveBank;
waveIndex: XACTINDEX;
cueIndex: XACTINDEX;
pSoundBank:LPIXACT3SoundBank;
pCue:LPIXACT3Cue;
pWave:LPIXACT3Wave;
end record;
type LPXACT_NOTIFICATION_WAVE is access all XACT_NOTIFICATION_WAVE;
type LPCXACT_NOTIFICATION_WAVE is access constant XACT_NOTIFICATION_WAVE;
type XACT_NOTIFICATION(i:Integer:=0) is record
typ:XACTNOTIFICATIONTYPE;
timeStamp:LONG;
pvContext:PVOID;
case i is
when 0=>
cue:XACT_NOTIFICATION_CUE;
when 1=>
marker:XACT_NOTIFICATION_MARKER;
when 2=>
soundBank:XACT_NOTIFICATION_SOUNDBANK;
when 3=>
waveBank:XACT_NOTIFICATION_WAVEBANK;
when 4=>
variable:XACT_NOTIFICATION_VARIABLE;
when 5=>
gui:XACT_NOTIFICATION_GUI;
when others=>
wave:XACT_NOTIFICATION_WAVE;
end case;
end record with Unchecked_Union;
XACT_FLAG_SOUNDBANK_STOP_IMMEDIATE : constant := XACT_FLAG_STOP_IMMEDIATE;
XACT_SOUNDBANKSTATE_INUSE : constant := XACT_STATE_INUSE;
function IXACT3SoundBank_GetCueIndex(pSoundBank:LPIXACT3SoundBank;szFriendlyName:PCSTR) return XACTINDEX with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_GetCueIndex";
function IXACT3SoundBank_GetNumCues(pSoundBank:LPIXACT3SoundBank;pnNumCues:LPXACTINDEX) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_GetNumCues";
function IXACT3SoundBank_GetCueProperties(pSoundBank:LPIXACT3SoundBank;nCueIndex:XACTINDEX;pProperties:LPXACT_CUE_PROPERTIES) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_GetCueProperties";
function IXACT3SoundBank_Prepare(pSoundBank:LPIXACT3SoundBank;nCueIndex:XACTINDEX;dwFlags:DWORD;timeOffset:XACTTIME;ppCue:LPLPIXACT3Cue) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_Prepare";
function IXACT3SoundBank_Play(pSoundBank:LPIXACT3SoundBank;nCueIndex:XACTINDEX;dwFlags:DWORD;timeOffset:XACTTIME;ppCue:LPLPIXACT3Cue) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_Play";
function IXACT3SoundBank_Stop(pSoundBank:LPIXACT3SoundBank;nCueIndex:XACTINDEX;dwFlags:DWORD) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_Stop";
function IXACT3SoundBank_Destroy(pSoundBank:LPIXACT3SoundBank) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_Destroy";
function IXACT3SoundBank_GetState(pSoundBank:LPIXACT3SoundBank;pdwState:LPDWORD) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3SoundBank_GetState";
type IXACT3SoundBank is record
GetCueIndex:access function(THIS:LPIXACT3SoundBank;szFriendlyName:PCSTR) return XACTINDEX with Convention=>Stdcall;
GetNumCues:access function(THIS:LPIXACT3SoundBank;pnNumCues:LPXACTINDEX) return objbase.HRESULT with Convention=>Stdcall;
GetCueProperties:access function(THIS:LPIXACT3SoundBank;nCueIndex:XACTINDEX;pProperties:LPXACT_CUE_PROPERTIES) return objbase.HRESULT with Convention=>Stdcall;
Prepare:access function(THIS:LPIXACT3SoundBank;nCueIndex:XACTINDEX;dwFlags:DWORD;timeOffset:XACTTIME;ppCue:LPLPIXACT3Cue) return objbase.HRESULT with Convention=>Stdcall;
Play:access function(THIS:LPIXACT3SoundBank;nCueIndex:XACTINDEX;dwFlags:DWORD;timeOffset:XACTTIME;ppCue:LPLPIXACT3Cue) return objbase.HRESULT with Convention=>Stdcall;
Stop:access function(THIS:LPIXACT3SoundBank;nCueIndex:XACTINDEX;dwFlags:DWORD) return objbase.HRESULT with Convention=>Stdcall;
Destroy:access function(THIS:LPIXACT3SoundBank) return objbase.HRESULT with Convention=>Stdcall;
GetState:access function(THIS:LPIXACT3SoundBank;pdwState:LPDWORD) return objbase.HRESULT with Convention=>Stdcall;
end record;
XACT_WAVEBANKSTATE_INUSE : constant := XACT_STATE_INUSE ; -- Currently in-use;
XACT_WAVEBANKSTATE_PREPARED : constant := XACT_STATE_PREPARED ; -- Prepared;
XACT_WAVEBANKSTATE_PREPAREFAILED : constant := XACT_STATE_PREPAREFAILED; -- Prepare failed.;
function IXACT3WaveBank_Destroy(pWaveBank:LPIXACT3WaveBank) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_Destroy";
function IXACT3WaveBank_GetState(pWaveBank:LPIXACT3WaveBank;pdwState:LPDWORD) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_GetState";
function IXACT3WaveBank_GetNumWaves(pWaveBank:LPIXACT3WaveBank;pnNumWaves:LPXACTINDEX) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_GetNumWaves";
function IXACT3WaveBank_GetWaveIndex(pWaveBank:LPIXACT3WaveBank;szFriendlyName:PCSTR) return XACTINDEX with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_GetWaveIndex";
function IXACT3WaveBank_GetWaveProperties(pWaveBank:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;pWaveProperties:LPXACT_WAVE_PROPERTIES) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_GetWaveProperties";
function IXACT3WaveBank_Prepare(pWaveBank:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;dwFlags:DWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_Prepare";
function IXACT3WaveBank_Play(pWaveBank:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;dwFlags:DWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_Play";
function IXACT3WaveBank_Stop(pWaveBank:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;dwFlags:DWORD) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3WaveBank_Stop";
type IXACT3WaveBank is record
Destroy:access function(THIS:LPIXACT3WaveBank) return objbase.HRESULT with Convention=>Stdcall;
GetNumWaves:access function(THIS:LPIXACT3WaveBank;pnNumWaves:LPXACTINDEX) return objbase.HRESULT with Convention=>Stdcall;
GetWaveIndex:access function(THIS:LPIXACT3WaveBank;szFriendlyName:PCSTR) return XACTINDEX with Convention=>Stdcall;
GetWaveProperties:access function(THIS:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;pWaveProperties:LPXACT_WAVE_PROPERTIES) return objbase.HRESULT with Convention=>Stdcall;
Prepare:access function(THIS:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;dwFlags:DWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return objbase.HRESULT with Convention=>Stdcall;
Play:access function(THIS:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;dwFlags:DWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return objbase.HRESULT with Convention=>Stdcall;
Stop:access function(THIS:LPIXACT3WaveBank;nWaveIndex:XACTINDEX;dwFlags:DWORD) return objbase.HRESULT with Convention=>Stdcall;
GetState:access function(THIS:LPIXACT3WaveBank;pdwState:LPDWORD) return objbase.HRESULT with Convention=>Stdcall;
end record;
function IXACT3Wave_Destroy(pWave:LPIXACT3Wave) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_Destroy";
function IXACT3Wave_Play(pWave:LPIXACT3Wave) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_Play";
function IXACT3Wave_Stop(pWave:LPIXACT3Wave;dwFlags:DWORD) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_Stop";
function IXACT3Wave_Pause(pWave:LPIXACT3Wave;fPause:BOOL) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_Pause";
function IXACT3Wave_GetState(pWave:LPIXACT3Wave;pdwState:LPDWORD) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_GetState";
function IXACT3Wave_SetPitch(pWave:LPIXACT3Wave;pitch:XACTPITCH) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_SetPitch";
function IXACT3Wave_SetVolume(pWave:LPIXACT3Wave;volume:XACTVOLUME) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_SetVolume";
function IXACT3Wave_SetMatrixCoefficients(pWave:LPIXACT3Wave;uSrcChannelCount:UINT32;uDstChannelCount:UINT32;pMatrixCoefficients:LPfloat) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_SetMatrixCoefficients";
function IXACT3Wave_GetProperties(pWave:LPIXACT3Wave;pProperties:LPXACT_WAVE_INSTANCE_PROPERTIES) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Wave_GetProperties";
type IXACT3Wave is record
Destroy:access function(THIS:LPIXACT3Wave) return objbase.HRESULT with Convention=>Stdcall;
Play:access function(THIS:LPIXACT3Wave) return objbase.HRESULT with Convention=>Stdcall;
Stop:access function(THIS:LPIXACT3Wave;dwFlags:DWORD) return objbase.HRESULT with Convention=>Stdcall;
Pause:access function(THIS:LPIXACT3Wave;fPause:BOOL) return objbase.HRESULT with Convention=>Stdcall;
GetState:access function(THIS:LPIXACT3Wave;pdwState:LPDWORD) return objbase.HRESULT with Convention=>Stdcall;
SetPitch:access function(THIS:LPIXACT3Wave;pitch:XACTPITCH) return objbase.HRESULT with Convention=>Stdcall;
SetVolume:access function(THIS:LPIXACT3Wave;volume:XACTVOLUME) return objbase.HRESULT with Convention=>Stdcall;
SetMatrixCoefficients:access function(THIS:LPIXACT3Wave;uSrcChannelCount:UINT32;uDstChannelCount:UINT32;pMatrixCoefficients:LPfloat) return objbase.HRESULT with Convention=>Stdcall;
GetProperties:access function(THIS:LPIXACT3Wave;pProperties:LPXACT_WAVE_INSTANCE_PROPERTIES) return objbase.HRESULT with Convention=>Stdcall;
end record;
XACT_FLAG_CUE_STOP_RELEASE : constant := XACT_FLAG_STOP_RELEASE;
XACT_FLAG_CUE_STOP_IMMEDIATE : constant := XACT_FLAG_STOP_IMMEDIATE;
XACT_CUESTATE_CREATED : constant := XACT_STATE_CREATED ; -- Created, but nothing else;
XACT_CUESTATE_PREPARING : constant := XACT_STATE_PREPARING ; -- In the middle of preparing;
XACT_CUESTATE_PREPARED : constant := XACT_STATE_PREPARED; -- Prepared, but not yet played;
XACT_CUESTATE_PLAYING : constant := XACT_STATE_PLAYING ; -- Playing (though could be paused);
XACT_CUESTATE_STOPPING : constant := XACT_STATE_STOPPING; -- Stopping;
XACT_CUESTATE_STOPPED : constant := XACT_STATE_STOPPED ; -- Stopped;
XACT_CUESTATE_PAUSED : constant := XACT_STATE_PAUSED ; -- Paused (can be combined with other states);
function IXACT3Cue_Destroy(pCue:LPIXACT3Cue) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_Destroy";
function IXACT3Cue_Play(pCue:LPIXACT3Cue) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_Play";
function IXACT3Cue_Stop(pCue:LPIXACT3Cue;dwFlags:DWORD) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_Stop";
function IXACT3Cue_GetState(pCue:LPIXACT3Cue;pdwState:LPDWORD) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_GetState";
function IXACT3Cue_SetMatrixCoefficients(pCue:LPIXACT3Cue;uSrcChannelCount:UINT32;uDstChannelCount:UINT32;pMatrixCoefficients:LPfloat) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_SetMatrixCoefficients";
function IXACT3Cue_GetVariableIndex(pCue:LPIXACT3Cue;szFriendlyName:PCSTR) return XACTVARIABLEINDEX with Import,Convention=>stdcall,external_name=>"IXACT3Cue_GetVariableIndex";
function IXACT3Cue_SetVariable(pCue:LPIXACT3Cue;nIndex:XACTVARIABLEINDEX;nValue:XACTVARIABLEVALUE) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_SetVariable";
function IXACT3Cue_GetVariable(pCue:LPIXACT3Cue;nIndex:XACTVARIABLEINDEX;nValue:LPXACTVARIABLEVALUE) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_GetVariable";
function IXACT3Cue_Pause(pCue:LPIXACT3Cue;fPause:BOOL) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_Pause";
function IXACT3Cue_GetProperties(pCue:LPIXACT3Cue;ppProperties:LPLPXACT_CUE_INSTANCE_PROPERTIES) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_GetProperties";
function IXACT3Cue_SetOutputVoices(pCue:LPIXACT3Cue;pSendList:LPCXAUDIO2_VOICE_SENDS) return objbase.HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_SetOutputVoices";
function IXACT3Cue_SetOutputVoiceMatrix(pCue:LPIXACT3Cue;pDestinationVoice:LPIXAudio2Voice;SourceChannels:UINT32;DestinationChannels:UINT32;pLevelMatrix:LPCFLOAT) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Cue_SetOutputVoiceMatrix";
type IXACT3Cue is record
Play:access function(THIS:LPIXACT3Cue) return objbase.HRESULT with Convention=>Stdcall;
Stop:access function(THIS:LPIXACT3Cue;dwFlags:DWORD) return objbase.HRESULT with Convention=>Stdcall;
GetState:access function(THIS:LPIXACT3Cue;pdwState:LPDWORD) return objbase.HRESULT with Convention=>Stdcall;
Destroy:access function(THIS:LPIXACT3Cue) return objbase.HRESULT with Convention=>Stdcall;
SetMatrixCoefficients:access function(THIS:LPIXACT3Cue;uSrcChannelCount:UINT32;uDstChannelCount:UINT32;pMatrixCoefficients:LPfloat) return objbase.HRESULT with Convention=>Stdcall;
GetVariableIndex:access function(THIS:LPIXACT3Cue;szFriendlyName:PCSTR) return XACTVARIABLEINDEX with Convention=>Stdcall;
SetVariable:access function(THIS:LPIXACT3Cue;nIndex:XACTVARIABLEINDEX;nValue:XACTVARIABLEVALUE) return objbase.HRESULT with Convention=>Stdcall;
GetVariable:access function(THIS:LPIXACT3Cue;nIndex:XACTVARIABLEINDEX;nValue:LPXACTVARIABLEVALUE) return objbase.HRESULT with Convention=>Stdcall;
Pause:access function(THIS:LPIXACT3Cue;fPause:BOOL) return objbase.HRESULT with Convention=>Stdcall;
GetProperties:access function(THIS:LPIXACT3Cue;ppProperties:LPLPXACT_CUE_INSTANCE_PROPERTIES) return objbase.HRESULT with Convention=>Stdcall;
SetOutputVoices:access function(THIS:LPIXACT3Cue;pSendList:LPCXAUDIO2_VOICE_SENDS) return objbase.HRESULT with Convention=>Stdcall;
SetOutputVoiceMatrix:access function(THIS:LPIXACT3Cue;pDestinationVoice:LPIXAudio2Voice;SourceChannels:UINT32;DestinationChannels:UINT32;pLevelMatrix:LPCfloat) return objbase.HRESULT with Convention=>Stdcall;
end record;
XACT_FLAG_ENGINE_CREATE_MANAGEDATA : constant := XACT_FLAG_MANAGEDATA;
XACT_FLAG_ENGINE_STOP_IMMEDIATE : constant := XACT_FLAG_STOP_IMMEDIATE;
function IXACT3Engine_AddRef(pEngine:LPIXACT3Engine) return ULONG with Import,Convention=>stdcall,external_name=>"IXACT3Engine_AddRef";
function IXACT3Engine_Release(pEngine:LPIXACT3Engine) return ULONG with Import,Convention=>stdcall,external_name=>"IXACT3Engine_Release";
function IXACT3Engine_GetRendererCount(pEngine:LPIXACT3Engine;pnRendererCount:LPXACTINDEX) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_GetRendererCount";
function IXACT3Engine_GetRendererDetails(pEngine:LPIXACT3Engine;nRendererIndex:XACTINDEX;pRendererDetails:LPXACT_RENDERER_DETAILS) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_GetRendererDetails";
function IXACT3Engine_GetFinalMixFormat(pEngine:LPIXACT3Engine;pFinalMixFormat:LPWAVEFORMATEXTENSIBLE) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_GetFinalMixFormat";
function IXACT3Engine_Initialize(pEngine:LPIXACT3Engine;pParams:LPCXACT_RUNTIME_PARAMETERS) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_Initialize";
function IXACT3Engine_ShutDown(pEngine:LPIXACT3Engine) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_ShutDown";
function IXACT3Engine_DoWork(pEngine:LPIXACT3Engine) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_DoWork";
function IXACT3Engine_CreateSoundBank(pEngine:LPIXACT3Engine;pvBuffer:LPCvoid;dwSize:DWORD;dwFlags:DWORD;dwAllocAttributes:DWORD;ppSoundBank:LPLPIXACT3SoundBank) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_CreateSoundBank";
function IXACT3Engine_CreateInMemoryWaveBank(pEngine:LPIXACT3Engine;pvBuffer:LPCvoid;dwSize:DWORD;dwFlags:DWORD;dwAllocAttributes:DWORD;ppWaveBank:LPLPIXACT3WaveBank) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_CreateInMemoryWaveBank";
function IXACT3Engine_CreateStreamingWaveBank(pEngine:LPIXACT3Engine;pParms:LPCXACT_WAVEBANK_STREAMING_PARAMETERS;ppWaveBank:LPLPIXACT3WaveBank) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_CreateStreamingWaveBank";
function IXACT3Engine_PrepareWave(pEngine:LPIXACT3Engine;dwFlags:DWORD;szWavePath:PCSTR;wStreamingPacketSize:WORD;dwAlignment:DWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_PrepareWave";
function IXACT3Engine_PrepareInMemoryWave(pEngine:LPIXACT3Engine;dwFlags:DWORD;entryi:WAVEBANKENTRY;pdwSeekTable:LPDWORD;pbWaveData:LPBYTE;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_PrepareInMemoryWave";
function IXACT3Engine_PrepareStreamingWave(pEngine:LPIXACT3Engine;dwFlags:DWORD;entryi:WAVEBANKENTRY;streamingParams:XACT_STREAMING_PARAMETERS;dwAlignment:DWORD;pdwSeekTable:LPDWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_PrepareStreamingWave";
function IXACT3Engine_RegisterNotification(pEngine:LPIXACT3Engine;pNotificationDesc:LPCXACT_NOTIFICATION_DESCRIPTION) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_RegisterNotification";
function IXACT3Engine_UnRegisterNotification(pEngine:LPIXACT3Engine;pNotificationDesc:LPCXACT_NOTIFICATION_DESCRIPTION) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_UnRegisterNotification";
function IXACT3Engine_GetCategory(pEngine:LPIXACT3Engine;szFriendlyName:PCSTR) return XACTCATEGORY with Import,Convention=>stdcall,external_name=>"IXACT3Engine_GetCategory";
function IXACT3Engine_Stop(pEngine:LPIXACT3Engine;nCategory:XACTCATEGORY;dwFlags:DWORD) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_Stop";
function IXACT3Engine_SetVolume(pEngine:LPIXACT3Engine;nCategory:XACTCATEGORY;nVolume:XACTVOLUME) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_SetVolume";
function IXACT3Engine_Pause(pEngine:LPIXACT3Engine;nCategory:XACTCATEGORY;fPause:BOOL) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_Pause";
function IXACT3Engine_GetGlobalVariableIndex(pEngine:LPIXACT3Engine;szFriendlyName:PCSTR) return XACTVARIABLEINDEX with Import,Convention=>stdcall,external_name=>"IXACT3Engine_GetGlobalVariableIndex";
function IXACT3Engine_SetGlobalVariable(pEngine:LPIXACT3Engine;nIndex:XACTVARIABLEINDEX;nValue:XACTVARIABLEVALUE) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_SetGlobalVariable";
function IXACT3Engine_GetGlobalVariable(pEngine:LPIXACT3Engine;nIndex:XACTVARIABLEINDEX;pnValue:LPXACTVARIABLEVALUE) return HRESULT with Import,Convention=>stdcall,external_name=>"IXACT3Engine_GetGlobalVariable";
type IXACT3Engine is record
QueryInterface:access function(THIS:LPIXACT3Engine;riid:REFIID;ppvObj:LPLPvoid) return HRESULT with Convention=>Stdcall;
AddRef:access function(THIS:LPIXACT3Engine) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPIXACT3Engine) return ULONG with Convention=>Stdcall;
GetRendererCount:access function(THIS:LPIXACT3Engine;pnRendererCount:LPXACTINDEX) return HRESULT with Convention=>Stdcall;
GetRendererDetails:access function(THIS:LPIXACT3Engine;nRendererIndex:XACTINDEX;pRendererDetails:LPXACT_RENDERER_DETAILS) return HRESULT with Convention=>Stdcall;
GetFinalMixFormat:access function(THIS:LPIXACT3Engine;pFinalMixFormat:LPWAVEFORMATEXTENSIBLE) return HRESULT with Convention=>Stdcall;
Initialize:access function(THIS:LPIXACT3Engine;pParams:LPCXACT_RUNTIME_PARAMETERS) return HRESULT with Convention=>Stdcall;
ShutDown:access function(THIS:LPIXACT3Engine) return HRESULT with Convention=>Stdcall;
DoWork:access function(THIS:LPIXACT3Engine) return HRESULT with Convention=>Stdcall;
CreateSoundBank:access function(THIS:LPIXACT3Engine;pvBuffer:LPCvoid;dwSize:DWORD;dwFlags:DWORD;dwAllocAttributes:DWORD;ppSoundBank:LPLPIXACT3SoundBank) return HRESULT with Convention=>Stdcall;
CreateInMemoryWaveBank:access function(THIS:LPIXACT3Engine;pvBuffer:LPCvoid;dwSize:DWORD;dwFlags:DWORD;dwAllocAttributes:DWORD;ppWaveBank:LPLPIXACT3WaveBank) return HRESULT with Convention=>Stdcall;
CreateStreamingWaveBank:access function(THIS:LPIXACT3Engine;pParms:LPCXACT_WAVEBANK_STREAMING_PARAMETERS;ppWaveBank:LPLPIXACT3WaveBank) return HRESULT with Convention=>Stdcall;
PrepareWave:access function(THIS:LPIXACT3Engine;dwFlags:DWORD;szWavePath:PCSTR;wStreamingPacketSize:WORD;dwAlignment:DWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return HRESULT with Convention=>Stdcall;
PrepareInMemoryWave:access function(THIS:LPIXACT3Engine;dwFlags:DWORD;entryi:WAVEBANKENTRY;pdwSeekTable:LPDWORD;pbWaveData:LPBYTE;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return HRESULT with Convention=>Stdcall;
PrepareStreamingWave:access function(THIS:LPIXACT3Engine;dwFlags:DWORD;entryi:WAVEBANKENTRY;streamingParams:XACT_STREAMING_PARAMETERS;dwAlignment:DWORD;pdwSeekTable:LPDWORD;dwPlayOffset:DWORD;nLoopCount:XACTLOOPCOUNT;ppWave:LPLPIXACT3Wave) return HRESULT with Convention=>Stdcall;
RegisterNotification:access function(THIS:LPIXACT3Engine;pNotificationDesc:LPCXACT_NOTIFICATION_DESCRIPTION) return HRESULT with Convention=>Stdcall;
UnRegisterNotification:access function(THIS:LPIXACT3Engine;pNotificationDesc:LPCXACT_NOTIFICATION_DESCRIPTION) return HRESULT with Convention=>Stdcall;
GetCategory:access function(THIS:LPIXACT3Engine;szFriendlyName:PCSTR) return XACTCATEGORY with Convention=>Stdcall;
Stop:access function(THIS:LPIXACT3Engine;nCategory:XACTCATEGORY;dwFlags:DWORD) return HRESULT with Convention=>Stdcall;
SetVolume:access function(THIS:LPIXACT3Engine;nCategory:XACTCATEGORY;nVolume:XACTVOLUME) return HRESULT with Convention=>Stdcall;
Pause:access function(THIS:LPIXACT3Engine;nCategory:XACTCATEGORY;fPause:BOOL) return HRESULT with Convention=>Stdcall;
GetGlobalVariableIndex:access function(THIS:LPIXACT3Engine;szFriendlyName:PCSTR) return XACTVARIABLEINDEX with Convention=>Stdcall;
SetGlobalVariable:access function(THIS:LPIXACT3Engine;nIndex:XACTVARIABLEINDEX;nValue:XACTVARIABLEVALUE) return HRESULT with Convention=>Stdcall;
GetGlobalVariable:access function(THIS:LPIXACT3Engine;nIndex:XACTVARIABLEINDEX;nValue:LPXACTVARIABLEVALUE) return HRESULT with Convention=>Stdcall;
end record;
function XACT3CreateEngine(dwCreationFlags:DWORD;ppEngine:LPLPIXACT3Engine) return HRESULT with Import,Convention=>stdcall,external_name=>"XACT3CreateEngine";
function TEXT(S:String) return String is (if S(S'Last)/=Character'First then S&Character'First else S);
XACT_DEBUGENGINE_REGISTRY_KEY : constant String:= TEXT("Software\\Microsoft\\XACT");
FACILITY_XACTENGINE : constant := 16#AC7#;
function XACTENGINEERROR(n:WORD) return HRESULT is (win32.Winerror.MAKE_HRESULT(SEVERITY_ERROR, FACILITY_XACTENGINE, n));
XACTENGINE_E_OUTOFMEMORY : constant := E_OUTOFMEMORY ; -- Out of memory;
XACTENGINE_E_INVALIDARG : constant := E_INVALIDARG ; -- Invalid arg;
XACTENGINE_E_NOTIMPL : constant := E_NOTIMPL ; -- Not implemented;
XACTENGINE_E_FAIL : constant := E_FAIL ; -- Unknown error;
XACTENGINE_E_ALREADYINITIALIZED : constant HRESULT:= XACTENGINEERROR(16#001#); -- The engine is already initialized;
XACTENGINE_E_NOTINITIALIZED : constant HRESULT:= XACTENGINEERROR(16#002#); -- The engine has not been initialized;
XACTENGINE_E_EXPIRED : constant HRESULT:= XACTENGINEERROR(16#003#); -- The engine has expired (demo or pre-release version);
XACTENGINE_E_NONOTIFICATIONCALLBACK : constant HRESULT:= XACTENGINEERROR(16#004#); -- No notification callback;
XACTENGINE_E_NOTIFICATIONREGISTERED : constant HRESULT:= XACTENGINEERROR(16#005#); -- Notification already registered;
XACTENGINE_E_INVALIDUSAGE : constant HRESULT:= XACTENGINEERROR(16#006#); -- Invalid usage;
XACTENGINE_E_INVALIDDATA : constant HRESULT:= XACTENGINEERROR(16#007#); -- Invalid data;
XACTENGINE_E_INSTANCELIMITFAILTOPLAY : constant HRESULT:= XACTENGINEERROR(16#008#); -- Fail to play due to instance limit;
XACTENGINE_E_NOGLOBALSETTINGS : constant HRESULT:= XACTENGINEERROR(16#009#); -- Global Settings not loaded;
XACTENGINE_E_INVALIDVARIABLEINDEX : constant HRESULT:= XACTENGINEERROR(16#00a#); -- Invalid variable index;
XACTENGINE_E_INVALIDCATEGORY : constant HRESULT:= XACTENGINEERROR(16#00b#); -- Invalid category;
XACTENGINE_E_INVALIDCUEINDEX : constant HRESULT:= XACTENGINEERROR(16#00c#); -- Invalid cue index;
XACTENGINE_E_INVALIDWAVEINDEX : constant HRESULT:= XACTENGINEERROR(16#00d#); -- Invalid wave index;
XACTENGINE_E_INVALIDTRACKINDEX : constant HRESULT:= XACTENGINEERROR(16#00e#); -- Invalid track index;
XACTENGINE_E_INVALIDSOUNDOFFSETORINDEX : constant HRESULT:= XACTENGINEERROR(16#00f#); -- Invalid sound offset or index;
XACTENGINE_E_READFILE : constant HRESULT:= XACTENGINEERROR(16#010#); -- Error reading a file;
XACTENGINE_E_UNKNOWNEVENT : constant HRESULT:= XACTENGINEERROR(16#011#); -- Unknown event type;
XACTENGINE_E_INCALLBACK : constant HRESULT:= XACTENGINEERROR(16#012#); -- Invalid call of method of function from callback;
XACTENGINE_E_NOWAVEBANK : constant HRESULT:= XACTENGINEERROR(16#013#); -- No wavebank exists for desired operation;
XACTENGINE_E_SELECTVARIATION : constant HRESULT:= XACTENGINEERROR(16#014#); -- Unable to select a variation;
XACTENGINE_E_MULTIPLEAUDITIONENGINES : constant HRESULT:= XACTENGINEERROR(16#015#); -- There can be only one audition engine;
XACTENGINE_E_WAVEBANKNOTPREPARED : constant HRESULT:= XACTENGINEERROR(16#016#); -- The wavebank is not prepared;
XACTENGINE_E_NORENDERER : constant HRESULT:= XACTENGINEERROR(16#017#); -- No audio device found on.;
XACTENGINE_E_INVALIDENTRYCOUNT : constant HRESULT:= XACTENGINEERROR(16#018#); -- Invalid entry count for channel maps;
XACTENGINE_E_SEEKTIMEBEYONDCUEEND : constant HRESULT:= XACTENGINEERROR(16#019#); -- Time offset for seeking is beyond the cue end.;
XACTENGINE_E_SEEKTIMEBEYONDWAVEEND : constant HRESULT:= XACTENGINEERROR(16#01a#); -- Time offset for seeking is beyond the wave end.;
XACTENGINE_E_NOFRIENDLYNAMES : constant HRESULT:= XACTENGINEERROR(16#01b#); -- Friendly names are not included in the bank.;
XACTENGINE_E_AUDITION_WRITEFILE : constant HRESULT:= XACTENGINEERROR(16#101#); -- Error writing a file during auditioning;
XACTENGINE_E_AUDITION_NOSOUNDBANK : constant HRESULT:= XACTENGINEERROR(16#102#); -- Missing a soundbank;
XACTENGINE_E_AUDITION_INVALIDRPCINDEX : constant HRESULT:= XACTENGINEERROR(16#103#); -- Missing an RPC curve;
XACTENGINE_E_AUDITION_MISSINGDATA : constant HRESULT:= XACTENGINEERROR(16#104#); -- Missing data for an audition command;
XACTENGINE_E_AUDITION_UNKNOWNCOMMAND : constant HRESULT:= XACTENGINEERROR(16#105#); -- Unknown command;
XACTENGINE_E_AUDITION_INVALIDDSPINDEX : constant HRESULT:= XACTENGINEERROR(16#106#); -- Missing a DSP parameter;
XACTENGINE_E_AUDITION_MISSINGWAVE : constant HRESULT:= XACTENGINEERROR(16#107#); -- Wave does not exist in auditioned wavebank;
XACTENGINE_E_AUDITION_CREATEDIRECTORYFAILED : constant HRESULT:= XACTENGINEERROR(16#108#); -- Failed to create a directory for streaming wavebank data;
XACTENGINE_E_AUDITION_INVALIDSESSION : constant HRESULT:= XACTENGINEERROR(16#109#); -- Invalid audition session;
end xact3;