home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ISV Strong Games
/
ISV_STRONG_GAMES.iso
/
shootemup
/
hive
/
!Hive
/
c
/
sound
< prev
next >
Wrap
Text File
|
2000-11-27
|
810b
|
43 lines
#include <string.h>
#include "DeskLib:h.SWI"
#include "Popcorn:h.Popcorn"
#define SWI_QTM_Stereo 0x47E4D
#define SWI_QTM_PlayRawSample 0x47E57
#define SWI_QTM_SoundControl 0x47E58
int next_channel = 1;
void init_sound(void)
{
SWI(3, 0, SWI_QTM_SoundControl, 4, 0, -1);
SWI(2, 0, SWI_QTM_Stereo, 0, 2);
}
void kill_sound(void)
{
int c;
for (c=0; c!=5; c++)
SWI(2, 0, SWI_QTM_PlayRawSample, c, 0);
SWI(3, 0, SWI_QTM_SoundControl, 0, 0, 0);
}
void make_sound(char *sound_res)
{
int c=0;
while (c != resource_free)
{
if (strcmp(resource[c]->file, sound_res) == 0)
{
SWI(7, 0, SWI_QTM_PlayRawSample, next_channel, resource[c]->addr, resource[c]->size, 0, 0, 18, 64);
next_channel++;
if (next_channel == 5)
next_channel = 1;
}
c++;
}
}