www.pudn.com > vmix_1.013.zip > WAVE.H
#ifndef _WAVE_H_
#define _WAVE_H_
#define PASCAL pascal
#define TRUE -1
#define FALSE 0
#define ON TRUE
#define OFF FALSE
#define EXTERN extern
#define PUBLIC
#define PRIVATE static
#define VALIDWAVE 0
#define UNKNOWNFILETYPE 1
#define MIX_LEN 32
#define MIX_SNDS 16
#define VERBOSE_MODE 0 /* Prints out some messages */
#include "wavetype.h"
; /*\
;---|*| public prototypes
; \*/
PUBLIC int PASCAL PowerUpWAVE ( void );
//
// Return zero if failed, else returns positive non-zero
//
PUBLIC void PASCAL ShutDownWAVE ( void );
//
// It's ok to call this a million times since it makes sure that the WAVE
// driver is up before shutting it down.
//
PUBLIC int PASCAL SetToWaveParam( wave *Wav );
//
// Use the parameters from one wave file to play all the sounds.
// returns non-zero if succeed or zero for failure.
//
PUBLIC int PASCAL LoadWave( char *, wave * );
//
// Load a wave file into the struct pointer's data. If the data pointer
// of the struct is not zero, then LoadWave will try to free up the memory
// assuming it's been allocated. Returns positive non-zero if succeed,
// else returns 0.
//
PUBLIC int PASCAL AddSound( wave *wav, int rep );
//
// Add a wave to the mixing list. repeat the sound if rep is non-zero.
// Returns the index of the slot the wave was assigned or -1 if the
// no more sounds can be added to the mix list.
//
PUBLIC int PASCAL RemoveSound( int which );
//
// Remove a playing sound from the list of waves being play.
// returns 0 if failed else returns 1.
//
PUBLIC void PASCAL UpdateWAVE( void );
//
// Keeps the WAVE driver alive. Specifically, stop playing if
// SoundDone is true. Somehow the program crashes if I try to
// do it in the timer call back function. Probably has something
// to do with some registers. If you fix it and get it to work,
// make sure you send me the changes. :)
//
; /*\
;---|*| PUBLIC Global variables
; \*/
/* This is a read-only variable
* Changing it won't affect the WAVE mixing and playing driver
* but your own codes */
EXTERN int SoundPlaying;
#endif