home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
thx
/
include
/
vocal.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-08
|
1KB
|
63 lines
// -------- vocal.h
#ifndef VOCAL_HAND_H
#define VOCAL_HAND_H
#include "hand.h"
#include "media.h"
#include "debug.h"
class VocalHand : public Hand {
enum Driver {
nodriver,
digpakdriver,
ctvoicedriver
};
int curlib;
static SoundMedia sfxlib;
static Driver driver;
static unsigned *isplaying;
static unsigned port,irq;
static unsigned playing;
static void startup();
static void shutdown();
void thxplay_sound_clip(int index);
static void get_soundcard_settings();
static Driver load_digpak_driver();
static Driver load_ct_voice_driver();
static void init_driver();
static void terminate_driver();
static void set_port(unsigned port);
static void set_irq(unsigned irq);
static void set_status_flag(char* ptr);
friend class Theatrix;
public:
VocalHand(Director* d=0) : Hand(d)
{ }
virtual ~VocalHand() { }
void load_sfxlib(char*);
void set_sfxlib(char*);
void play_sound_clip(int index);
int sound_clip_is_playing();
void stop_sound_clip();
int get_num_clips();
int get_sound_clip_length(int index);
};
inline void VocalHand::play_sound_clip(int index)
{
Assert(curlib!=-1);
Assert(index>0 && index<=Media::clipcount(curlib));
thxplay_sound_clip(index);
}
inline int VocalHand::get_sound_clip_length(int index)
{
Assert(curlib!=-1);
MediaClip& mc = sfxlib.getclip(curlib,index-1);
return (int) mc.size;
}
#endif