home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Learn 3D Graphics Programming on the PC
/
Learn_3D_Graphics_Programming_on_the_PC_Ferraro.iso
/
rwwin
/
wmwatcom.h_
/
wmwatcom.bin
Wrap
Text File
|
1995-11-14
|
8KB
|
233 lines
/**********************************************************************
*
* File : wavemix.h
*
* Abstract : wavemix wrappers for Watcom C
*
**********************************************************************
*
* This file is a product of Criterion Software Ltd.
*
* This file is provided as is with no warranties of any kind and is
* provided without any obligation on Criterion Software Ltd. or
* Canon Inc. to assist in its use or modification.
*
* Criterion Software Ltd. will not, under any
* circumstances, be liable for any lost revenue or other damages arising
* from the use of this file.
*
* Copyright (c) 1995 Criterion Software Ltd.
* All Rights Reserved.
*
* RenderWare is a trademark of Canon Inc.
*
************************************************************************/
#ifndef _WAVEMIX_H
#define _WAVEMIX_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* As the WAVEMIX DLL is a 16-bit Visual C++ library built with 2 byte
* structure packing we need to force Watcom to obey the same convention.
*/
#pragma pack(2)
/***********************************************************************
*
* Indirect function handles for the entry points.
*
***********************************************************************/
extern HINDIR hWaveMixInit;
extern HINDIR hWaveMixConfigureInit;
extern HINDIR hWaveMixActivate;
extern HINDIR hWaveMixOpenWave;
extern HINDIR hWaveMixOpenChannel;
extern HINDIR hWaveMixPlay;
extern HINDIR hWaveMixFlushChannel;
extern HINDIR hWaveMixCloseChannel;
extern HINDIR hWaveMixFreeWave;
extern HINDIR hWaveMixCloseSession;
extern HINDIR hWaveMixPump;
extern HINDIR hWaveMixGetInfo;
/***********************************************************************
*
* Constant definitions.
*
***********************************************************************/
/*
* Flag values for play params.
*/
#define WMIX_QUEUEWAVE 0x00
#define WMIX_CLEARQUEUE 0x01
#define WMIX_USELRUCHANNEL 0x02
#define WMIX_HIPRIORITY 0x04
#define WMIX_WAIT 0x08
#define WMIX_CONFIG_CHANNELS 0x1
#define WMIX_CONFIG_SAMPLINGRATE 0x2
#define WMIX_FILE 0x0001
#define WMIX_RESOURCE 0x0002
#define WMIX_MEMORY 0x0004
#define WMIX_OPENSINGLE 0 /* open the single channel specified by iChannel */
#define WMIX_OPENALL 1 /* opens all the channels, iChannel ignored */
#define WMIX_OPENCOUNT 2 /* open iChannel Channels (eg. if iChannel = 4 will create channels 0-3) */
#define WMIX_ALL 0x0001 /* stops sound on all the channels, iChannel ignored */
#define WMIX_NOREMIX 0x0002 /* prevents the currently submited blocks from being remixed to exclude new channel */
/***********************************************************************
*
* Type definitions.
*
***********************************************************************/
/*
* This is normally an LPVOID but, when using Watcom we don't want a
* 8.32 far pointer but a 16.16 far pointer. As the LPMIXWAVE is
* opaque all that is necessary is to represent LPMIXWAVE as a 32
* bit quantity.
*/
typedef DWORD LPMIXWAVE;
typedef struct
{
WORD wSize;
HANDLE hMixSession;
/*
* This is normally an int. Unfortunately that means a 32-bit quantity
* under Watcom and a 16-bit quantity under Visual C++ so I have changed
* this to a short int.
*/
short int iChannel;
LPMIXWAVE lpMixWave;
HWND hWndNotify;
DWORD dwFlags;
WORD wLoops; /* 0xFFFF means loop forever */
} MIXPLAYPARAMS, *PMIXPLAYPARAM, FAR *LPMIXPLAYPARAMS;
typedef struct
{
WORD wSize;
BYTE bVersionMajor;
BYTE bVersionMinor;
char szDate[12]; /* Mmm dd yyyy */
DWORD dwFormats; /* see waveOutGetDevCaps (wavemix requires synchronous device) */
} WAVEMIXINFO, *PWAVEMIXINFO, FAR *LPWAVEMIXINFO;
typedef struct
{
WORD wSize;
DWORD dwFlags;
WORD wChannels; /* 1 = MONO, 2 = STEREO */
WORD wSamplingRate; /* 11,22,44 (11=11025, 22=22050, 44=44100 Hz) */
} MIXCONFIG, *PMIXCONFIG, FAR *LPMIXCONFIG;
/***********************************************************************
*
* Functions.
*
***********************************************************************/
/***********************************************************************/
extern BOOL WaveMixOpen(void);
/***********************************************************************/
extern void WaveMixClose(void);
/***********************************************************************/
/***********************************************************************
*
* Macro functions for the entry points.
*
***********************************************************************/
/***********************************************************************/
#define WaveMixInit() \
((HANDLE)InvokeIndirectFunction(hWaveMixInit))
/***********************************************************************/
#define WaveMixConfigureInit(config) \
((HANDLE)InvokeIndirectFunction(hWaveMixConfigureInit, (config)))
/***********************************************************************/
#define WaveMixActivate(session, activate) \
((HANDLE)InvokeIndirectFunction(hWaveMixActivate, (session), (WORD)(activate)))
/***********************************************************************/
#define WaveMixOpenWave(session, filename, instance, flags) \
((LPMIXWAVE)InvokeIndirectFunction(hWaveMixOpenWave, (session), (filename), (instance), (DWORD)(flags)))
/***********************************************************************/
#define WaveMixOpenChannel(session, channel, flags) \
((UINT)InvokeIndirectFunction(hWaveMixOpenChannel, (session), (WORD)(channel), (DWORD)(flags)))
/***********************************************************************/
#define WaveMixPlay(playParams) \
((UINT)InvokeIndirectFunction(hWaveMixPlay, (playParams)))
/***********************************************************************/
#define WaveMixFlushChannel(session, channel, flags) \
((UINT)InvokeIndirectFunction(hWaveMixFlushChannel, (session), (WORD)(channel), (DWORD)(flags)))
/***********************************************************************/
#define WaveMixCloseChannel(session, channel, flags) \
((UINT)InvokeIndirectFunction(hWaveMixCloseChannel, (session), (WORD)(channel), (DWORD)(flags)))
/***********************************************************************/
#define WaveMixFreeWave(session, wave) \
((UINT)InvokeIndirectFunction(hWaveMixFreeWave, (session), (wave)))
/***********************************************************************/
#define WaveMixCloseSession(session) \
((UINT)InvokeIndirectFunction(hWaveMixCloseSession, (session)))
/***********************************************************************/
#define WaveMixPump() \
((void)InvokeIndirectFunction(hWaveMixPump))
/***********************************************************************/
#define WaveMixGetInfo(info) \
((WORD)InvokeIndirectFunction(hWaveMixGetInfo, (info)))
/***********************************************************************/
/*
* Revert to default structure packing.
*/
#pragma pack()
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _WAVEMIX_H */
/***********************************************************************
*
* End of file.
*
***********************************************************************/